The term “bug” is likely familiar to you, as it is commonly used in relation to computer errors. While you may know its meaning, have you ever wondered why it became associated with computer issues?
Let’s delve into the fascinating origins of the first “bug” in history and explore why it earned this intriguing moniker. Every detail holds significance, and the explanation is more logical than you might imagine.

The Harvard Moth
The origin of the term “bug” can be traced back to the year 1947 when a group of engineers was working on the Mark II computer at Harvard University. Everything was progressing smoothly until the computer suddenly shut down unexpectedly. They were faced with an unusual problem, and they humorously referred to it as a “bug.” But why did they choose this term?
The issue was not due to a programming or human error but rather the presence of an actual insect. A moth had found its way into the computer room and inadvertently caused a disruption. It flew into one of the computer’s relays, becoming trapped and resulting in the computer malfunctioning. The engineers discovered the moth and taped it to the logbook, noting it as the first recorded instance of a computer bug. This incident gave birth to the term “bug” being used to describe computer errors and glitches.
So, the association between a computer error and the term “bug” originated from this peculiar incident involving a moth causing a disruption in the Mark II computer.

After the moth was removed, it was preserved and pasted into a logbook alongside the caption “First actual case of bug being found.” This incident marked a significant turning point, leading to the use of the term “bug” to describe programming or computer errors. Interestingly, this term has transcended the realm of computing and is now commonly used to refer to any kind of problem or glitch, even outside the context of technology. Who could have imagined that a simple moth would have such a lasting impact on how we perceive and address errors?
Furthermore, it’s important to note that the computer in question, the Mark II, was vastly different from the computers we know today. It weighed a staggering 25 tons, and its cables occupied an enormous 370 square meters. Given its size and complexity, it was not entirely surprising for a moth to find its way onto the machine. What was remarkable, however, was the engineers’ ability to identify and locate the insect amidst the multitude of machines present.
To this day, programs designed to identify and resolve errors within computer systems are officially referred to as “debuggers,” further emphasizing the lasting legacy of that fateful moth encounter.

Indeed, it is a fascinating case that gives meaning to a word we frequently use without knowing its origin. From now on, whenever you hear the word “bug,” you’ll recall the story behind it.
The logbook containing the preserved moth has found its home in the collection of the Smithsonian Institution’s National Museum of American History in Washington. Each year, thousands of visitors have the opportunity to see the moth, still intact, nestled within the pages. It has become one of the most renowned bugs in the world simply for the fact that it met its demise inside a computer.
According to the book, the official date of the incident is noted as September 9, 1947, at 3:45 p.m. It remains unclear why the engineers decided to preserve the bug. After all, it was merely an error caused by an insect, an occurrence that likely wasn’t the first of its kind in the world. However, these young engineers found amusement in the situation and unknowingly marked the future significance of this first recorded bug.
The story of the moth serves as a reminder of how unexpected events can leave a lasting impact, shaping the language and practices of an entire industry. It is a testament to the serendipitous moments that shape our understanding and propel us forward in unforeseen ways.