Moth in the machine: Debugging the origins of 'bug'

03.09.2011
It's an oft-repeated tale that the grand dame of military computing, computer scientist and U.S. Navy Rear Admiral Grace Hopper, coined the terms bug and debug after an incident involving Harvard University's Mark II calculator.

The story goes like this:

On September 9, 1945, a Harvard technical team looked at Panel F and found something unusual between points in Relay 70. It was a moth, which they promptly removed and taped in the log book. Grace Hopper added the caption "First actual case of bug being found," and that's the first time anyone used the word bug to describe a computer glitch. Naturally, the term debugging followed.

Yes, it's an oft-repeated tale, but it's got more bugs in it than Relay 70 probably ever had.

For one thing, Harvard's Mark II came online in summer of 1947, two years after the date attributed to this story. For another thing, you don't use a line like "First actual case of bug being found" if the term bug isn't already in common use. The comment doesn't make sense in that context, except as an example of engineer humor. And although Grace Hopper often talked about the moth in the relay, she did not make the discovery or the log entry.

The core facts of the story are true -- including the date of September 9 and time of 15:45 hours -- but that's not how this meaning of the word bug appeared in the dictionary. Inventors and engineers had been talking about bugs for more than a century before the moth in the relay incident. Even Thomas Edison used the word. Here's an extract of a letter he wrote in 1878 to Theodore Puskas, as cited in (2006):