Datasheet

Chapter 1
What Is a Program?
In This Chapter
Understanding programs
Writing your first “program”
Looking at computer languages
I
n this chapter, you will learn what a program is and what it means to write
a program. You’ll practice on a Human Computer. You’ll then see some
program snippets written for a real computer. Finally, you’ll see your first
code snippet written in C++.
Up until now all of the programs running on your computer were written by
someone else. Very soon now, that won’t be true anymore. You will be join-
ing the ranks of the few, the proud: the programmers.
How Does My Son Differ
from a Computer?
A computer is an amazingly fast but incredibly stupid machine. A computer
can do anything you tell it (within reason), but it does exactly what it’s told —
nothing more and nothing less.
In this respect, a computer is almost the exact opposite of a human: humans
respond intuitively. When I was learning a second language, I learned that it
wasn’t enough to understand what was being said — it’s just as important
and considerably more difficult to understand what was left unsaid. This is
information that the speaker shares with the listener through common expe-
rience or education — things that don’t need to be said.
05_617977-ch01.indd 905_617977-ch01.indd 9 7/6/10 11:38 PM7/6/10 11:38 PM
COPYRIGHTED MATERIAL

Summary of content (12 pages)