Skip to content

Files

Latest commit

9d39add · Mar 1, 2024

History

History
This branch is 31 commits ahead of, 34 commits behind DeNepo/welcome-to-js:main.

3-understanding-programs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Feb 17, 2022
Apr 26, 2022
Mar 1, 2024
Feb 17, 2022
May 21, 2023
Mar 1, 2024
Mar 1, 2024
Mar 1, 2024
Mar 1, 2024
Feb 1, 2022
Feb 17, 2022
Dec 13, 2021

Understanding Programs

It's not enough just to know the language features in JS. Before you can write good programs you need to learn how to understand code that you did not write.

At first this might not sound right, but it makes sense if you think about it. It will usually take you at least 20 minutes (usually much more) to write a program. In that time you will write, delete, rewrite, and change your code many times. You'll forget what you wrote, or you'll remember something from 10 minutes ago but not the most recent code.

All this means that you can't rely on your memory to understand everything going on in your program (even professional developers can't do this!). Instead you need to learn how to read and understand your own code so you can figure out what's happening when something goes wrong.

So how can you practice this? By reading and understanding code someone else wrote. If you can understand their code, hopefully you can understand your own!