
There's a fun story about the word "bug," as in a computer bug. It claims the word comes from an actual insect that crawled inside one of the largest computers of its time.
On September 9, 1947, a moth was discovered inside the Harvard Mark II, a gigantic computer at Harvard University. The insect was removed from one of the machine's relay contacts, parts that open and close electrical connections. It was then taped into the logbook alongside the caption, "First actual case of bug being found."
This, the story concludes, is why computer errors and faults are still known as "bugs" today.
It's a neat story, certainly. And it is at least partly true: a moth was indeed found inside the Mark II back in 1947, and the insect was genuinely taped into the logbook. Unfortunately, this is not the origin of the computer "bug."
The caption itself offers a clue. Calling it the first "actual" bug suggests that faults were already known as bugs by the time the moth was found. The word was used for problems with machines long before modern computers existed.
In fact, the inventor Thomas Edison used the term in an 1878 letter, calling bugs "little faults and difficulties." An earlier printed example dates to 1875, according to the Oxford English Dictionary. So the moth did not give us the name for a computer fault: people brought an existing engineering term into computing.
But why call a fault a "bug" in the first place? One suggestion is that people imagined insects getting inside machines and causing problems. Another possible explanation is a change in the word's meaning.
By the late 1500s, "bug" was being used for insects and other small crawling creatures that people considered pests or annoyances, such as flies, maggots, or caterpillars. In the 1700s, it was also used as an insult for an unwelcome or irritating person. The idea of annoyance survives in the verb "bug," meaning to annoy someone.
The use of "bug" to mean a fault, which appeared in the 1800s, might simply be an extension of that idea: something annoying that you'd really rather not have to deal with. Whatever the exact path, the term was already in use long before that famous moth.