The computer bug is one of tech’s most used phrases. But most people have no idea it started with a real, dead insect. Not a metaphor. An actual moth. Taped into a logbook. In 1947. That’s the kind of origin story that sounds too strange to be true — but it is.
The Computer Bug That Started Everything
On September 9, 1947, engineers at Harvard University were running the Mark II computer. It was enormous. The machine filled an entire room. Then something went wrong. The computer threw an error. The team started checking the hardware relays one by one.
A Moth Changes Tech History
Inside Relay 70 of Panel F, they found it. A moth. It had flown into the machine. It got crushed between the relay contacts. That tiny insect was causing a real malfunction. The team pulled it out with tweezers. Then they taped it into the official logbook.
Someone wrote next to it: “First actual case of bug being found.” That line is still visible today. The logbook is kept at the Smithsonian National Museum of American History. You can see the moth. You can see the handwriting. It’s extraordinary.
Grace Hopper’s Role in the Story
Grace Hopper was one of the engineers in that room. She’s often credited with finding the moth. However, historians now think the actual discovery was a team effort. Still, Hopper loved telling the story. She repeated it for decades in speeches. She helped burn “debugging” into the global tech vocabulary. That’s a legacy worth knowing about.
The word “bug” for a technical fault actually predates Hopper. Thomas Edison used it in 1878. He described engineering glitches as “bugs in my inventions.” But the Harvard moth gave the word a physical, unforgettable anchor. It turned a loose metaphor into a certified moment.

Why This Story Still Matters in Tech Today
It’s tempting to treat this as a cute bit of trivia. But it’s actually much more than that. The moth incident reveals something important about early computing culture. Engineers documented everything. They were rigorous and oddly funny at the same time.
The Logbook as a Design Artifact
Think about that logbook for a second. Someone decided to tape the bug in rather than throw it away. That choice feels instinctive to modern tech workers. But in 1947, computers were so new that nobody had written the rules yet. The engineers were inventing documentation as they went. That casual, curious spirit shaped how tech teams write reports to this day. You see it everywhere now — from GitHub issues to internal post-mortems. The culture of logging problems started somewhere. It started here.
Debugging Becomes a Global Language
Today, “debugging” crosses every language barrier in software. Developers in Tokyo, Lagos, and São Paulo all use the word. It means the same thing everywhere. Few terms in any field have spread that cleanly across cultures. That’s a remarkable reach for one dead moth in a relay panel.
The phrase also changed how we think about errors. A “bug” sounds almost forgivable. It implies something sneaked in. It frames problems as external intruders rather than human mistakes. That framing matters. It makes teams less defensive and more curious when something breaks. So the language itself became a design tool for building better teams. Not bad for a moth that wandered into the wrong machine on a Tuesday in Massachusetts.
At KREAblog, we think the best tech history stories always have a physical object at the center. The moth is proof. It’s tactile, weird, and completely real.
What Came After the First Bug
The Mark II kept running after the moth was removed. The team moved on. But the word they used that day kept growing. By the 1950s, “bug” and “debug” appeared in technical manuals. By the 1960s, they were standard across the industry. Today there are entire disciplines built around the concept. Bug bounty programs pay millions of dollars each year. Companies run public bug-reporting platforms. Some researchers make their whole careers finding bugs in live systems.
The Moth’s Surprising Legacy in AI
Here’s a twist most people miss. The very concept of debugging shaped how AI systems get built now. Modern machine learning engineers talk about “debugging models.” That’s not traditional code. There are no moths. But the mental model — hunt for the flaw, isolate it, log it — comes directly from that 1947 mindset. The moth’s ghost is inside every AI pipeline running today. That’s wild to think about.
So next time a developer says their code has a bug, remember the original one. It had wings. It weighed almost nothing. And it accidentally became one of the most important metaphors in all of technology. Some things earn their place in history with a bang. This one did it with a tiny, silent flutter in a relay switch.
This article is for informational purposes only.












