bug (computer)

16 June 2020

Errors in computer code are known as bugs, but why? We can’t know for sure, but it is likely that the metaphor of an insect contaminating and gumming up the works of a mechanical or electric device is at its core. This particular use of the term arose in the United States in the latter half of the nineteenth century.

The ordinary sense of bug is of an insect, or to entomologists an insect of the order Hemiptera. This sense appears in the closing years of the sixteenth century. From John Hester’s 1594 medical text, The Pearle of Practise:

This medecine caused many times, a certain blacke bugge, or worme to come forth which had many legs, & was quicke: & after that the cancker would heale quicklie, with any conuenient medecine.

The origin of the standard sense of bug is unknown, but it may be from the sense of bug meaning a monster or evil spirit. (See bogey.)

The word moved into the world of invention by 1875, when it appears in the pages of the 15 August issue of The Operator, The Journal of Scientific Telegraphy:

The biggest “bug” yet has been discovered in the U.S. Hotel Electric Annunciator.

Some sources ascribe this sense to Thomas Edison. He did use the term, as evidenced by this 18 November 1878 letter to Theodore Puskas:

It has been just so in all my inventions. The first step is an intuition—and comes with a burst, then difficulties arise. This thing gives out and then that —“Bugs”—as such little faults and difficulties are called—show themselves and months of anxious watching, study and labor are requisite before commercial success—or failure—is certainly reached.

But as the earlier citation shows, Edison did not coin the term. He was just using a term that was current in the technological slang of the day. And while I do not know if Edison read The Operator, it’s just the sort of thing he would read.

In the first half of the twentieth century, the sense moved out of technical circles and into more widespread use, as witnessed by this statement by New York City Mayor Fiorella LaGuardia in the 22 July 1937 New York Times:

“No building code or any code of that kind can be drawn up without bugs, defects or jokers,” [La Guardia] commented. “The only thing to do with this code is to try it and be ready to amend it as soon as the bugs, defects and jokers appear. It is exactly like the airplane motor which looked perfect on the drafting board and which will not fly.”

9 September 1945 page from the logbook of the Harvard Mark II computer with a moth taped to it

9 September 1945 page from the logbook of the Harvard Mark II computer with a moth taped to it

And of course, it moved into the world of computing as soon as that world was created. The earliest reference to bugs in computers that I’m aware of dates to 9 September 1945. At 3:45 pm on that date computer workers on the Harvard Mark II machine at the Naval Surface Warfare Center in Dahlgren, Virginia found a moth in a relay of the machine. They taped the insect into their logbook and recorded it as:

1545 Relay #70 Panel F (moth) in relay. First actual case of bug being found.

Computer pioneer Grace Hopper, who worked on the Harvard Mark II, was fond of telling this story, and many have understood that fact to mean that she coined the term. But as with the case of Edison, the Mark II workers were just using a term they already knew, and the first actual case is a joke. It’s the first actual bug (i.e., insect), not the first defect in the machine or its code.

Discuss this post


Sources:

Green’s Dictionary of Slang, 2020, s.v. bug n.4.

Hester, John. The Pearle of Practise, or Practisers Pearle, for Phisicke and Chirugerie. London: Richard Field, 1594, 14.

Hopper, Grace Murray. “Anecdotes: The First Bug.” Annals of the History of Computing, 3.3, July–September 1981: 285-86

“La Guardia to Sign New Building Code.” New York Times, 22 July 1937, 27.

Oxford English Dictionary, third edition, March 2017, s.v. bug, n.2.

Shapiro, Fred R. The Yale Book of Quotations. Yale University Press, 2006, 226.

Photo credit: 9 September 1945, U.S. Naval History and Heritage Command photograph.