Today in 1947, operators of the Mark II traced the cause of the computer’s malfunction to a moth caught in a relay and wrote in their logbook “First actual case of bug being found.”
In 2013, Alexander Magoun and Paul Israel wrote in The Institute:
The use of “bug” to describe a flaw in the design or operation of a technical system dates back to Thomas Edison. He coined the phrase 140 years ago to describe technical problems during the process of innovation.
In 1873 Edison first confronted what he later called a bug when he began developing a quadruplex telegraph system to transmit and receive up to four separate telegrams on a single wire simultaneously. If he succeeded, his patron, Western Union Telegraph, would profit greatly from the increased message capacity. The 26-year-old engineer combined diplex and duplex circuits to send two messages in each direction using changes in current direction and strength. The problem in this approach was the false break in a message’s signal created by the changing polarity of the electromagnet in the diplex circuit when the current switched direction.
Edison worked around this by building what he later called a “bug trap” to isolate the unwanted break so that it wouldn’t interfere with the meaning of the Morse-coded signal. In August 1873 he filed a patent caveat, a form of patent application long since discontinued, which included this solution. A year later it became part of his application for U.S. Patent 480,567, which did not issue until 1892 due to patent-interference claims and court cases…
By 1878, Edison was also using the term to describe technical problems to associates outside of the laboratory. In March he joked in a letter to Western Union President William Orton:
“You were partly correct, I did find a ‘bug’ in my apparatus, but it was not in the telephone proper. It was of the genus ‘callbellum.’ The insect appears to find conditions for its existence in all call apparatus of Telephones.”…
Author and engineer Thomas Sloane standardized Edison’s terms in his 1892 Standard Electrical Dictionary. He defined a bug as “[a]ny fault or trouble in the connections or working of electric apparatus,” with a bug trap being a “connection or arrangement for overcoming” said bug. Both terms, “[i]t is said […] originated in quadruplex telegraphy.” Funk and March’s 1895 Standard Dictionary of the English Language gave the term to the general public as “a fault in the working of a quadruplex system or in any electrical apparatus.” …
Grace Hopper did not invent the bug, but she did draw cartoons of gremlins that represented chads, or fragments, created when holes are made in her computer’s punched paper tapes. Like Edison, she was recalling the word’s older origins in the Welsh bwg, the Scottish bogill or bogle, the German bögge, and the Middle English bugge: the hobgoblins of pre-modern life, resurrected in the 19th century as, to paraphrase philosopher Gilbert Ryle, ghosts in the machine. Bugs are not only for today’s computers or software; for more than 100 years, they have represented the challenges of an imperfect world that engineers work to overcome.