Today, when software crashes or an app stops responding, we casually say there’s a “bug” in the system. But few people know that the term computer bug comes from a real-life incident involving an actual insect. Long before modern laptops and smartphones, a tiny moth found its way into an early computer and earned a permanent place in technology history.
Computing in the Age of Giant Machines
In the 1940s, computers were massive machines that filled entire rooms. They were built using vacuum tubes, relays, and miles of wiring. One such machine was the Harvard Mark II, an electromechanical computer used by the U.S. Navy for complex calculations.
Unlike today’s computers, these early machines were sensitive to environmental conditions. Even a small disruption could cause errors, making troubleshooting a time-consuming task.
The Bug That Started It All
On September 9, 1947, operators working on the Harvard Mark II noticed a malfunction. After investigating the issue, they discovered the cause: a moth trapped inside one of the machine’s relays. The insect had interfered with the computer’s operation, causing it to stop working correctly.
The team carefully removed the moth and taped it into the machine’s logbook. Next to it, they wrote the now-famous note: “First actual case of bug being found.” This moment officially linked the word “bug” with computing errors.
Grace Hopper and the Birth of a Tech Term
The logbook entry was associated with Grace Hopper, a pioneering computer scientist and U.S. Navy rear admiral. While she didn’t coin the term “bug,” she helped popularize it in computing culture. Engineers had used the word “bug” to describe mechanical problems before, but this incident made the term iconic in the digital world.
From that point on, debugging became a standard term for identifying and fixing errors in computer systems.
From Moths to Modern Software BugsToday’s bugs are no longer insects but lines of faulty code. Software bugs can cause anything from minor glitches to major system failures. Yet, the concept remains the same: identifying what went wrong and fixing it.
Modern programmers spend a significant portion of their time debugging, using advanced tools and testing methods. Despite all the technological progress, the term still reminds us of computing’s humble and somewhat humorous beginnings.
Why This Story Still Matters
The story of the first computer bug is more than just trivia. It highlights how early computing pioneers worked through unexpected challenges with creativity and documentation. It also serves as a reminder that technology evolves through trial, error, and learning.
This historic moment humanizes the world of technology and shows that even groundbreaking innovations can be disrupted by the smallest, most unexpected factors.

