First Computer Bug Was Real
In this post
Every day, millions of people say the same small word: “bug”. The app crashed because of a bug. The game has a bug. The programmers are fixing the bug. We use the word so easily that nobody stops to ask where it came from.
Here is the surprising answer: the most famous computer bug in history was not a mistake in code at all. It was a real insect, with wings, found dead inside one of the world’s first great computers — and you can still see it today, taped to a page in a museum. This is the true story, including the part most people get wrong.
A Computer As Big As A Room
To understand the story, forget the phone in your pocket. In 1947, at Harvard University in the United States, stood the Harvard Mark II — one of the earliest computers ever built, and a giant of its age.
The Mark II weighed about 25 tons and spread across roughly 4,000 square feet of floor space, like a small hall filled with machinery. It did its mathematics with about 13,000 relays. A relay is a small mechanical switch: two metal contacts that meet to let electricity pass. The machine’s whole thinking depended on thousands of these little switches clicking open and shut in the right order.
That design carried a weakness. If anything — dust, a loose contact, or anything else — got between the two contacts of a relay, the electricity could not flow, and the calculation failed. And the laboratory had a living problem too: its windows had no screens, so insects drifted in at night, drawn by the warmth of the huge machine.
One September afternoon, a visitor flew in that the team would never forget.
The Afternoon The Computer Stopped
On 9 September 1947, the Mark II was running through tests when something went wrong. In those days there was no error message on a screen to read. Finding a fault meant walking the floor of the great machine, checking its parts one by one, until the guilty spot revealed itself.
At about 3:45 in the afternoon, the team found it. In Relay #70, on Panel F, sat a moth, stuck between the relay’s contacts, stopping the current as surely as a stone stops a door. The insect was removed, the relay could close again, and the machine returned to work.
Then somebody on the team did something wonderful. Instead of throwing the moth away, they taped it neatly onto the page of the machine’s logbook — the notebook where the operators recorded the day’s events. Beside the insect, they wrote the time and the details, and added a joke that would outlive everyone in that room: “first actual case of bug being found”.
The joke only works if you know one thing: engineers were already using the word “bug” for a fault in a machine. So finding an actual bug — a real, winged one — was comedy gold. This was not the birth of a word. It was a room full of tired engineers laughing at their own profession’s slang, and carefully saving the evidence.
No, Grace Hopper Did Not Find The Moth
Now for the honest correction, because this story is usually told wrong.
You may have heard that Grace Hopper — the brilliant mathematician and computer programmer who served on the Mark II team and later rose to become a rear admiral in the United States Navy — personally discovered the moth. It is a lovely version of the tale, but the evidence says otherwise.
The Smithsonian, which keeps the logbook, notes that the book was probably not Hopper’s. Britannica adds another quiet clue: the handwriting in the logbook does not appear to be hers. Who exactly pulled the moth out and taped it down? History never recorded the name. It was one of the machine’s operators, and that is all we honestly know.
But do not think Hopper’s fame in this story is false. Her role was different, and arguably bigger: she told the story. For years afterwards, in lectures and talks, she retold the tale of the moth with delight, and she and the rest of the Mark II team helped carry the words “bug” and “debug” deep into the everyday language of computer programmers. The moth needed a storyteller — and it found one of the best.
The Word Bug Is Older Than Computers
Here is the second surprise: the word “bug” was old long before any computer existed.
The Smithsonian points out that American engineers had been calling small flaws in machines “bugs” for more than a century. Back in the 1870s, the great inventor Thomas Edison was already talking about bugs in electrical circuits. In a letter from 1878, he used the word for a problem in the call apparatus of his telephone. A few years later, a newspaper story described Edison hunting a “bug” in his phonograph. The word even earned a place in a supplement of the Oxford English Dictionary.
So when the Harvard team opened that relay in 1947, they were not inventing a term. They were using slang their grandfathers’ generation of engineers would have understood instantly. The moth did not create the word “bug”. What it created was the word’s most famous story — a story so good that the true, older history of the word is often forgotten beside it.
Where The Moth Lives Now
Most insects live a few weeks and vanish. This one became a museum treasure.
The logbook page, with the moth still taped to it, is held today by the Smithsonian’s National Museum of American History in Washington, D.C. — the same institution that preserves some of the most important objects in the nation’s past. The little insect lies there still, wings and all, next to the handwritten words that made it immortal.
Think about what that page really is. It is not proof that computer words began that day — they did not. It is a snapshot of the exact moment when the young world of computing showed its human side: careful records, honest logging, and a joke shared at the end of a long afternoon. Historians value it not as the first use of a word, but as the most charming piece of evidence in the word’s long life.
Why We Still Say Bug And Debug Today
After 1947, the words settled in for good. “Bug” became the standard name for any fault in a machine or a program, and “debug” — removing the bug — became the everyday word for hunting down errors and fixing them. The Smithsonian credits the Mark II team, Hopper among them, with helping to popularise both terms among programmers.
So the next time your phone freezes and someone says “it’s a bug”, spare a thought for the original. Not a line of broken code, not a hacker’s trick — just one unlucky moth, in the wrong relay, on an autumn afternoon in 1947, in a computer the size of a room. It stopped a giant machine, made a room of engineers laugh, and earned a place in a museum that kings’ crowns would envy.
Every bug found since then — and there have been billions — carries a faint echo of that small, taped-down insect.
Frequently Asked Questions
Did Grace Hopper invent the word “bug”? No. Engineers, including Thomas Edison in the 1870s, used “bug” for machine faults long before computers. Hopper did not find the famous moth either — but she retold its story for years, which helped make “bug” and “debugging” everyday words in computing.
When was the first real computer bug found? On 9 September 1947, at about 3:45 in the afternoon, when operators of the Harvard Mark II found a moth stuck in Relay #70, Panel F, and taped it into the logbook.
Where is the moth now? The logbook page with the moth taped to it is kept by the Smithsonian’s National Museum of American History in Washington, D.C.
What does “debugging” mean? It means finding and removing the faults — the “bugs” — that stop a machine or a program from working correctly. Programmers use the word every day, all over the world.
Was the moth really the first computer bug? It was the first famous actual insect found causing trouble in a computer, and the team joked about exactly that in the logbook. Faults called “bugs” existed long before; this was simply the first time the bug had wings.
Sources
- Smithsonian National Museum of American History, “Log Book With Computer Bug”: http://americanhistory.si.edu/collections/search/object/nmah_334663
- Encyclopaedia Britannica, “Today in History September 9 — 1947, Computer Bug, & Harvard Mark II”: https://www.britannica.com/today-in-history/September-9-The-First-Literal-Computer-Bug
- The picture on this page is an original illustration made for Talha M Blog.