Science & Technology

Why Do We Call Computer Glitches "Bugs"?

When something goes wrong with a computer, why do we call it a "bug"? Sure, bugs can be unpleasant, but so are rashes, all-hands meetings, and overly-scented candles. Popular lore has it that society as we know it settled on "bug" because renowned computer scientist Grace Hopper once found an actual moth in a computer. But while that did happen, the legend behind the term isn't quite right.

A Semi-Apocryphal Moth

Grace Hopper was part of the tiny team that created the world's first programmable computer: Harvard's Mark I. That wasn't her only first: She was also the first woman to receive a Ph.D. in mathematics from Yale, she helped create the first compiler for computer languages, and she was the first woman to receive the National Medal of Technology. It's no wonder that people called her "Amazing Grace." Today, she's commemorated with the annual Grace Hopper Celebration of women in programming.

The best-known origin story for the computer term "bug" goes like this: Back in 1943, Hopper was working for the U.S. Navy while the country was in the thick of World War II. The stakes were high, and there was a glitch in Mark I that was hard to track down, given that Mark I was the size of a room. Eventually, though, Hopper found the problem: a moth stuck in the inner workings. She smooshed the moth's corpse in her notebook and wrote next to it in an entry dated September 9, "First actual case of bug being found." This, according to the Navy's website, was the introduction of the term "bug."

But is it? Factually, the story mostly holds up. She wrote the note, though she may or may not have discovered the moth, and it might have been the Mark II instead of the Mark I. The exact year in the 1940s is also up for discussion. However, the real controversy is that she wasn't coining the term "bug" so much as punning on it — it was already in use.

Where Did "Bug" Really Come From?

Well ... not from Hopper. Coining a term does usually require a little more explanation than Hopper included in her notebook, and Hopper's papers show that she and others had used the term for computer problems for several years previous to the moth incident. In fact, it even predates Hopper herself. According to the Oxford English Dictionary, it first appeared in 1889, in a newspaper description of Thomas Edison. (You know, the guy credited with the invention of the light bulb. And the telegraph. And the spirit phone, kind of.)

Back in 1889, a reporter for the Pall Mall Gazette wrote:

"Mr. Edison ... had been up the two previous nights working on fixing 'a bug' in his phonograph — an expression for solving a difficulty, and implying that some imaginary insect has secreted itself inside and is causing all the trouble."

However, the term "bug" appears in Edison's private journals and letters as far back as 1876, long before this article went to print. It seems that in addition to inventing assorted technologies in his lab, Edison also invented the term "bug" and passed it on to this reporter. A prolific inventor indeed!

So how did he come up with the term? Computer World notes that it's sometimes traced back to an ancient word for monster, still visible in rarely-used words like "bugboo" (and, perhaps ... Destiny's Child's "Bug-a-Boo"?). However, Edison's coinage seems less about ancient history than about literal bugs. He imagined little scapegoat bugs trapped in his glitchy machines. In an 1878 letter, he also notes that technological bugs "show themselves and months of intense watching, study and labor are requisite before commercial success or failure is certainly reached" — sort of like real bug infestations. You never notice roaches during the apartment viewing, after all; it's only once you move in that they reveal themselves.

So how did Hopper's moth end up taking so much credit? That may come down to Hopper herself. In the years that passed, she told and retold the tale of the moth in the machine, adding at one point, "From then on, when anything went wrong with a computer, we said it had bugs in it."

"Let me put it this way," Smithsonian's Peggy Aldrich Kidwell told the New York Times, "Dr. Hopper told a good story."

Get stories like this one in your inbox or your headphones: sign up for our daily email and subscribe to the Curiosity Daily podcast

To see the charmingly illustrated achievements of Grace Hopper and other pioneering women in science, check out the New York Times bestseller "Women in Science: 50 Fearless Pioneers Who Changed the World," written and illustrated by Rachel Ignotofsky. We handpick reading recommendations we think you may like. If you choose to make a purchase, Curiosity will get a share of the sale.

Written by Mae Rice September 7, 2018

Curiosity uses cookies to improve site performance, for analytics and for advertising. By continuing to use our site, you accept our use of cookies, our Privacy Policy and Terms of Use.