A Moth Became the ‘First Computer Bug’ in 1947. Edison Was Using the Word in 1878.

Page 92 of the Harvard Mark II logbook, with a moth taped beside the entry “Relay #70 Panel F (moth) in relay” and the note “First actual case of bug being found”, beside the words “Harvard Mark II” and “1947 moth, 1878 word” and a drawing of a moth on the contacts of a relay.


On September 9, 1947, operators testing Harvard’s Mark II computer found a moth in one of its relays, taped it into the logbook and wrote a joke beneath it: “First actual case of bug being found.” The joke only worked because “bug” already meant a fault. Thomas Edison was using the word that way in 1878.

The moth became the word’s origin story anyway. Grace Hopper, a programmer on the Mark II team, told the story in her many public lectures, according to the Computer History Museum. The US Navy’s own caption for its photograph of the page says the moth introduced the term “debugging a computer program.”

What the logbook page actually shows

The page, numbered 92, is dated only “9/9.” Its entries record a routine test day. At 0800, “arctan started.” At 1000 the log reads “stopped – arctan ✓.” Some relays “failed special speed test” and were changed. The operators started a cosine tape as a sine check, and at 1525 a multiplier and adder test began.

At 1545 comes the famous line: “Relay #70 Panel F (moth) in relay.” Next to it, under a strip of tape, is the moth, and below the tape is the joke. The Mark II, also known as the Aiken Relay Calculator, was built from relays — switches that an electromagnet opens and closes. The Computer History Museum describes the moth as “caught between the relay contacts.”

The Smithsonian’s National Museum of American History, which holds the logbook, dates the page to 1947. It also notes that the logbook “was probably not Hopper’s.” The page does not record who found the moth or who wrote the line; the Computer History Museum says only that “one of the team members wrote in the log.” A 2011 Computerworld article goes further: Hopper “did not make the discovery or the log entry.”

How the popular version took shape

Hopper’s own account, quoted by American Heritage magazine in 1982, is told in the first person plural. “In the summer of 1945 we were building Mark II,” she recalled. “Mark II stopped, and we were trying to get her going. We finally found the relay that had failed.” Inside the relay was a moth. “We got a pair of tweezers. Very carefully we took the moth out of the relay, put it in the logbook, and put Scotch tape over it.”

Commander Howard Aiken, whose name the machine carried, had a habit of coming in and asking, “Are you making any numbers?” When the team was not, Hopper said, “we told him that we were debugging the computer.” Her conclusion: “To the best of my knowledge that’s where it started.”

The Navy’s caption for its photograph of the page tells a similar story. It dates the moth to September 9, 1945, and says the operators “put out the word that they had ‘debugged’ the machine, thus introducing the term ‘debugging a computer program.’”

What the record says about “bug” and “debugging”

Three parts of the popular story do not hold up. The first is the date. The Smithsonian and the Computer History Museum both put the moth in 1947; Hopper remembered it as the summer of 1945, while the machine was being built.

The second is the word “bug,” which many retellings trace to the moth. In March 1878, Edison wrote to William Orton, the president of Western Union: “You were partly correct, I did find a ‘bug’ in my apparatus, but it was not in the telephone proper.” He went on as if describing an insect species: it was “of the genus ‘callbellum’” and seemed to thrive “in all call apparatus of Telephones.” In November 1878, writing to Theodore Puskas about what happens after an invention is conceived, he described how “‘Bugs’ — as such little faults and difficulties are called — show themselves.” In 1889, the London Pall Mall Gazette reported that Edison had been up two nights “discovering ‘a bug’ in his phonograph.”

The third is “debugging.” Fred R. Shapiro, writing in the journal American Speech in 1987, pointed out that the Supplement to the Oxford English Dictionary cites the word from a 1945 issue of the Journal of the Royal Aeronautical Society, two years before the moth. He judged that it had probably been used in engineering slang for several years before that.

Why the moth story outlasted the evidence

The moth had what Edison’s letters lacked: an actual insect, a famous programmer who told the story in lecture after lecture, and a photograph of the evidence. A dead insect taped beside a joke is easier to remember than a line in a business letter. The joke also invites a literal reading. “First actual case” sounds like a claim to be first, when its humor depended on a word the writer already knew.

Developers will recognize the pattern. The first log line that mentions a problem is often not where the problem began. The earliest record you can find sets a minimum age, not a birth date. Page 92 marks the day someone found it funny to tape a real insect into the logbook and call it a bug.

After the moth, the page goes back to work: “1630 arctangent started.” “1700 closed down.” The logbook is now in the Smithsonian’s collection, the moth still taped beside a joke that relied on a word Edison had used 69 years earlier.

Related stories

Sources

Share this article
FacebookThreadsLinkedInX

Leave a Reply

Your email address will not be published. Required fields are marked *