Skip to content
Why Is It Called 'Bug'? — The Origin of the Term

Why Is It Called 'Bug'? — The Origin of the Term

DodaTech Updated Jun 20, 2026 3 min read

The Story

It’s September 9, 1947, at Harvard University. The Mark II electromechanical computer — a room-sized behemoth of relays and wires — is malfunctioning. Operators open the panel and start poking around. What they find would become programming legend: a moth, trapped in Relay #70, its delicate wings preventing the contacts from closing.

Commander Grace Hopper and the team carefully remove the moth and tape it into the logbook with the now-famous entry: “First actual case of bug being found.” They had literally debugged the machine.

But here’s the twist — the term “bug” didn’t start with Hopper or the moth. Decades earlier, Thomas Edison used “bug” to describe mechanical defects in his phonographs and light bulbs. In an 1878 letter, Edison wrote: “It has been just so in all of my inventions. The first step is an intuition, and comes with a burst, then difficulties arise — this thing gives out and then that — ‘Bugs’ — as such little faults and difficulties are called.”

Even the word “debug” predates computing. The Oxford English Dictionary records “debug” used in the context of removing insects from aircraft engines in the 1940s and from vacuum tubes in the 1930s.

How It Evolved

That moth in the Mark II logbook gave the computing world a perfect origin story. While “bug” was already in use among engineers, the tale of the literal moth cemented “debugging” as the universal term for fixing software problems. By the 1960s, debugging was standard jargon in every programming manual. Grace Hopper, who went on to become a rear admiral and pioneer compiler technology, loved telling the moth story at lectures.

Today, the original logbook page — complete with the taped moth — is preserved at the Smithsonian Institution’s National Museum of American History. It’s one of the most famous artifacts in computing.

Did You Know?

The Mark II logbook entry is dated September 9, 1947, and the moth is still attached to the page with yellowed tape. The entry appears on page 31 of the logbook. The operators who found it wrote: “Relay #70 Panel F (moth) in relay. First actual case of bug being found.”

FAQ

Did Grace Hopper actually coin the term 'bug'?
No. She popularized it by literally finding a moth, but “bug” was already used by engineers and even Thomas Edison to describe mechanical faults. What she did was give the computing world its most famous debugging story.
Was the moth really the first computer bug?
Electromechanical bugs existed before — but this was the first case documented as a bug in a computer logbook, and it’s the one that stuck in computing folklore.
Where is the original moth today?
The Smithsonian National Museum of American History in Washington, D.C. holds the Mark II logbook with the moth still taped to the page.

Related Etymologies

Why Is It Called 'Debug'? Why Is It Called 'Patch'?

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro