book cover

The Back of the Envelope
(Column 7 of Programming Pearls)

A Story

It was in the middle of a fascinating conversation on software engineering that Bob Martin asked me, ``How much water flows out of the Mississippi River in a day?'' Because I had found his comments up to that point deeply insightful, I politely stifled my true response and said, ``Pardon me?'' When he asked again I realized that I had no choice but to humor the poor fellow, who had obviously cracked under the pressures of running a large software shop.

My response went something like this. I figured that near its mouth the river was about a mile wide and maybe twenty feet deep (or about one two-hundred-and-fiftieth of a mile). I guessed that the rate of flow was five miles an hour, or a hundred and twenty miles per day. Multiplying
     1 mile x 1/250 mile x 120 miles/day   ~   1/2 mile3/day
showed that the river discharged about half a cubic mile of water per day, to within an order of magnitude. But so what?

At that point Martin picked up from his desk a proposal for the communication system that his organization was building for the Summer Olympic games, and went through a similar sequence of calculations. He estimated one key parameter as we spoke by measuring the time required to send himself a one-character piece of mail. The rest of his numbers were straight from the proposal and therefore quite precise. His calculations were just as simple as those about the Mississippi River and much more revealing. They showed that, under generous assumptions, the proposed system could work only if there were at least a hundred and twenty seconds in each minute. He had sent the design back to the drawing board the previous day. (The conversation took place about a year before the event, and the final system was used during the Olympics without a hitch.)

That was Bob Martin's wonderful (if eccentric) way of introducing the engineering technique of ``back-of-the-envelope'' calculations. The idea is standard fare in engineering schools and is bread and butter for most practicing engineers. Unfortunately, it is too often neglected in computing.

The Rest of the Column

The story at the top of this page begins Column 7 of Programming Pearls. These are the remaining sections in the column.
7.1 Basic Skills
7.2 Performance Estimates
7.3 Safety Factors
7.4 Little's Law
7.5 Principles
7.6 Problems
7.7 Further Reading
7.8 Quick Calculations in Everyday Life

Related Content

The Solutions to Column 7 give answers for some of the Problems.

Appendix 2 is an estimation quiz to help you test your guessing skills.

Appendix 3 describes programs that generate cost models for the space (spacemod.cpp) and time (timemod.c) used by C and C++ programs.

The index has an entry for the back of the envelope.

The teaching material contains overhead transparencies based on Sections 7.1, 7.5 and 7.6; the slides are available in both Postscript and Acrobat.

The web references describe several web sites devoted to this topic.

An excerpt from this column appears in the September/October 1999 issue of IEEE Software (pages 61-65). It consists of the lead story, much of Section 7.1, much of Section 7.2, Section 7.5 and the Estimation Quiz.

Copyright © 1999 Lucent Technologies. All rights reserved. Mon 28 Feb 2000