Technology and Invention28/08/2026Curadoria de Inovação8 min readUpdated on 17/09/2026

Did Grace Hopper invent the term “bug”? What the Mark II moth and the 1947 logbook actually prove

The moth found in the Harvard Mark II in 1947 became a computing symbol, but the term “bug” already existed. The logbook helps separate fact, joke, and later attributions.

Ilustração editorial de Grace Hopper em uniforme naval ao lado de um computador de relés, com logbook aberto e uma mariposa presa por fita.

Short answer: no. Grace Hopper did not invent the term “bug”, and the famous 1947 logbook does not prove that she coined the word. The document records a real and extraordinarily memorable episode: a moth found in the Harvard Mark II was taped to a page of the operations logbook, accompanied by the phrase “First actual case of bug being found”. The joke in the note, however, depends precisely on an earlier fact: engineers were already calling technical defects and problems “bugs”.

What the strongest evidence allows us to say is more interesting than the legend. The Smithsonian, which preserves the logbook, says that the technical use of “bug” dated back decades, that Mark II engineers found the moth, and that the book probably was not even Hopper’s. At the same time, the museum acknowledges that Grace Hopper and the team helped popularize “computer bug” and the related idea of “debug”.

What happened in the Mark II on September 9, 1947

The Harvard Mark II was an electromechanical machine based on relays and was part of the sequence of computers developed under Howard Aiken’s direction. Grace Hopper had worked on the Mark I and remained connected to the Harvard laboratory during the period when the Mark II was developed for the United States Navy.

On the historic logbook page, the note associated with the incident records Relay #70, Panel F and identifies a moth in the relay. The insect was taped to the sheet. Just below it appears the phrase that crossed the decades: “First actual case of bug being found”. The date accepted by the Smithsonian for the object is 1947.

The episode is often summarized as “the first computer bug”. The phrase works well as a caption, but it is inaccurate if understood as the first defect in a computing machine. The Smithsonian itself notes that, in the first computers of the 1940s, technicians were already finding “bugs” in both hardware and programs. What was new that day was the physical coincidence: this time, the “bug” was literally an insect.

The joke itself shows that the word already existed

The expression “first actual case” is a decisive historical clue. If “bug” had not already meant a technical problem, the joke would disappear. The team was making a pun between two meanings of the same word: the fault the engineers were looking for and the insect that happened to be inside the machine.

Harvard’s historical collection points in the same direction. Its material on the language of the Mark I says that, before 1944, electrical engineers were already using “bug” for physical defects that were difficult to locate, and that the Mark I team adopted the term for unexpected problems in coding as well. The vocabulary was therefore already circulating in that environment before the moth of 1947.

“Bug” was already an engineering term in the 19th century

The historical trail reaches far beyond the first computers. The Smithsonian says that Thomas Edison spoke of “bugs” in electrical circuits in the 1870s. A recent IBM page, published in 2026 about debugging with artificial intelligence, also recognizes that Edison used the term in 1878 and that lexicographic records trace the technical sense to the 1870s and 1880s.

That does not mean Edison necessarily invented the word in that sense. It means something safer: when the Mark II had its encounter with the moth, “bug” already had a long history as technical slang for a defect, difficulty, or unwanted behavior in equipment. The claim that Grace Hopper created the word in 1947 does not hold up against this chronology.

Where Grace Hopper actually fits into the story

Grace Hopper was connected to the Mark II and was part of the group that turned the episode into one of the best-known stories in computing. In oral-history interviews preserved by the Smithsonian, she told the case as a team memory. In one account, she describes that “we went to look for the bug” before they found the moth. The choice of words is revealing: they were already “looking for the bug” in the sense of a fault before finding the real insect.

In another account, Hopper talks about the moth found in a relay, the decision to put it in the logbook, and the humor surrounding the team. She does not present the story as the moment when she invented the word. The Smithsonian’s museum record is even more cautious: it says that the logbook was probably not Hopper’s and attributes the discovery to the engineers working on the Mark II, without identifying a single person as the finder or the author of the note.

None of this diminishes Hopper’s importance. Her documented achievements are enormous on their own: she was a programming pioneer, worked on the Mark computers, advanced ideas in automatic programming, developed FLOW-MATIC, and played an important role in the path that led to COBOL. Attributing an etymology to her that does not match the evidence is unnecessary to recognize her historical weight.

Why the legend that Hopper “invented the bug” keeps circulating

The story has every ingredient of a good technology legend: a famous pioneer, a huge machine, a mysterious fault, a real insect, and a preserved physical object. Over time, “Hopper told and popularized the story” was shortened to “Hopper found the moth” and

then to “Hopper created the term bug”. Each simplification is easier to repeat, but it also moves a little farther away from what the document proves.

The confusion does not appear only in unsourced blogs or posts. There are disagreements within recognized institutions. A Naval History and Heritage Command page about the logbook photograph still describes the case as occurring in 1945 and says that it introduced “debugging” into the language of computers. Another institutional Navy publication goes so far as to say that Hopper coined the term “bug”. An IBM page about CPU history also credits her with creating “computer bug”.

At the same time, other pages in those same institutional networks are more careful. The Smithsonian says the term was old and that the logbook probably was not Hopper’s. Harvard says the team helped popularize “bug” and “debugging”. IBM, in its 2026 content about debugging, corrects its own simplification by saying that the word predates Hopper. Anatel, also in 2026, records that “bug” had been used since the 19th century and treats the episode as a milestone in popularization, not as the absolute origin of the term.

1945 or 1947? The date also became a source of error

Another clue to how inaccurate versions persist is the date. The current catalog entry for the photograph held by the Naval History and Heritage Command still gives “9 September 1945” in the description. The Smithsonian, however, catalogs the logbook as a 1947 object, and Harvard also places the moth in the Mark II in 1947. The chronology of the Mark II itself is consistent with 1947, not with the 1945 version.

For that reason, September 9, 1947 is the best-supported date for the episode. The existence of an official caption using 1945 shows why institutional authority alone does not settle a historical dispute: the object, the chronology, and consistency across sources all need to be checked.

The logbook does not record the “first computer error”

Calling the moth the “first computer bug” is acceptable only if the reader understands the literal joke. It was not the first hardware error, the first faulty program, or the moment when computing discovered that systems fail. Teams working with earlier machines were already dealing with defects and were already using “bug” to talk about them.

The historical value of the logbook lies elsewhere. It preserves a perfect meeting between language and matter: a team accustomed to hunting “bugs” actually found a creature inside the machine. The phrase written on the page turned a laboratory pun into an enduring symbol of computing culture.

What about the term “debugging”?

Here too, it is useful to separate popularization from invention. Some narratives claim that removing the moth created “debugging”. The Smithsonian’s account is more cautious: Hopper and the rest of the team helped popularize the use of “computer bug” and the related expression “debug”. That wording is compatible with the fact that the vocabulary of “bug” already existed and avoids turning an anecdote into a birth certificate for a word.

In other words, the Mark II is a cultural milestone for the language of computing, but it does not provide enough basis to claim that “debugging” was born at that exact moment. The history of technical vocabulary is older and less linear than the moth story usually suggests.

The most historically precise version

The formulation that best reconciles the preserved object, Hopper’s accounts, and the chronology is this: on September 9, 1947, the Harvard Mark II team found a moth in a relay, taped the insect into the logbook, and humorously recorded the “first actual case” of a bug. Grace Hopper was connected to the team and helped make the story famous, but the word “bug” had already been used for technical faults for decades.

That detail changes the answer to the question in the title without diminishing Hopper. She does not need to have invented the word “bug” to occupy a central place in the history of computing. What the 1947 logbook shows, when read carefully, is something more valuable: how an engineers’ inside joke became collective memory and then a simplified legend that official sources themselves still tell in different ways.

Topics in this articlebugdebuggingGrace HopperHarvard Mark IIhistória da computação