The First Computer Bug Was an Actual Bug
September 9, 1947
Engineers at Harvard University were working on the Harvard Mark II electromechanical computer when they discovered the machine was producing errors. Investigating the relays — electrically operated switches that formed the computing mechanism — they found a moth trapped in Relay #70, Panel F.
The moth was carefully removed and taped into the engineering logbook with the annotation: "First actual case of bug being found." The logbook, complete with the moth, is now on display at the Smithsonian Institution's National Museum of American History.
"First actual case of bug being found." — Harvard Mark II logbook, 9 September 1947
Was Grace Hopper Responsible?
The discovery is frequently attributed to Grace Hopper, the pioneering computer scientist who would later develop the first compiler and champion the idea of machine-independent programming languages. Hopper did work on the Mark II and was associated with the team, and she certainly popularised the term. However, the logbook entry was signed by other team members, and she likely received credit through association and retelling over time.
The Term "Bug" Was Already in Use
Interestingly, the word "bug" for a technical flaw predates 1947. Thomas Edison used it in 1878 to describe difficulties in his phonograph. The word was already common engineering slang. What the 1947 incident did was give the concept its definitive, literal, impossible-to-forget illustration.