For Dummies Objective-C 978-0-470-52275-2 User Manual

Product codes
978-0-470-52275-2
Page of 12
Chapter 1
Computer Programming Exposed!
In This Chapter
▶ 
Understanding the basics of computer programming
▶ 
Getting how computer languages work
▶ 
Knowing how Objective-C works
L
ooking at it from the outside, computer programming can appear compli-
cated and a bit mysterious. But once I let you in on a few of the secrets, 
you’ll realize that when you write a computer program, whether it is a small 
program that’s just a few lines or one that is tens or even hundreds of thou-
sands of lines, you are generally doing the same thing:
 
1.  Getting input — from a keyboard or touch screen, or even something 
stored on your computer. 
 
  The input might be instructions to the program itself — for example, 
to display the Web page, developer.apple.com; or to print a docu-
ment such as Chapter 1; or to process data like “enter your Apple ID and 
Password” when you log on to the Mac Dev Center (the browser is just 
another program); or even to process a list of credit card transactions 
stored on a computer.
 
2.  Doing something based on, or with, the input. 
 
  Your browser may go on the Internet and access the page correspond-
ing to developer.apple.com; or your word-processing program may 
display a Print dialog and print the chapter (at least that is what mine 
does). Based on your input, the program may also go out and use data 
it has stored or even has access to over the Internet. For example, when 
you enter your Apple ID and Password, eventually a computer accesses 
a database to see if your Apple ID and Password are both valid and, if so, 
allows you access to the site and displays the site for you.
 
3.  Displaying the results of your adroitness on a monitor (or storing it 
away for future use).
There is no doubt that computers are engineering marvels. But what will 
make you a good programmer is not your understanding of all that wizardry. 
05_522752-ch01.indd   9
05_522752-ch01.indd   9
8/27/09   9:45:02 PM
8/27/09   9:45:02 PM
COPYRIGHTED MATERIAL