More than 70 years ago, one of the most famous programmers in history encountered what we can today describe as the first example of a real bug in a computer: Grace Hopper had entered the Harvard University Computation Laboratory to continue her work on the Mark II electromechanical computer, which was experiencing a strange failure.

The official report, dated September 9, 1947, went down in history thanks to a small moth that had been trapped in a relay, and was taped to the page as evidence…

Grace Hopper: Defining the Modern Bug, with the Help of a Moth
Grace Hopper

Grace Hopper’s Moth

There are many details about Grace Hopper's life worth reviewing. For example, the United States Navy had rejected her enlistment request at the beginning of World War II for physical reasons (at 34 she was ‘too old’ and too thin), and because of her work as a mathematics professor at Vassar College (whenever possible, the armed forces had to prevent scientists from being sent to the front).

Obviously, that didn't stop her: She requested leave from Vassar, joined the Navy Reserve as a WAVES volunteer with a special authorization (her weight was seven kilograms below the minimum), and ended up pouring her knowledge into the Mark computers at Harvard University. That leads us to the moth…

Grace Hopper: Defining the Modern Bug, with the Help of a Moth
The original Mark I team, in early 1945. Seated, from left to right: Bloch, Arnold, Aiken, Hopper and Campbell.

The Harvard Mark II was designed by Howard H. Aiken in 1947. Hopper was part of the programming team, which also included Richard Milton Bloch (inventor of the ‘parity check’) and Robert Campbell. A particular entry in the Mark II logbook dated September 9, 1947 stands out from the rest due to the inclusion of an element that, more than 70 years later, still brings a smile: a moth. The poor insect had gotten trapped in relay number 70 of panel F, causing a failure in the electromechanical ‘supercomputer’.

Grace Hopper: Defining the Modern Bug, with the Help of a Moth
The famous moth, preserved on tape. First documented case of a bug inside a computer.

Hopper stated on more than one occasion that she was not the one who found the bug, but rather William ‘Bill’ Burke, who already knew the term bug from before. The difference is that the ‘bug’ in question was real. Hopper loved telling that story, and over the years she was placed at the center of the discovery.

Now… Where Does the Word ‘Bug’ Come From?

In reality, no one knows. The oldest records point to the 1870s, and to a letter written by Thomas Edison in 1878, while the concept of ‘errors’ in software goes back to the notes of Ada Lovelace in 1843. Today, the famous moth and the entire logbook are in the possession of the National Museum of American History (link below).

National Museum of American History

Harvard University