On September 9, 1947, a team of computer scientists and engineers operating Harward University’s Mark II electromechanical computer started getting an error. They traced the error and found a moth trapped in a relay. The moth was carefully removed and taped to the logbook with a note saying “first actual case of bug being found”. Urban legend says this was the first case of a computer bug, but it’s not true.

Today’s (September 9) story of what happened this day in Science, Technology, Astronomy, and Space Exploration history.

The first “actual” computer bug

Contrary the popular belief, this “moth” was not the first computer bug. Programmers started making mistakes and creating “bugs” just from the very beginning.

The concept that software might contain errors dates back to Ada Lovelace’s 1843 notes on the analytical engine, in which she speaks of the possibility of program “cards” for Charles Babbage’s analytical engine being erroneous:

“… an analyzing process must equally have been performed in order to furnish the Analytical Engine with the necessary operative data, and that herein may also lie a possible source of error. Granted that the actual mechanism is unerring in its processes, the cards may give it wrong orders.”

Ada Lovelace (10 December 1815 – 27 November 1852) was an English mathematician and writer, chiefly known for her work on Charles Babbage’s proposed mechanical general-purpose computer, the Analytical Engine.

No, the term “computer bug” was NOT inspired by the Harward Mark II moth event

The term “software bug” or “computer bug” was NOT inspired by the Harward Mark II moth event. It’s a myth.

The term “bug” (or the term computer bug/software bug, and the term “debugging”) was not created after that event. The word “bug” has been used to describe technical “glitches” since at least the late 1800s – probably as early as 1620 – and possibly as early as the 12th century.

One common proof that this doesn’t relate back to the famous moth-in-the-computer is in an 1878 paper by the English lawyer, judge, politician, and author Thomas Hughes (20 October 1822 – 22 March 1896), who was quoting Thomas Edison:

“I have the right principle and am on the right track… [it is] then that “Bugs” — as such little faults and difficulties are called — show themselves and months of intense watching, study and labor are requisite before commercial success or failure is certainly reached.”

So we know that Thomas Edison used the term in exactly the modern sense and that the word was already known in technical circles.

The word (bug) probably originates from the Medieval-English word bugge, meaning a “Hobgoblin” – which is a mischievous kind of imp who takes joy in screwing up machinery and causing trouble of all kinds.

Also, the note saying “First actual case of bug being found” wouldn’t make sense unless the term “bug” was already in use.

That famous note was written by Grace Hopper (December 9, 1906 – January 1, 1992), the American computer scientist, mathematician, and United States Navy rear admiral.

First actual computer bug
A page from the Harvard Mark II electromechanical computer’s log, featuring a dead moth that was removed from the device, with a note saying “first actual case of bug being found”. Photo courtesy of the Naval Surface Warfare Center, Dahlgren, VA., 1988. – U.S. Naval Historical Center Online Library Photograph NH 96566-KN, Public Domain, Link


M. Özgür Nevres

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.