Keyboard Navigation
W
A
S
D
or arrow keys · M for map · Q to exit
← Back to Incident Room
1947bugMilitary

The First Computer Bug — Grace Hopper's Moth

A moth lodged in a relay of the Harvard Mark II computer caused a malfunction. Engineers taped it into the logbook: 'First actual case of bug being found.'

2 min read
Root Cause

Physical obstruction in electromechanical relay. The moth prevented the relay from closing, causing computation errors. The term 'bug' was already engineering slang, but this incident literalized the metaphor.

Aftermath

The logbook page is preserved at the Smithsonian National Museum of American History. The term 'debugging' entered the computing lexicon. Grace Hopper and the Mark II team are credited with popularizing the usage.

The Incident

On September 9, 1947, at 3:45 p.m., operators of the Harvard Mark II computer at the Naval Weapons Center in Dahlgren, Virginia found the source of a malfunction: a moth trapped in Relay #70, Panel F. They carefully removed the moth and taped it into the logbook with the annotation: "First actual case of bug being found."

The Context

The word "bug" had been used to describe engineering defects since at least the 1870s — Thomas Edison used it in letters about electrical circuits. But this was the first time the metaphor became literal in computing. The Mark II was an electromechanical computer — it used physical relays that opened and closed to perform calculations. A moth in a relay wasn't a software error. It was a hardware obstruction. The distinction between hardware and software bugs hadn't yet been drawn because software barely existed as a concept.

Why It Matters

This is the founding artifact of software archaeology. The logbook page — now preserved at the Smithsonian National Museum of American History — is the moment the computing industry began documenting its failures. Grace Hopper, who was part of the Mark II team, spent the rest of her career not just finding bugs but teaching others to find them. The discipline of debugging began with a literal insect and became the defining activity of the profession.

Every exhibit in this museum descends from this moment. The patterns changed. The word didn't.

Techniques
physical obstruction