Every developer alive types the word “bug” without thinking twice about it. It’s just what broken code is called. But the word has a body count of exactly one insect, a corpse taped to a logbook page, and a Navy officer who spent 45 years telling the story just slightly wrong.
Here’s what actually happened.
Panel F, Relay 70, 3:45 PM
September 9, 1947. Harvard’s Computation Laboratory. The Mark II Aiken Relay Calculator isn’t a computer the way you’d picture one today. It’s a 25-ton, room-sized machine built from thousands of electromechanical relays, physical switches clicking open and shut thousands of times a second. It runs hot, it runs loud, and on this particular afternoon, it’s running wrong.
Somewhere inside, a calculation keeps failing. The technicians do what engineers have always done: open panels and hunt, relay by relay, for whatever’s breaking the circuit. Panel F. Relay 70.
And there it is. A moth, wedged directly between the metal contacts, its body physically blocking the circuit from closing. Not a metaphor. An actual insect, drawn to the machine’s warmth, that had crawled inside and died in exactly the wrong spot.
Someone grabs tweezers, pulls the moth out, and then does something wonderfully bureaucratic: tapes the dead moth straight onto the page of the operations logbook. Next to it, in tidy handwriting, someone writes, “First actual case of bug being found.”
That page still exists. It’s sitting in the Smithsonian’s National Museum of American History right now, moth and all.
You need to read this: Siri Just Got an AI Brain. But Not Everyone Gets to Use It Yet.
The part almost nobody knows
This is where it gets interesting. Grace Hopper almost certainly didn’t write that line, and she definitely didn’t pull the moth out.
Hopper was on the Mark II team, a Navy officer and mathematician working under Howard Aiken at the time. But people who’ve studied the actual logbook page say the handwriting doesn’t match hers. Nobody signed the entry. We genuinely don’t know who found the moth or who wrote the caption beside it.
What Hopper did was retell the story constantly for the next 45 years, in lectures, interviews, and articles, until “the woman who told the story well” quietly merged in the public imagination with “the woman who lived the story.” By the time she was a rear admiral and one of the most famous programmers in history, the moth had basically been assigned to her biography by popular vote.
The twist inside the twist
Tech historians love pointing out that “bug” wasn’t even new in 1947. Engineers, including Thomas Edison, had been using the word for mechanical faults since the 1870s, seventy years earlier. Edison wrote letters complaining about “bugs” in his own inventions.
So the joke in that 1947 logbook only landed because everyone already knew the word. Someone found a literal insect causing a metaphorical bug, and the pun was too good not to preserve. Hopper’s team didn’t invent the term. They gave it a photograph.
Why does the wrong version keep winning
There’s something almost too fitting about an industry obsessed with precision getting its own origin story slightly wrong for 78 years running. Tech doesn’t really remember its history so much as curate it, smoothing the edges until credit lands on whoever told the best version. The moth story survives not because it’s perfectly accurate but because it’s a genuinely great story: a bug that was literally a bug, taped into a logbook by someone we’ll never be able to name.
Make sure you read this later: Nigeria Just Hit Pause on New Tech Regulations. Here’s Why That’s Actually Good News.
Next time you file a bug report, you’re carrying on a naming tradition that started with tweezers, a roll of Scotch tape, and a moth that picked exactly the wrong relay to die in.
There is a funny video I think you need to see:

