The First “Computer Bug” Was a Real Moth (Mostly)

The First "Computer Bug" Was a Real Moth (Mostly) 1
⏱ 2 min readUpdated 13 October 2026

On 9 September 1947, operators working on the Harvard Mark II computer traced a fault to a moth trapped between the contacts of a relay. They removed it and taped it into the logbook with the note: “First actual case of bug being found.”

In this article
  1. The joke in the note
  2. Grace Hopper
  3. The logbook survives
  4. And “debugging”?

The joke in the note

The word “bug” for a technical fault was already old — Thomas Edison used it in letters in the 1870s for problems in his inventions. That is exactly why the note is funny: for once, the bug was a real insect.

Advertisement

Grace Hopper

The story is usually told about Grace Hopper, the pioneering computer scientist who worked on the Harvard machines and later on early programming languages that led to COBOL. She loved telling the moth story and made it famous, although she was not the person who found it.

The logbook survives

The logbook page — moth still taped to it — is preserved at the Smithsonian’s National Museum of American History.

And “debugging”?

Engineers were already using “debug” before computers too, but the moth story gave it its most memorable picture. Today a programmer “debugging” is hunting for a mistake in code — no insects involved, usually.

More computing history: the history of undo, cut, copy and paste.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong