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 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.