Machine Moth
A Dead Insect Gave Debugging Its Perfect Mascot
On September 9, 1947, operators working on Harvard’s Mark II found a moth trapped in a relay. They taped it into the logbook and wrote, with obvious satisfaction, “first actual case of bug being found.” The joke landed because the word bug was already old engineering slang for a fault. What the moth did was give the computer age a perfect physical emblem for an invisible kind of frustration.
The term had been circulating since at least the 1870s, when Thomas Edison used bug for flaws in electrical work. By the 1940s, the engineers and programmers around Howard Aiken’s Harvard lab were already dealing with faults in relays, wiring, and instructions. The Mark II incident in 1947 did not invent the term, and the Smithsonian notes that the logbook probably was not Grace Hopper’s. But Hopper was on the Mark II team, and she later helped popularize both bug and debug across the growing world of programmers.
That timing mattered. Early computers were temperamental machines, and after World War II they were spreading from military and research labs into a broader technical culture. As systems became larger and programming became a specialized job, people needed a shared language for tracking what had gone wrong and how to fix it. Debugging scaled because it was short, concrete, and portable: it worked whether the problem was a jammed relay, a wiring mistake, or bad instructions in code. The moth story made the term memorable, but the real adoption mechanism was a fast-growing community of engineers and programmers reusing the same word across many kinds of failure.
The insect in the logbook is funny, but the deeper reason it survived is that it captured a permanent truth about computing: the machine can be brilliant and still fail for tiny, stupid reasons. Modern bugs are rarely literal, yet every developer still inherits the same ritual of hunting, isolating, and fixing them.
Craving more? Check out the source behind this Brain Snack!


