A moth really did get caught inside an early computer. The insect ended up taped into a logbook beside one of the most famous jokes in computing history.
The part that needs debugging is the usual retelling. Grace Hopper did not invent the word “bug,” and the surviving logbook was probably not hers. The stranger, better story is that a literal bug arrived decades after engineers were already blaming “bugs” for troublesome machines.
The moth was found in a Mark II relay
On September 9, 1947, operators working with the Harvard Mark II computer found a moth trapped at Relay 70 on Panel F. The U.S. Naval History and Heritage Command identifies the machine, place, date and relay in its record of the incident.
The operators removed the moth, taped it into the day’s log and wrote, “First actual case of bug being found.” That page is now held by the Smithsonian’s National Museum of American History. The insect is still there, flattened beneath a strip of tape.
This was not a metaphorical software error. The Mark II used electromechanical relays, and the moth had become a physical obstruction inside the machinery.
“Bug” was already old engineering slang
The wordplay worked because the team already knew “bug” as a name for a fault. According to the Smithsonian, American engineers had used the term for small machine problems for more than a century, and Thomas Edison referred to bugs in electrical circuits in the 1870s.
That is why the logbook says “actual” bug. The joke depends on the earlier figurative meaning. The moth was not the origin of the word; it was a rare chance to find the metaphor with wings.
Grace Hopper helped make the story famous
Hopper was part of the Mark II team at Harvard, but the evidence does not support the tidy claim that she personally discovered the moth or wrote the log entry. The Smithsonian says the book was probably not hers.
Her connection still matters. Hopper later became one of the best-known figures in computing, helped develop compiler technology and championed programming languages closer to ordinary English. The museum credits Hopper and the rest of the Mark II team with helping popularize “bug” and “debug” in computing. Its history of Hopper’s career also notes that she used the moth story in the larger tale of early computer work.
The best version is the accurate one
A real moth, a numbered relay and a surviving logbook are already enough. The story does not need a made-up origin for the word or a lone-genius discovery scene.
Modern machines no longer depend on roomfuls of open relay contacts, but their failures still attract personality. We complain about software bugs, argue with voice assistants and occasionally feel watched by a supermarket robot with giant googly eyes. The hardware changed. Our habit of turning machine trouble into a character did not.
