CHAPTER 7

Designing programs

From then on, when anything went wrong with a computer, we said it had bugs in it.

Admiral Grace Hopperupon pulling a two-inch moth from the Harvard Mark I computer in 1945

Every hour of planning saves about a day of wasted time and effort.

Steve McConnellSoftware Project Survival Guide (1988)

IT should go without saying that we want our programs to be correct. That is, we want our algorithms to produce the correct output for every possible input, and we want our implementations to be faithful to the design of our algorithms. Unfortunately however, in practice, perfectly correct programs are virtually nonexistent. Due to their complexity, virtually every significant piece of software has errors, or “bugs” in it. ...

Get Discovering Computer Science now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.