The encyclopedia · Software & IT · Technical decision · 1947
The first computer 'bug' was a real moth — and it taught engineers to check the hardware
In 1947, a moth was found trapped in a relay of the Harvard Mark II computer. Grace Hopper taped it into the logbook. The term 'debugging' was born.
Harvard University · US Navy · 1947-09-09
What happened
On September 9, 1947, operators of the Harvard Mark II computer found a moth trapped in a relay, causing the machine to malfunction. Grace Hopper, a pioneer of computer programming, taped the moth into the logbook with the note 'First actual case of bug being found.'
The incident was not the first use of the term 'bug' for a technical malfunction — Thomas Edison had used it decades earlier — but it became the most famous. The logbook entry, preserved at the Smithsonian, is a landmark in computing history and a reminder that the most sophisticated systems can be brought down by the simplest physical problems.
The case is often cited as a 'lucky mistake' — a serendipitous discovery that became part of computing culture. But it also carries a lesson: when a complex system fails, check the physical layer first. The most elegant software in the world cannot compensate for a moth in the relay. The hardware is the foundation, and the foundation is where the bugs hide.
Why it happened
- A moth trapped in a relay caused the Harvard Mark II to malfunction.
- The incident became the most famous example of a physical 'bug' in computing history.
- Grace Hopper's logbook entry coined the popular usage of 'debugging.'
- The case reminds engineers to check the physical layer when complex systems fail.
The lesson
When a complex system fails, check the physical layer first. The Mark II was brought down by a moth, not a code error. The foundation is where the bugs hide — literally.
Aftermath
The logbook entry is preserved at the Smithsonian. The term 'debugging' became standard in software engineering. The case is cited as a reminder that hardware and software are inseparable, and that the simplest explanation is often the right one.
Sources
- Grace Hopper — Wikipedia (Harvard Mark II, bug)
- Grace Hopper — Linda Hall Library (Scientist of the Day)
spotted an error? The club wants to know.
More like this
A software change took Verizon's 5G core down 10 hrs — 2M lost calling, texting and 911
Meta's 'designed for privacy' glasses shipped users' intimate footage to Kenya reviewers
Microsoft 365 falls for five hours after a maintenance bug cut West US off the network
Somewhere, someone solved the problem this company failed at. 2nd Opinion →

Comments · 0
Sign in to join the comments.