Today In History logo TIH
Grace Hopper's team at Harvard University taped a two-inch moth to the logbook o
1947 Event

September 9

First Computer Bug Found: A Moth in the Machine

Grace Hopper's team at Harvard University taped a two-inch moth to the logbook of the Mark II computer on September 9, 1947, noting beside it, "First actual case of bug being found," after the insect lodged in a relay and caused the machine to malfunction. The entry, written with characteristic dry humor, did not coin the term "bug" for a technical malfunction, which engineers had used since at least Thomas Edison's time, but it did give the computing world its most famous origin story and cemented the vocabulary that programmers use to this day. The Mark II was a massive electromechanical computer housed at the Harvard Computation Laboratory, funded by the Navy and operated by a team of mathematicians and engineers under Commander Howard Aiken. The machine used thousands of electromagnetic relays, vacuum tubes, and mechanical switches to perform calculations, and its physical components were vulnerable to exactly the kind of interference that a moth could cause. When the relay failed, the operators traced the malfunction to the insect, removed it with tweezers, and recorded the event in the logbook with the understated precision that characterized early computing culture. Grace Hopper, a Navy lieutenant and later rear admiral who would become one of the most important figures in the history of computer science, was a senior member of the Mark II programming team. While she did not personally find the moth, she frequently told the story in lectures and interviews, and the logbook page with the taped moth became one of the most reproduced artifacts in computing history. The original logbook is preserved at the Smithsonian Institution's National Museum of American History. Hopper's contributions to computing extended far beyond moth removal. She developed the first compiler, a program that translates human-readable code into machine instructions, and was instrumental in creating COBOL, the programming language that dominated business computing for decades. Her insistence that programming languages should resemble English rather than mathematical notation made computing accessible to a vastly larger population. The moth in the Mark II relay was a trivial incident in a career of enormous consequence, but its endurance in popular memory reflects the human need to find a tangible origin for the abstract language of technology.

September 9, 1947

79 years ago

Key Figures & Places

What Else Happened on September 9

Talk to History

Have a conversation with historical figures who witnessed this era. Ask questions, explore perspectives, and bring history to life.

Start Talking