Go to main content Go to main navigation Go to footer
Back to overview

Where does the word ‘bug’ come from in software development?

The word 'bug' is so ingrained in software development that nobody really thinks about it anymore. A fault in the code, a bug in the system, we’ll just debug it. But where the word comes from, and why it stuck so well, is far more interesting than it sounds.

Jenne Morsink - Digital Marketeer bij Cube - Oldenzaal
Author Digital Marketeer
Reading time
4 min

Legendary moth.

On September 9, 1947, at a quarter to four in the afternoon, the Harvard Mark II stopped working. Not completely, but enough to send the team of technicians searching. The machine, a calculating monster filled with thousands of mechanical relays, was producing incorrect results. Somewhere in that jungle of wires, something was wrong.

After a while, they found it. In relay number 70, panel F: a dead moth. Small enough to get stuck, big enough to disrupt everything. Someone removed it, taped it into the logbook, and wrote four words next to it:

"First actual case of bug being found."

That logbook is now in the Smithsonian’s National Museum of American History in Washington, D.C., with the moth still inside.

First bug being found

Source: NHHC Collection

The joke that became a legend.

The story is usually told with Grace Hopper as the central figure. She was one of the most influential computer scientists of the twentieth century, later a rear admiral in the U.S. Navy, and co-inventor of the COBOL programming language. She is said to have found the moth. She is also often credited with coining the term 'bug'. It appears in textbooks and is repeated at conferences.

But that’s not entirely accurate. The Smithsonian notes in the object description that the logbook was “probably not Hopper’s.” The handwriting does not match hers. She was present and recounted the story for decades with obvious pleasure in lectures. But the note was written by someone else on the team, as was the use of the word ‘bug’.

Edison, 69 years earlier.

In March 1878, Thomas Edison wrote a letter to William Orton, president of Western Union. Edison was working on improvements to the telephone and had found a problem with his equipment. He described it like this:

"You were partly correct, I did find a 'bug' in my apparatus, but it was not in the telephone proper."

Later that year, in a letter to business associate Theodore Puskas, he explained the word explicitly:

"'Bug'" - as such little faults and difficulties are called - show themselves, and months of anxious watching, study, and labor are requisite before commercial success - or failure - is certainly reached."

These quotation marks and explanations are telling. Edison introduced a term that was not yet widely known. He likely chose the word for technical problems because it already had the right connotation: something small, hidden, and annoying that sabotages the system. In his lab notes from 1876, he even wrote simply: "Awful lot of bugs still." A technical problem as a troublesome little creature. The image was apparently intuitive enough to stick.

In 1892, engineer Thomas Sloane officially recorded the term in his Standard Electrical Dictionary: a bug is “any fault or trouble in the connections or working of electric apparatus.” From informal metaphor to dictionary definition in just fourteen years.

Thomas A. Edison’s letter to Western Union President William Orton, 1878

Bron: Courtesy of Swann Auction Galleries

From moth to method: how debugging became a discipline.

The note in the logbook did more than introduce a word; it introduced a method. After the moth was removed, the machine worked again. The team had literally debugged: traced the cause, removed it, and restored the system. This approach, systematically finding the source of an error rather than just fixing symptoms, became the core of what we now call debugging.

In the early 1950s, debugging was entirely manual. Programmers worked directly in machine code and had no choice but to go through the code line by line in their heads. When something went wrong, they printed the memory state on paper, called a core dump, and tried to reconstruct where the error had occurred. This could take days.

The first real debugger

The first actual debugger—a tool to step through code and inspect variables—appeared in the early 1960s for MIT’s CTSS system. This was a turning point. No longer did programmers have to treat the machine as a black box. They could now see inside while it was running.

Since then, debugging has grown as a field. Modern development environments include built-in debuggers. Specialized tools automatically detect abnormal behavior. And the rise of bug bounty programs, where organizations reward the discovery of vulnerabilities, has even turned bug hunting into a profession.

The bug that changed software development.

The journey of ‘bug’, from Edison’s letters in 1878 to the Harvard logbook in 1947, and finally to every GitLab ticket and debugger today, is really a story about how professional jargon develops. Not through an official decision, but through shared usage. Someone uses a word, the image resonates, and others adopt it. The Harvard incident helped—not because the moth invented the word, but because the story was so compelling. A literal bug in a computer. That kind of accidental precision sticks.

For anyone building or commissioning software, it is a sober reminder: errors are part of the process, not exceptions, but an inherent part of how complex systems mature. Edison knew it, the Harvard technicians knew it, and every software team knows it today.

The bug was not the start of the problem but a universal explanation.

Sources:

Image without description

Ready for the next step? We are too.

Curious about how we approach software development and what opportunities might exist for your organization? Let's connect.

People also ask...

The word goes back to the Middle English ‘bugge’, meaning monsters. Thomas Edison used it in 1878 to describe technical problems. In 1947, it became widely known after a moth literally caused a computer to fail at Harvard University.

The word 'bug' as a term for insects also derives from Middle English ‘bugge’. In the seventeenth century, it first referred to bedbugs, small hidden creatures that caused unnoticed trouble. From there, it expanded in American English to mean insects in general.

No. Hopper was present at the 1947 incident and helped popularize the story, but the logbook note was likely not her handwriting. The word itself was already at least 69 years old.

On September 9, 1947, a team at Harvard University found a dead moth in relay 70 of the Harvard Mark II. They taped it into the logbook with the note “First actual case of bug being found.” That logbook is now in the Smithsonian’s National Museum of American History.

Debugging is the process of finding and fixing errors in software or hardware. The term is directly connected to the 1947 incident: to solve the problem, the moth literally had to be removed from the machine.

Worth reading next...