- Ozum Five 🖐
- Posts
- Is the first computer bug a real-life bug?
Is the first computer bug a real-life bug?
Since my life has been full of ‘Bugs & Fixes’ lately, I decided to find the first ever computer bug!
Ironically or shall I say literally, the first literal computer bug in the history of computers was a real-life moth. In 1947, an actual moth stuck in the relay of the Mark II computer at Harvard University caused the computer to malfunction.

Grace Hopper, a renowned computer programmer at Harvard, was part of the team that discovered the moth. They removed and taped it into their logbook, noting it as the “First actual case of a bug being found.”
The First “Computer Bug” Moth was found trapped between points at Relay # 70, Panel F, of the Mark II Aiken Relay Calculator at Harvard University, on September 9, 1947
They joked that this was the first case of real “debugging,”. Even though the terms “bug”, and “debugging,” had already been used in engineering, this moth incident became a famous story.
People mistake Grace Hopper as the one who found the bug, but it is one of her team members. She also didn’t coin the terms ‘bug’ or ‘debug’.
But, the moth found in 1947 is not the first bug!
Thanks to Hopper's team, it is the first documented case of a literal moth being found. But computer bugs have been around since the very first computers.
Ada Lovelace, the world’s first computer programmer, worked on Charles Babbage’s Analytical Engine in the 1840s. She wrote the instructions for the Analytical Engine to calculate Bernoulli numbers, now regarded as the world’s first algorithm.

Diagram of an algorithm for the Analytical Engine for the computation of Bernoulli numbers, from Sketch of The Analytical Engine Invented by Charles Babbage by Luigi Menabrea with notes by Ada Lovelace
Since Babbage’s Analytical Engine was never built completely, her algorithm was never run in her lifetime. However, there’s speculation that had her algorithm been executed on a working machine, it might have contained logical errors — thus, possibly making her responsible for the first “software bug,” though it would have been more theoretical than literal.
NOTE: Ada Lovelace’s algorithm has been run in modern times! Since the Analytical Engine was never built fully during her lifetime, her algorithm wasn’t tested back then. However, in the 20th and 21st centuries, computer scientists and historians of computing have re-created versions of the Analytical Engine in software, allowing Lovelace’s algorithm to be executed.
When tested on modern systems, it was found that there were indeed small errors in her Bernoulli number algorithm. These errors were minor, primarily due to manual transcription or logical mistakes.
But, she never called it a ‘bug’ because the term “bug” wasn’t used in her time in the 1840s.
The term “bug” was FIRST used by Thomas Edison to describe problems or malfunctions in his electrical devices in the late 1800s. In his 1876 notes on his lighting inventions, one of his entries reads, “Awful lot of bugs still.” Two years later, in an 1878 letter to his associate, Edison described an error in his quadruplex telegraph system as a “bug,” marking one of the earliest known uses of the term about a mechanical or system flaw. He continued to use “bug” to describe design or operational flaws in his inventions.

Thomas A. Edison’s letter to Western Union President William Orton, 1878. Courtesy of Swann Auction Galleries
To sum up,
Ada Lovelace’s work had the first conceptual software bug even before the coining of the term ‘bug’ by Edison. And Grace Hopper’s team debugged the first literal bug, which is more of a hardware bug that circulated as a joke of the ‘first actual case of bug being found‘.
End notes
While I stare at the screen trying to fix the bugs, I cannot but admire the women in computer history:
Ada Lovelace, the first computer programmer wrote the very first algorithm with minimal ‘conceptual bugs’. The fact that Lovelace anticipated concepts like loops, conditional logic, and computation far before modern computers existed is a testament to her genius. Her work remains highly respected, even with these small bugs, because it laid the foundation for future programming.
Grace Hopper is one hell of a woman. And it’s worthy to mention her contributions here beyond the moth incident:
She invented the first compiler, which is a program that translates high-level programming languages into machine code.
She was one of the primary developers of COBOL (Common Business-Oriented Language), a programming language specifically designed for business applications.
She reached the rank of Rear Admiral in the US Navy later in her career after her extensive contributions to computing and her service during and after World War II.
![]() Watercolour portrait of Ada King, Countess of Lovelace | Grace Hopper holding a COBOL manual |
✌ Peace out