Bugs

Published

2023-07-31

The origin of the term “bug”

So where do we get the word “bug” anyhow? Alas, the origin of the term is lost. However, in 1947, the renowned computer pioneer Grace Murray Hopper was working on the Harvard Mark I computer, and a program was misbehaving.1

Figure 1: Grace Murray Hopper. Source: The Grace Murray Hopper Collection, Archives Center, National Museum of American History (image is in the public domain)

After reviewing the code and finding no error, she investigated further and found a moth in one of the computer’s relays (remember this was back in the days when a computer filled an entire large room). The moth was removed, and taped into Hopper’s lab notebook.

Figure 2: A page from Hopper’s notebook containing the first “bug”. Source: US Naval Historical Center Online Library (image is in public domain)

In interviews, Hopper said that after this discovery, whenever something was wrong she and her team would say “There must be a bug.”

Not everyone likes the term “bug.” For example, the famously grumpy Edsger Dijkstra thought that calling errors “bugs” was intellectually dishonest. He made this point in an essay with the remarkable title “On the cruelty of really teaching computing science.”2

We could, for instance, begin with cleaning up our language by no longer calling a bug a bug but by calling it an error. It is much more honest because it squarely puts the blame where it belongs, viz. with the programmer who made the error. The animistic metaphor of the bug that maliciously sneaked in while the programmer was not looking is intellectually dishonest as it disguises that the error is the programmer’s own creation.

Figure 3: Edsger Dijkstra. Source: University of Texas at Austin, under a Creative Commons license

Despite Dijkstra’s remonstrances, the term stuck. So now we have “bugs.”

Bugs are, of course, inevitable. What’s important is how we strive to avoid them and how we fix them when we find them.

Original author: Clayton Cafiero < [given name] DOT [surname] AT uvm DOT edu >

No generative AI was used in producing this material. This was written the old-fashioned way.

This material is for free use under either the GNU Free Documentation License or the Creative Commons Attribution-ShareAlike 3.0 United States License (take your pick).

Footnotes

  1. Judging from Hopper’s notebook (9 September 1947), the misbehaving program was a “multi-adder test”. It appears they were running the machine through a sequence of tests—for example, tests for certain trigonometric functions took place earlier that day. At least one had failed and some relays (hardware components) were replaced. The multi-adder test was started at 3:25 PM (Hopper uses military time in the notebook: “1525”), and twenty minutes later, the moth was taped into the notebook. It’s not clear how the problem became manifest, but someone went looking at the hardware and found the moth.↩︎

  2. Edsger Dijkstra, 1988, “On the cruelty of really teaching computing science”. This essay is recommended. See the entry in the Edsger Dijkstra archive hosted by the University of Texas at Austin: https://www.cs.utexas.edu/~EWD/transcriptions/EWD10xx/EWD1036.html↩︎