Debunking the Myth: The True Origins of the Term 'Computer Bug'

Debunking the Myth: The True Origins of the Term 'Computer Bug'

From Grace Hopper to Thomas Edison: The True Origins of the Term 'Computer Bug'

As a software developer, you may have often heard the story of how Grace Hopper invented the term ‘computer bug’ after finding a bug jamming the Havard Mark II computer. There’s only a couple of problems with that story:

  1. Hopper almost certainly wasn’t the one who found it or wrote about it and more importantly,

  2. The use of the term bug to describe an engineering or software issue long predates Hopper and her team.

So how did this story come to be?

Well, there was definitely a squished moth found in the relays of the Havard Mark II, while Hopper was working there. We know this because of a logbook entry that was written, with the following quote:

“First actual case of bug being found

- complete with the moth sellotaped neatly above it.

The notebook is now held as a piece of history in the Smithsonian Institution’s National Museum of American History collection - taped moth still intact!

A photo of the page from the logbook in which a moth can be seen taped to the page.

So it’s true then Hopper did coin the term after finding a squished moth?

Unfortunately not, based on handwriting comparisons the Smithsonian Institution does not believe the writing to be that of Grace Hopper. And considering that Hopper’s work in the lab was not that of a technician maintaining the relays, it is unlikely that she was the one to find the famous critter.

This might lead you to believe that it was a technician working with Hopper who coined the term, but it was simply a joke among colleagues.

The term had already been in common use by engineers for over 50 years.

As far back as 1873, Thomas Edison, the inventor of the lightbulb, had filed a patent for his ‘bug trap’ designed to reduce interference, or bugs, on his morse-code quadruplex telegraph system.

Edison is frequently reported to have used the term bug to refer to issues with his inventions and would often write about bugs as if there was an actual critter in the system causing the issue.

In an 1889 newspaper, a British reporter 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.”

A lightbulb

In fact, the Oxford English dictionary used this quote to define a bug as “a defect or fault in a machine, plan, or the like.”

In all likelihood, Edison didn’t invent the term either but was one of the many great engineers of the time to popularise it.


The term ‘bug’ in reference to an insect, appears to have originated from several Middle English words used to describe ghouls, ghosts and other spirits. These included:

“Bugge”, “Bugaboo” and “Bugbear”

In the 1620s, it would first be used to describe a small creature in reference to bedbugs. Slowly evolving in form to describe a range of critters.

So the question remains who invented the term, well we don’t know and I guess we probably never will. That is likely why Hopper’s story has become so well known because it’s a simple and funny anecdote with a punchline that still makes software engineers chuckle today.

So next time you are frustrated trying to get your code to work - just be glad you no longer have to check if it’s being caused by an actual fly stuck inside the computer.


Thanks for reading!

Did you know the true origins of the term, or had you been fooled by the Grace Hopper tale? Let me know in the comments, or just say hi 👋.

Until next time, Happy Coding!


To learn more about this topic, I recommend reading the following articles: