Fact Cafe
81

The First Computer Bug Was an Actual Bug

Learn More

The First Computer Bug Was an Actual Bug

While the tale of an insect causing a computer error seems like a modern metaphor, it was a literal reality for the pioneers of computing. In 1947, the Harvard Mark II was a colossal machine, filling a room and relying on a complex system of electromechanical relays to make its calculations. Unlike today's solid-state devices, these physical switches were susceptible to environmental interference, including from insects. When a moth became trapped between the contacts of a relay, it physically obstructed the circuit, leading to a malfunction in the massive calculator. This tangible problem required a hands-on solution from the engineers, who had to physically locate and remove the winged culprit.

The team, which included computer science pioneer Grace Hopper, documented their findings by taping the moth into the machine's logbook with the playful note: โ€œFirst actual case of bug being found.โ€ While this event is famously credited with popularizing the term "debugging," the word "bug" had already been used by engineers for decades to describe flaws in a system. As far back as 1878, Thomas Edison referred to "Bugs" as small faults and difficulties in his inventions.

The 1947 incident, however, provided a literal and memorable example that cemented the terms "bug" and "debugging" into the lexicon of computer science. Grace Hopper herself was instrumental in sharing the story, which helped to popularize the terminology that is still fundamental to programming and software development today. The moth, preserved in the logbook at the Smithsonian National Museum of American History, serves as a reminder of the physical realities of early computing and the amusing origin of a now-ubiquitous technical term.