Who found the first computer bug

Buggy Brilliant

We’ve all heard of computer ‘bugs’. It’s an error, flaw or failure in a piece of software that stops Jet Set Willy from loading or makes that nice picture of some ducks look like a naked person, even though you were definitely downloading a nice picture of some ducks. But today was the day that the first ever computer bug was discovered. It was 1947 and Harvard’s Mark II electromechanical computer was having some problems. Eventually engineers found that a dead moth was gumming up the works. An actual computer bug. The incident was logged by early computer pioneer and all-around genius Grace Hopper, who didn’t actually refer to it as ‘debugging’. But from then on computers and bugs went together like jelly and ice-cream. The actual moth was taped into the lab’s log books and can now be seen in the Smithsonian Institution's National Museum of American History. Could it be the most famous moth in history? Come on moths, time to take up the mantle and make a name for yourself. Don’t let this moth take all the glory.

Nominate this object for photography.   

Our collection database is a work in progress. We may update this record based on further research and review. Learn more about our approach to sharing our collection online.

If you would like to know how you can use content on this page, see the Smithsonian's Terms of Use. If you need to request an image for publication or other use, please visit Rights and Reproductions.

Note: Comment submission is temporarily unavailable while we make improvements to the site. We apologize for the interruption. If you have a question relating to the museum's collections, please first check our Collections FAQ. If you require a personal response, please use our Contact page.

Who found the first computer bug
Ever wondered where the term ‘bug’ came from? Well, on September 9, 1945, U.S. Navy officer Grace Hopper found a moth between the relays on the Harvard Mark II computer she was working on. In those days computers filled (large) rooms and the warmth of the internal components attracted moths, flies and other flying creatures. Those creatures then shortened circuits and caused the computer to malfunction.

The term ‘bugs in a computer’ had been used before, but after Grace Hopper wrote in her diary “first actual case of bug being found” the term became really popular, and that’s why we are still using it today.

If you have a few minutes left, check her Wikipedia profile. Hopper was one of the first computer geeks in the world and went on to create the first compiler for a computer programming language and worked on the development of COBOL. She also coined the phrase “It’s easier to ask forgiveness than it is to get permission.”

Next time your computer or smartphone crashes and you suspect a bug, think back to this image:

Who found the first computer bug

UPDATE: Graham Cluley notes in the comments here that although Hopper was involved in the story she didn’t actually find the moth. From Wikipedia:

Hopper was not actually the one who found the insect, as she readily acknowledged. The date in the log book was September 9, 1947, although sometimes erroneously reported as 1945. The operators who did find it, including William “Bill” Burke, later of the Naval Weapons Laboratory, Dahlgren, Virginia, were familiar with the engineering term and, amused, kept the insect with the notation “First actual case of bug being found.” Hopper loved to recount the story. This log book, complete with attached moth, is part of the collection of the Smithsonian National Museum of American History, though it is not currently on display.
While it is certain that the Harvard Mark II operators did not coin the term “bug”, it has been suggested that the incident contributed to the widespread use and acceptance of the term within the computer software lexicon

In 1947, engineers working on Harvard University’s Mark II computer found a bug gumming up the works—a moth had squeezed into one of the machine’s components. After extracting it, somebody taped it to the log book with the caption “first actual case of a bug being found.” That log book, with moth intact, is in the collection of the Smithsonian Institution’s National Museum of American History today. Scholar Fred R. Shapiro describes what supposedly happened next:

“The moth is said to have inspired the scientists to speak from then on of debugging the computer, with bug originating as the later back-formation from debug.”

So “debug” and “bug” were bits of computer slang that were eventually adopted by the larger culture. It’s a great story—but not very etymologically correct.

The story has been nearly canonized by the presence in the lab of Grace Murray Hopper, a pioneering computer scientist who retired with the rank of Rear Admiral in the US Navy. Some have attributed the naming of the first computer bug to her: the Annals of the History of Computing described it as “Grace Murray Hopper’s famous ‘bug’ story” in a 1981 article, “The First Bug.” Others have been more cautious, suggesting she “likely made the incident famous.” The Smithsonian’s description of the item notes that the log book “was probably not Hopper’s.”

There’s also a letter, written by Edison in 1878, in which he refers to “‘Bugs’ as such little faults and difficulties are called.”

The real bug in this narrative, as Shapiro points out, is that “bug” in this sense actually goes back to the late nineteenth century. The Supplement to the Oxford English Dictionary’s fourth definition of the noun “bug” reads “a defect or fault in a machine, plan, or the like.” The OED cites the March 11, 1889, Pall Mall Gazette as a source: “Mr [Thomas] Edison… had been up the two previous nights discovering a ‘bug’ in his phonograph—an expression for solving a difficulty, and implying that some imaginary insect had secreted itself inside and is causing all the trouble.”

And then there’s also a letter, written by Edison in 1878, in which he refers to “‘Bugs’ as such little faults and difficulties are called.” By the publication of the 1934 Webster’s New International Dictionary, the third definition for the noun bug was: “a defect in an apparatus or its operation.”

Computer people adopted a term in use for more than half a century and brought it into the digital world. The wording in the Harvard log book—“first actual case of a bug being found”—suggests the computer programmers and engineers there were already quite familiar with the time-honored usage and were remarking on the novelty of finding an actual insect bugging up the computer. “Debug,” by the way, was also used in an 1945 issue of the Journal of the Royal Aeronautical Society, which Shapiro takes to suggest it was “probably preceded by several years of oral use in engineering slang.”

Nevertheless, etymological folklore, as Shapiro notes, is “remarkably persistent.” The Harvard lab log book, after all, is in the National Museum of American History, even with its caveats. Fanciful word-stories can overcome “lack of documentation, lack of plausibility” and “even outright disproof” to become popular legend.

It may be, however, that folk etymology has nothing on folk entomology. To the general public, bug is synonymous with insect. To an entomologist, a bug is more specifically a member of the insect order Hemiptera (“half-winged”), which includes cicadas, aphids, hoppers, shield bugs, and bed bugs. The Mark II “bug,” on the other wing, was a moth, part of the insect order Lepidoptera (“scale-winged”).

Support JSTOR Daily! Join our new membership program on Patreon today.

Who found the first computer bug

JSTOR is a digital library for scholars, researchers, and students. JSTOR Daily readers can access the original research behind our articles for free on JSTOR.