Tech Trivia

The First Computer Bug Was a Real Moth – But It Didn't Invent the Word

In 1947, engineers found a moth jammed in Harvard's Mark II computer and taped it into the logbook. The word "bug" was already decades old – here's the full story.

Watch the Short

The 60-second version is on YouTube. This article is the full story.

New Shorts every week on tech trivia, AI and gadgets.

Subscribe to TheTechPrana

Key takeaways

  • On 9 September 1947, engineers traced a fault in Harvard's Mark II computer to a moth stuck in Relay #70, Panel F.
  • They taped it into the logbook with the note "First actual case of bug being found" – a joke that only works because "bug" was already in use.
  • Thomas Edison was calling technical glitches "bugs" back in 1878. The logbook page is now at the Smithsonian.

Every programmer spends a good part of their life fixing bugs. Ask where the word comes from and you’ll usually hear the same story: a moth got stuck in an early computer, and that’s why we call glitches “bugs.” The moth is real. The rest of the story is a little more interesting than that.

September 9, 1947: the moth in the machine

The Harvard Mark II was an electromechanical computer – a room-sized machine that calculated using thousands of relays, small mechanical switches that clicked open and closed.

On 9 September 1947, the Mark II kept producing errors. The team worked through the machine panel by panel until they found the problem at Relay #70 on Panel F: a moth, trapped between the relay’s contacts and stopping it from working.

“First actual case of bug being found”

The team removed the moth and taped it into the computer’s logbook, with a now-famous note underneath:

“First actual case of bug being found.”

Read that line again. The joke only works if everyone already knew what a “bug” was. The engineers weren’t naming something new – they were laughing at the fact that, for once, the bug was a literal insect.

The word was already 70 years old

Engineers had been calling faults and glitches “bugs” long before 1947. Thomas Edison used the word in 1878, describing the little faults and difficulties that cropped up while developing his inventions. By the time the Mark II was built, “bug” was ordinary engineering slang.

So the moth didn’t invent the word. It was simply the first actual bug found causing a computer bug – which is exactly what the logbook says.

Where does Grace Hopper fit in?

The story is often told with computing pioneer Grace Hopper finding the moth herself. Hopper did work on the Mark II team, and she loved telling this story in her lectures for decades afterwards – which is a big reason it became famous.

But Hopper herself said she wasn’t the one who found it; the moth was removed by an operator on the team. Her real legacy is far bigger: she was a pioneer of programming languages and helped make computers usable by people who weren’t engineers.

Where is the moth now?

The logbook page – moth still taped to it – survived. It is now part of the collection at the Smithsonian’s National Museum of American History in Washington, D.C., one of the most charming artefacts in computing history.

Why the story still matters

The moth is a great reminder of how physical early computing was. Today a “bug” is almost always a mistake in code. In 1947 it could be dust, a loose wire, a faulty relay – or an insect that wandered into the wrong place at the wrong time.

Quick recap:

  • When: 9 September 1947
  • Where: Harvard’s Mark II computer, Relay #70, Panel F
  • What: a real moth, taped into the logbook
  • The twist: “bug” was already in use – Edison used it in 1878

Quiz time: did you guess the moth? Watch the Short above and drop your score in the YouTube comments.

Sources

  1. Computer History Museum: What happened on September 9th
  2. Science Notes: September 9 – First Computer Bug
  3. Computerworld: Did Grace Hopper really invent the term 'bug'?
  4. IEEE Spectrum: Did you know? Edison coined the term "bug"
Computer historyGrace HopperProgrammingTech triviaHarvard Mark II