Before computers
Long before electronic computers, engineers used “bug” for small, annoying defects in machines. The insect sense of the word is much older — it appears in an English medical text from 1594 — but the technical sense grew up in the second half of the 19th century.2 One of the earliest examples comes from a telegraphy journal in August 1875, which reported that the biggest “bug” yet had been found in a hotel’s electric call system.2
Thomas Edison’s “bugs”
Thomas Edison is the best-known early user of the word. While working on the quadruplex telegraph in the 1870s, his team needed a “bug trap” to deal with false signals, and the term appears in his notebooks from 1876.3
In March 1878 he wrote to William Orton, president of Western Union, admitting that he had found a “bug” in a new telephone design.4 In November that year he wrote to a business associate, Theodore Puskas, explaining that “bugs” was what such little faults and difficulties were called.2,3
Edison did not invent the word — he was using slang that already existed — but he helped spread it.2 By the 1890s it was in print for everyone: an electrical dictionary of 1892 traced it to quadruplex telegraphy, and a general dictionary defined it for the public in 1895.3
How the word spread
Edison’s habit was noticed. In 1888 the telegraph writer William Maver said the term had first been used by Edison, and in 1889 a British newspaper reporter remarked on Edison calling a phonograph problem “a bug”.3 By the 1930s it was ordinary English far beyond engineering: in 1937 New York’s mayor, Fiorello La Guardia, was quoted in The New York Times talking about “bugs, defects or jokers” in a building code.2
The word itself is much older than any machine. IEEE Spectrum links it to older words such as the Welsh “bwg” and the Middle English “bugge”, and Computerworld traces it back to an old word for a monster.3,5
The moth in the machine
The famous story came decades later. Engineers running the Harvard Mark II — a large electromechanical computer built by Harvard with IBM — traced a fault to a moth stuck in a relay. They removed it, taped it into the logbook and labelled it *“First actual case of bug being found.”*1
The log entry, timed at 15:45, records the moth in relay number 70 on panel F.2 The Smithsonian’s National Museum of American History, which now holds the page, dates it to 1947.1 You will sometimes see 1945 instead, but the Mark II only came into use in the summer of 1947, so the later date fits.5
The joke only works because “bug” already meant a fault. The engineers were not coining a word; they were delighted to find a literal one.2,5
Grace Hopper’s role
The computer scientist Grace Hopper worked on the Harvard Mark I, II and III, which is why the moth is so often linked to her.6 She told the story often, but she did not find the moth or write the log entry, and the Smithsonian says the logbook was probably not hers.1,5 What she and the Mark II team did was help make “bug” and “debug” everyday computing words.1
Hopper deserves to be remembered for something much bigger. She published the first paper on compilers — programs that translate human-readable instructions into machine code — and was instrumental in developing the COBOL programming language. She retired from the US Navy in 1986 as a rear admiral, aged 79 — at the time the oldest serving officer in the Navy — and died in 1992. A US Navy destroyer, USS Hopper, carries her name.6
Where “debugging” comes from
Once programs were full of “bugs”, fixing them became “debugging”, and it is still the everyday word for finding and removing faults in software.1,5
Common myths
- “Grace Hopper invented the word bug.” She didn’t, and the word was in use for at least 70 years before the moth.2,3
- “Edison coined it.” He used it early and often, but earlier uses exist, such as the 1875 telegraphy report.2
- “The moth was the first computer bug.” It was the first actual bug — an insect — which is exactly why the team found it funny.1,5
Other computer words with a story
- Bluetooth — named after a Danish king. Why is it called Bluetooth?
- Cookie — a small file with a friendly name. What is a cookie?
- Kilobyte — a word that means two slightly different numbers. Why is a kilobyte sometimes 1,024 bytes?
Fun fact
The moth still has its own museum record: the logbook page is catalogued at the Smithsonian as object 1994.0191.01.1
Related guides
- Why Is It Called Bluetooth?: another name with a story.
- Why Do Computers Use Binary?: how computers work underneath.
- Why Does AI Sometimes Make Things Up?: a very modern kind of software error.
