Published online by Cambridge University Press: 05 June 2012
Computer programming is the process by which we instruct a computer to perform a useful calculation or process. The computer can easily be described as an idiot savant, a term used by psychiatry to describe mental conditions in which individuals are capable of performing incredible feats of memory or calculation on request but are unable to understand the simplest activities of daily life. It is important to know that the computer will do only what it is instructed to do, no more and no less. Computers, sophisticated as they are, do not possess sentience or self-awareness. They cannot guess or anticipate what you want them to do; they simply do as instructed. There is a very old saying “garbage in, garbage out” that means if you put bad data into a program you can hardly expect to get good data out. Likewise, if your program is formed badly, the computer will not correct it for you.
Modern computers are rarely plagued by problems that cause them not to execute their instructions or to execute their instructions in a fashion other than that specified – in other words, they either work or they don't. If they seem to be acting strangely your program most likely is at fault. The most difficult task in the programming of a computer is the understanding of what the computer is supposed to do. To help make this task easier, we will examine techniques for describing problems and developing computer solutions.
To save this book to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.