On September 9, 1947, a team of computer scientists and engineers operating Harward University’s Mark II electromechanical computer started getting an error. They traced the error and found a moth trapped in a relay. The moth was carefully removed and taped to the logbook with a note saying “first actual case of bug being found”. Urban legend says this was the first case of a computer bug and that even the term ‘debugging’ comes from this incident, but that’s not true.
The first “actual” computer bug
Contrary to popular belief, this “moth” was not the first computer bug. Programmers started making mistakes and creating “bugs” just from the very beginning.
The concept that software might contain errors dates back to Ada Lovelace’s 1843 notes on the analytical engine, in which she speaks of the possibility of program “cards” for Charles Babbage’s analytical engine being erroneous:
“… an analyzing process must equally have been performed in order to furnish the Analytical Engine with the necessary operative data, and that herein may also lie a possible source of error. Granted that the actual mechanism is unerring in its processes, the cards may give it wrong orders.”
Ada Lovelace (10 December 1815 – 27 November 1852) was an English mathematician and writer, chiefly known for her work on Charles Babbage’s proposed mechanical general-purpose computer, the Analytical Engine.
The term “computer bug” was NOT inspired by the 1947 Harward Mark II moth incident
The term “software bug” or “computer bug” was NOT inspired by the Harward Mark II moth event. It’s a myth.
The term “bug” (or the term computer bug/software bug, and the term “debugging”) was not created after that event. The concept of “bugs” in mechanical systems predates electronic computers and was used to describe malfunctions or glitches in hardware and machinery.
Even the word itself (bug) probably originates from the Medieval-English word “bugge”, meaning a “Hobgoblin” – which is a mischievous kind of imp who takes joy in screwing up machinery and causing trouble of all kinds.
The term “bug” was used by engineers to describe flaws or problems in mechanical systems as early as the 19th century. Thomas Edison is known to have referred to bugs in electrical circuits in the late 1800s. In an 1878 letter, Edison wrote about “bugs” in his inventions, referring to the difficulties and issues encountered during the engineering process.
In that letter, the English lawyer, judge, politician, and author Thomas Hughes (20 October 1822 – 22 March 1896), who was quoting Thomas Edison, wrote:
“I have the right principle and am on the right track… [it is] then that “Bugs” — as such little faults and difficulties are called — show themselves and months of intense watching, study, and labor are requisite before commercial success or failure is certainly reached.”
So we know that Thomas Edison used the term in exactly the modern sense and that the word was already known in technical circles way before the Mark II moth incident.
Also, the note saying ‘First actual case of bug being found‘ wouldn’t make sense unless the term “bug” was already in use. The word ‘actual’ is key here.
That famous note, ‘first actual case of bug being found’, was written by Grace Hopper (December 9, 1906 – January 1, 1992), the American computer scientist, mathematician, and United States Navy rear admiral.
Grace Hopper was a pioneering American computer scientist, mathematician, and a United States Navy rear admiral. She is best known for her work on the Harvard Mark I computer during World War II and for developing the first compiler, a fundamental step in the evolution of computer programming.
Hopper’s visionary work led to the creation of COBOL, a widely used programming language. Her contributions significantly advanced computer technology and programming languages.
Hopper was renowned for her advocacy of machine-independent programming languages, which revolutionized software development. She received numerous accolades, including the Presidential Medal of Freedom posthumously in 2016.
Sources
- “September 9, 1947, CE: World’s First Computer Bug” on the National Geographic website
- “First Instance of Actual Computer Bug Being Found” on the Computer History website computerhistory.org
- “The very first recorded computer bug” on The Next Web website
- NH 96566-KN The First “Computer Bug” on the Naval History and Heritage Command website
- Senior Software Engineer Steve Baker‘s answer to the question “Is it really true that the term “software bug” was inspired by a true event when a moth created a computer glitch?” on Quora
- Software bug on Wikipedia
- Grace Hopper on Wikipedia