The most famous insect in computing is still fixed to the page where someone made it a joke. On September 9, 1947, a Harvard Mark II operator recorded a failure at 3:45 p.m.: “Relay #70 Panel F (moth) in relay.” Beneath the specimen, held down by ambered tape, someone wrote the punch line: “First actual case of bug being found.”[1][2][5]
That word actual is the hinge of the story. If the moth had inspired a brand-new name for machine faults, there would have been no reason to call it an actual bug. The joke worked because the Mark II team already spoke of bugs that were not insects. For once, the metaphor had acquired wings.
The familiar origin story reverses that sequence. In its cleanest version, Grace Hopper finds a moth in a computer, calls it a bug, and invents “debugging” on the spot. Almost every piece of that sentence rests near something true: the moth was real; it did stop a relay machine; Hopper worked with the Mark II team; and she repeatedly told the story. What fails is the claim of coinage. The artifact records neither the first engineering bug nor the first computer bug. It records the day an old technical metaphor became physical—and unusually easy to photograph.
The myth: one insect supplied computing with a word
Origin stories like a first moment, a visible object, and one recognizable protagonist. The moth offers all three. It survives as a brown body on blue graph paper, surrounded by times, test results, crossed-out figures, and the ordinary handwriting of machine work. Hopper, one of the foundational figures of programming, gives the episode a name readers already know.
But the current Smithsonian catalog is more careful than the legend. It says that engineers working on the Mark II found the moth and that the volume was probably not Hopper’s personal logbook. Hopper was among the people working on the machine, and she and the team helped popularize bug and debug in computing.[1] That is a strong historical contribution. It is different from inventing both words after personally extracting the insect.
Hopper’s own 1968 oral-history account also uses the plural. The Mark II room had unscreened windows; insects came in at night; when the machine stopped, “we” went looking and “we” found the moth, removed it, and put it in the log.[4] A retrospective interview cannot identify the hand that wrote each line in 1947, but its grammar preserves the social unit that the one-genius version erases: a crew operating, testing, joking, and diagnosing together.
The evidence begins decades before the moth
Technical bugs were already crawling through telegraphy in the nineteenth century. The Thomas Edison Papers project traces a documented use to the journal Operator on September 15, 1875, where a flaw in a telegraph system was called the largest bug yet discovered. Edison’s surviving notebooks use bug for technical trouble in 1876; letters from 1878 apply it to telephone and lighting problems. In one of them, he glossed bugs as “little faults and difficulties,” wording that assumes the term already needs explaining outside the workshop but not inventing inside it.[3]
The metaphor was useful because it was imprecise. A bug could name a fault before anyone knew whether its cause lay in a component, a connection, a setting, or an operator’s instruction. It made trouble sound findable: something small had entered the system and could be chased out. By 1889, electrical dictionaries were defining the word as a fault in apparatus.[2][3]
That language reached Harvard before the Mark II existed. Computer historian Peggy Aldrich Kidwell found an April 17, 1944 entry in physicist Robert Campbell’s Mark I logbook noting that an IBM engineer had come to help find “bugs.” Hopper arrived at Harvard that July. Materials associated with her later referred to a “debugging note to operators,” to errors in mathematics, and to “tape bugs” pursued by Ensigns Richard Bloch and Robert Campbell.[2][6]
Those records remove the possibility that the 1947 moth created the team’s vocabulary. They also reveal what bug already covered in early computing. The Mark I and Mark II used thousands of electromechanical relays; instructions arrived on punched paper tape, while data could come from cards or switch settings. A bad connection, damaged tape, wrongly set switch, mathematical error, or faulty component could all produce an incorrect or halted run.[2] Debugging was never only insect removal. It was the work of locating a failure across machine, medium, instruction, and human procedure.
What happened at 3:45 p.m. on September 9
The Mark II was being built and tested at Harvard for the U.S. Navy before its transfer to Dahlgren, Virginia. On the afternoon preserved in the log, operators were running tests on the arithmetic units when the machine stopped. Their search reached relay 70 in panel F, where the moth had obstructed the contact. They removed the moth, taped it to the page, resumed testing, and shut down at 5 p.m.[2][5]
The page matters because it retains sequence rather than just souvenir. Above the insect sit earlier relay trouble and changed numerical results. Below it, the test restarts. The moth is not a mascot pasted into an otherwise ceremonial book; it occupies the same record as diagnosis, removal, and resumed operation. The artifact shows debugging as maintenance under time.
It also preserves the crew’s sense of humor. “First actual case” does not claim priority for a word. It stages a collision between two meanings of one already familiar word. The technicians had spent years pursuing figurative bugs through relays, tapes, and calculations. At 3:45, one of the bugs happened to be zoological.
Even the date became vulnerable to the power of the anecdote. Hopper later placed the episode in the summer of 1945, and that year circulated widely. Kidwell notes the mechanical problem with the memory: full-scale construction of the Mark II did not begin until roughly the spring of 1946. The logbook and the Smithsonian’s object record place the incident on September 9, 1947.[1][2] Here the preserved object corrects the teller without diminishing her connection to the event.
Hopper did something more consequential than coin a term
Correcting the moth story can produce a second distortion if it turns into a contest over who deserves a word. Edison did not single-handedly invent the metaphor either; the documented record shows a term moving through telegraph and electrical practice. Nor does removing coinage from Hopper remove her influence.
Hopper helped translate workshop language into the emerging discipline of programming. Kidwell traces a revealing change. An engineering glossary in 1951 omitted both bug and debug. In 1953, while working in the commercial computing world, Hopper prepared a glossary that defined debug as removing a machine malfunction or an error from a routine; a revised version appeared the next year. Early UNIVAC documentation likewise used debugging for tracing a routine step by step when a stored instruction was wrong. By 1962, an Association for Computing Machinery glossary included both bug and debug as standard programming terms.[2]
That extension mattered. The Mark II moth was a hardware obstruction. Hopper’s definition explicitly allowed debugging to operate inside a sequence of instructions. The same compact metaphor could now travel from a relay contact to a program routine without pretending the two failures were mechanically identical.
Her archived humor makes the transfer visible. The Smithsonian finding aid lists Hopper cartoons populated by a paper-tape-shaped “table worm,” a relay-loosening bug, and an NRL bug that supplied bad data; it also records Bloch and Campbell being credited with pursuing mathematical errors and tape bugs.[6] This was not a solemn naming ceremony. It was a working vocabulary, shared through notes, cartoons, glossaries, training, and stories.
Why the smaller claim is the better history
Two interpretations of the moth episode can now be separated. The popular version treats it as an etymological birth: Hopper finds the insect, names the fault, and gives programmers a permanent word. The archival version treats it as a crystallizing anecdote: a team encounters a literal instance of language it already uses, preserves the joke, and Hopper later helps the story and vocabulary travel.[1][2][4]
The second interpretation accounts for more evidence. It explains the word actual. It accommodates nineteenth-century electrical usage, the 1944 Mark I log, Hopper’s pre-moth debugging notes, and her later plural account. It also explains why the legend remains attractive. A metaphor usually spreads invisibly through conversation and work. This one left a body.
The myth is therefore best corrected without flattening its subject. Grace Hopper did not need to invent bug beside relay 70 for the episode to belong in her history. Her more durable contribution was helping an inherited engineering term cross a technical boundary and become normal language for reasoning about programs. The Mark II crew did not create debugging that afternoon. They gave it its perfect artifact: a fault found, a machine restarted, and an old joke made literal under tape.
Sources
- Smithsonian National Museum of American History, “Log Book With Computer Bug” — object record, 1947 date, physical description, provenance, team attribution, and caution that the log was probably not Hopper’s personal book.
- Peggy Aldrich Kidwell, “Stalking the Elusive Computer Bug,” IEEE Annals of the History of Computing 20, no. 4 (1998), pp. 5–9 — archival study of pre-1947 usage, the Mark I and II records, the date correction, and the term’s spread into programming.
- Thomas A. Edison Papers Digital Edition, “Edison and the Bug” — documented technical uses from 1875 onward, Edison’s notebooks and correspondence, and nineteenth-century electrical definitions.
- Smithsonian Archives Center, Grace Murray Hopper oral-history interview (November 1968) — Hopper’s retrospective first-person-plural account of the Mark II room, the moth, and the team’s joke.
- U.S. Naval Historical Center photograph NH 96566-KN via Wikimedia Commons, “First Computer Bug, 1947” — source page for the archival logbook photograph used as the article image.
- Smithsonian Archives Center, Guide to the Grace Murray Hopper Collection — archival inventory of Hopper’s bug cartoons, humor file, debugging notes, and credits to Bloch and Campbell.