Rather Read the Key Concept? Click here.
KEY CONCEPT: CODE IS WRITTEN BY HUMANS, FOR HUMANS.
In this lesson, you'll probably see a number of new things, and some of them may look really confusing.
As you progress through the hour, always remember that code is written by people and it's written to do things for people.
The first lesson is about 'dissecting' a piece of code and seeing its parts. The most important part of the code for you to understand at this point are the comments. Comments in our code are the green words. They start with two forward slashes // or a */. When you see these comments, you've found a note from another programmer to you.
Reading comments should reveal the intent of the code. Keep in mind that the computer can't read comments, only you can. So when you change your code, you don't have to change your comments. All of the code that the computer can read is the rest of what you see in your code editor- black, orange, blue, and red characters.
So, even if you don't understand any of the computer code in the code editor, you can always read the comments to help you identify what each line of code does and how you might modify it to do something different.
Read all of the green comments in this program and try to determine the title of the program, what it should do, and how each line of code impacts the resulting program.
Now, let's get started!