The journal Portraits

The moth in the machine

Everyone knows the story: the first computer “bug” was a real bug, a moth taped into a logbook by Grace Hopper in 1947. It is a wonderful story. Almost every famous thing about it is wrong — and the truth is better.

On the ninth of September, 1947, a room-sized calculating machine at Harvard was misbehaving, and somebody went looking for the cause. What they found, wedged between the contacts of an electromechanical relay, was a moth. They removed it, taped it onto the page of the operators’ logbook, and wrote beside it, in neat pencil: “First actual case of bug being found.”

That page survives. The moth is still on it, flattened under a strip of tape nearly eighty years old, and the logbook now lives in the collection of the Smithsonian’s National Museum of American History. It is perhaps the most charming artefact in the whole history of computing, and it is usually offered as the answer to a tidy little quiz: where does the word “bug” come from? The answer, everyone agrees, is this moth.

It is a lovely answer. It is also almost exactly backwards.

The word was already seventy years old

Read the note again and you can hear the joke the engineers were actually making. They did not write “we have discovered a new kind of fault and shall call it a bug.” They wrote first actual case of bug being found — actual, as in, for once, a literal one. The line is funny precisely because they had been saying bug for years to mean a fault, a glitch, a gremlin in the works, and here at last was a bug you could pick up with tweezers.

The word in that sense is far older than the Mark II. Engineers were calling defects “bugs” by the 1870s, well before an electronic computer existed to catch one. The most famous early user is Thomas Edison. In a letter written in November 1878 to his associate Theodore (Tivadar) Puskas, Edison explained that this is simply how invention goes: a fine idea is conceived, and then —

“Bugs” — as such little faults and difficulties are called — show themselves, and months of intense watching, study and labor are requisite before commercial success or failure is certainly reached.

Note the quotation marks around the word. Edison was not minting a term; he was reaching for one his readers would already recognise, the way you might write that a plan had hit a snag. He used it in his private notebooks earlier still, and some historians think he did more than anyone to popularise it, but even for Edison it was already shop-floor slang. By the time Grace Hopper’s colleagues met their moth, “bug” had been part of the engineer’s vocabulary for roughly seventy years.

Go back further and the trail leaves engineering altogether. The likeliest ancestor is the Middle English bugge, meaning a frightening thing — a hobgoblin, a bogey. It is the same root hiding inside bugbear and bogeyman: the thing in the dark that troubles you. A fault in a machine is exactly that — an unseen something that spoils your work — so the leap from the goblin to the glitch is a short one. The moth did not create the metaphor. It walked into a metaphor that had been waiting, fully formed, for centuries.

And Grace Hopper didn’t write the note

The second half of the legend concerns who found the moth. The honour almost always goes to Grace Hopper — and here the record is gently insistent that she did not.

Hopper was certainly there. She was a mathematician on the Harvard team that ran the Mark I and Mark II machines, and the moth page comes straight out of her world. But the museums that hold and study the logbook are careful: she is often credited with the discovery, and that credit is not accurate. The National Geographic Society, among others, notes plainly that she was not the one who found it; the Computer History Museum records that the moth was logged by the team, and that Hopper’s real contribution was to tell the story, often and well, in her later lectures. The handwriting in the logbook has been attributed by historians not to Hopper but to the engineer William “Bill” Burke.

So the myth has it twice wrong. The moth did not give us the word, and Hopper did not catch the moth. What she gave the story was something subtler and, in a way, more valuable: she made it memorable. A great anecdote needs a great teller, and Hopper — who could hold a room like few scientists ever have — carried the moth into the popular imagination and made it stick.

Worth remembering: a word almost never has a single birthday. “Bug” was goblin, then engineer’s slang, then a joke scrawled next to a dead moth, each layer built on the one before. The moth didn’t coin the word — it inherited it, and the story we remember is really about who told it best.

The woman who was the real story

If the moth has overshadowed Grace Hopper, that is a shame, because the woman is a far better tale than the insect. She earned a doctorate in mathematics from Yale in 1934, when almost no women did. She joined the Navy Reserve during the war and never really left; recalled from retirement for what was meant to be six months, she stayed on for nineteen years and retired at last, in 1986, as a rear admiral and one of the oldest serving officers in the fleet.

In between she changed how human beings talk to machines. She led the team that built one of the first compilers — a program that let people write instructions in something closer to English than to raw numbers — on the then-radical conviction that programming languages need not look like mathematics. That idea runs straight into COBOL, the business language she helped bring about and which earned her the half-affectionate title “grandmother of COBOL.” Decades of ordinary English-like code descend from her stubbornness on the point.

She taught the way she argued: with props. To explain why a signal’s travel time mattered, she handed her audiences short lengths of wire, about 11.8 inches each — the distance electricity travels in a nanosecond, a billionth of a second. Hold it and the abstraction becomes a thing in your hand. And she left behind the line that half of engineering now lives by: “It’s easier to ask forgiveness than it is to get permission.”

Why a language person should care about a moth

This is, in the end, a story about how words actually behave — which is the one subject this journal keeps circling back to. We like to imagine each word was invented, handed down from some single clean moment: a coiner, a date, a definition. The moth story is so appealing because it offers exactly that fantasy, a word with a birthday and a corpse to prove it.

Real words are messier and more alive. “Bug” drifted across six hundred years and three trades — folklore, electrical engineering, computing — picking up a new shade of meaning at every stop, until a tired technician could pencil a pun that only worked because the whole history was sitting silently behind it. No dictionary entry holds all of that. You only get it by meeting the word again and again, in real sentences, until its layers are part of what you hear when someone says it. The engineers who wrote that note weren’t reciting a definition. They simply knew the word, in the deep, idiomatic, joke-ready way that is the whole point of knowing one.


Where vocabla fits

You cannot be handed that kind of knowing. A flashcard can tell you that bug means a fault in a machine; it cannot give you the goblin underneath it, or the seventy years of engineers, or the reason the moth note is funny. Those arrive only from seeing a word live in enough sentences that its meaning stops being a label and becomes an instinct.

That is the idea behind vocabla. Across French, German, Italian, Spanish and Russian, it never hands you a bare definition to memorise. Each word turns up inside a real sentence, comes back on a spaced schedule until it settles, and gives you the space to work out its meaning before you’re told — the same way the best words have always been learned, and the same way a coinage quietly becomes common property. Learn a word like that and you own every layer of it — so that one day, when the pun depends on knowing the whole history, you’ll be the one who gets the joke.

Portraits