Chapter 1. Computer Programming Exposed!

In This Chapter

  • Understanding the basics of computer programming

  • Getting how computer languages work

  • Knowing how Objective-C works

Looking at it from the outside, computer programming can appear complicated 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 thousands 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 document 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 corresponding 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, ...

Get Objective-C® For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.