The Origin of the Term 'Bug'

Posted on June 11, 2025

The term "bug" for a computer glitch has a fascinating history that predates electronic computers. While many know the story of Grace Hopper finding a moth in the Harvard Mark II computer in 1947, the term's origins go back much further. Thomas Edison used "bug" to describe technical problems in the 1870s, and it appeared in engineering contexts throughout the early 20th century.

The famous moth incident occurred on September 9, 1947, when operators of the Harvard Mark II found a moth trapped in a relay, causing the machine to malfunction. Grace Hopper, who worked on the machine, didn't discover the moth but was present when it was found. The operators taped the moth into their logbook with the annotation "First actual case of bug being found." This playful note acknowledged that while they'd been using "bug" metaphorically, here was a literal bug causing problems.

What made this incident memorable wasn't that it originated the term, but that it provided a perfect physical specimen of a "computer bug." The logbook page, complete with the moth still taped to it, is now in the Smithsonian Museum of American History. Hopper became an enthusiastic popularizer of the story, helping cement "bug" and "debugging" in computer terminology.

The persistence of "bug" in our technical vocabulary speaks to its usefulness. Unlike "error" or "defect," which sound clinical and judgmental, "bug" suggests something that crawled in from outside - a mischievous gremlin rather than a fundamental flaw. This psychological distance can be helpful; debugging becomes a hunt for an invader rather than an admission of failure. The term has spawned an entire vocabulary: bug reports, bug tracking, bug bounties, and the ever-optimistic "it's not a bug, it's a feature.