Portrait
The first bug was a joke
A moth really was taped into a 1947 logbook. The joke beside it only works because engineers already called faults bugs.

4The numbers
3years
before the moth, the same Harvard lab wrote of hunting “bugs” (17 April 1944)
Source: ivizlab.sfu.caA moth is taped into a logbook. Next to it, someone has written: “First actual case of bug being found.”
The moth is real. The joke is the part most people miss.
The note is a pun, and it only works because engineers were already calling faults “bugs”. The word was decades old when this moth turned up.
Twenty minutes into a test
It is 9 September 1947, at Harvard University. Operators are testing the arithmetic units of the Mark II, a calculator the Navy asked Harvard’s Computation Laboratory to build in November 1944. It was meant for the Naval Proving Ground at Dahlgren, Virginia, and moved there in 1948.
The Mark II thinks with relays: small switches that an electromagnet flips. It has about 13,000 of them.
The log says “Started Mult + Adder Test” at 1525. Then, Kidwell writes, the machine’s action stopped. At 1545 the entry reads “Relay #70 Panel F (moth) in relay.” Grace Hopper, telling it in 1982, says the crew found the failing relay and “inside the relay beaten to death by the relay contacts was a moth about this big.”

The rest of the page is an ordinary day. At 0800 it says “arctan started”, a run of the arctangent, a maths function. At 1630, after the moth, it says “Arctangent started.” At 1700: “closed down.”
A word that was already old
Thomas Edison was writing about bugs in 1878. In March he told William Orton: “I did find a ‘bug’ in my apparatus … The insect appears to find conditions for its existence in all call apparatus of Telephones.” In November, to Theodore Puskas: “‘Bugs’ as such little faults and difficulties are called, show themselves.” The Edison Papers date that letter 13 November; another source gives 18 November.

The word goes back further than Edison. Historian Peggy Kidwell finds telegraphers talking about “bugs” in 1875. In 1892, T. O’Conor Sloane’s Standard Electrical Dictionary defines it: “Any fault or trouble in the connections or working of electric apparatus.” The next entry adds that “it is said” the word began in quadruplex telegraphy, a system that sent four messages down one wire at once.

The same lab used it before 1947. Robert Campbell’s log of Harvard’s Mark I says on 17 April 1944: “Mr. Durfee from I.B.M. was here to help us find ‘bugs.’” Historian I. B. Cohen quoted that line in 1994. So “First actual case” reads as a pun: bugs were already faults, and this one had wings.
Who taped it in?
Not Hopper, by her own account. She says an operator “got a pair of tweezers and very carefully fished the moth out of the relay, put it in the log book, put Scotch tape over” it, and below it wrote “First actual bug found”. The page says “First actual case of bug being found”, so her words are close, not exact. It does not name the operator. The Smithsonian says the log book “was probably not Hopper’s”.
She was part of the lab, though. She is in the staff list of the 1949 manual. She had arrived at Harvard in early July 1944 and stayed from 1946 to 1949 as a research fellow under the Navy contract.
What she did was tell the story. In a 1968 interview she says “one night” and “four inches wing span”. In 1981 it ran as “The First Bug” in the Annals of the History of Computing. In 1982, in a lecture at the National Security Agency, she says: “And I’ve told that story a lot of times. It turned out some people didn’t believe me.” Time carried it in 1984.

Her tellings drifted. In 1981 and 1982 she dates it to “the summer of 1945”. But in 1945 there was no Mark II to test: full construction began around spring 1946, Kidwell notes. The page itself gives only the day and the time, 9/9 and 1545, and the Smithsonian curator fixed the year as 1947.
Hopper was promoted to commodore at the White House on 15 December 1983. The rank was renamed rear admiral (lower half) on 8 November 1985. She retired on 14 August 1986, the oldest serving officer in the US Navy.
Still in the book
The logbook, with the moth still taped in, belongs to the Smithsonian’s National Museum of American History, catalogued as 1994.0191.01. It came as a transfer from the Naval Surface Warfare Center. In her 1982 lecture Hopper says she placed it in the museum at the Navy’s base at Dahlgren. We could not confirm whether it is on display in Washington, so check the museum’s record before you travel.
“First actual case” is the log’s own claim, a punchline rather than a record.
Next time someone says there is a bug in an app, you will know the word was already around when Edison wrote it in 1878, and that a Harvard crew made a pun of it 69 years later. And if you ever find your own moth in your own machine, tape it in. Write down the time.
Every fact, sourced.
Primary sources come first. Every number in the story links to the page it came from.
- The First “Computer Bug” (NH 96566-KN), Mark II logbook page, 9 September 1947US Navy, via Wikimedia Commons · commons.wikimedia.org
- Log book with computer bug (object record)Smithsonian National Museum of American History · americanhistory.si.edu
- Stalking the Elusive Computer Bug (IEEE Annals of the History of Computing 20(4), 1998)Peggy Aldrich Kidwell · ivizlab.sfu.ca
- Description of a Relay Calculator (Annals of the Computation Laboratory of Harvard University, vol. XXIV, 1949)Harvard University, scan by the Computer History Museum · archive.computerhistory.org
- Future Possibilities: Data, Hardware, Software, and People (lecture by Grace Hopper, 19 August 1982)National Security Agency, via Internet Archive · archive.org
- Computer Oral History Collection, Grace Hopper interview, November 1968 (AC0196)Smithsonian Institution Archives (archived copy) · web.archive.org
- Edison and the bugEdison Papers, Rutgers University · juncture-digital.org
- Did you know? Edison coined the term “bug”IEEE Spectrum · spectrum.ieee.org
- The Standard Electrical Dictionary (1892)T. O'Conor Sloane, via Internet Archive · archive.org
- Harvard Mark IIWikipedia · en.wikipedia.org
- Grace HopperIEEE Computer Society, Computer Pioneers · history.computer.org
- Grace Hopper being promoted to Commodore (DN-SC-84-06783)US Department of Defense, via Wikimedia Commons · commons.wikimedia.org
5Pictures
The first bug was a jokeUS Navy, photo courtesy of the Naval Surface Warfare Center, Dahlgren, public domain · Public domain (US Navy) · original
Cubicles full of relays, from the 1949 manual of the Mark IIStaff of the Computation Laboratory, Harvard, 1949, reproduction authorized by the manual's copyright notice · Reproduction authorized and permitted (1949 copyright notice, President and Fellows of Harvard College); renewal not checked · original
Thomas Edison with an early phonographLevin C. Handy (Brady studio), Library of Congress, c. 1877-1878, public domain · Public domain · original
The 1892 dictionary page with the entries Bug and Bug TrapT. O'Conor Sloane, The Standard Electrical Dictionary, 1892, public domain · Public domain (1892; IA: NOT_IN_COPYRIGHT) · original
Grace Hopper giving a lecture in 1982National Security Agency, 19 August 1982, public domain · Public domain (US government; IA: Public Domain Mark) · original
Real archive pictures, turned into pixels by our build: 240 pixels wide, 14 colours, dithered.
Written by Sonnet 5.5, an AI model, from a fact sheet checked against primary sources. How we make it


