Nobody “invented” bugs, but the answer depends on which kind you mean. If you’re asking about computer bugs, Thomas Edison was using the word “bug” to describe technical glitches as early as 1878, and a famous moth taped into a logbook in 1947 cemented the term in computing history. If you’re asking about actual insects, they evolved roughly 400 million years ago from ancient crustacean ancestors. Here’s the full story on both.
Edison and the Original “Bug”
Long before computers existed, engineers used “bug” to mean a frustrating technical problem. Thomas Edison appears to be the earliest notable figure to use the term this way. In a March 1878 letter to Western Union president William Orton, Edison joked: “I did find a ‘bug’ in my apparatus, but it was not in the telephone proper. It was of the genus ‘callbellum.’ The insect appears to find conditions for its existence in all call apparatus of Telephones.”
Later that same year, Edison wrote more seriously to an associate about what happens after conceiving an invention: “‘Bugs,’ 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.” So by the late 1870s, “bug” was already slang among inventors and engineers for any small, elusive problem in a machine or device.
The Famous Moth of 1947
The moment that made “bug” a household word in computing happened on September 9, 1947, at Harvard University. Operators working on the Mark II computer traced a malfunction to a moth that had gotten stuck inside a relay. They taped the dead moth into the machine’s logbook with the note “First actual case of bug being found.” The word “actual” is key: the team already knew the slang term and found it hilarious that a literal insect was the culprit.
Grace Hopper, a Navy officer and pioneering computer scientist who worked with the Harvard team, helped popularize the story. She often retold it in lectures, and the tale spread so widely that many people credit her with coining the term. She didn’t invent the word, but she did more than anyone to make it stick in the vocabulary of programmers. The original logbook with the moth is preserved at the Smithsonian Institution’s National Museum of American History.
How “Bug” Became an Industry Standard
In formal engineering, a “bug” is technically a fault: an incorrect step, process, or data definition in a computer program, or a defect in a hardware component like a short circuit or broken wire. Engineers distinguish between the human mistake that introduces the problem, the fault itself sitting in the code, and the failure that the user eventually sees. In everyday conversation, though, “bug” covers all of it.
The term became so embedded in tech culture that companies eventually started paying outsiders to find bugs for them. Netscape launched the first formal bug bounty program in 1995, offering rewards to anyone who could find security flaws in its Navigator 2.0 browser. Today, nearly every major tech company runs a similar program, and skilled bug hunters can earn six-figure incomes by reporting vulnerabilities.
If You Meant Actual Bugs
If your question was about real insects, no one invented them, but their origin story is remarkable. Insects evolved approximately 400 million years ago during the Devonian period. The oldest widely accepted insect fossil is a tiny springtail called Rhyniella praecursor, preserved in extraordinary detail in a chunk of Scottish rock known as the Rhynie Chert. Some researchers initially questioned whether the specimen was just modern contamination, but that idea was rejected, and the fossil is now accepted as genuinely 400 million years old.
Insects didn’t spring from nothing. Genetic and anatomical evidence points to crustaceans as their closest relatives. Under a framework called Pancrustacea, insects belong to the same broad group as shrimp, crabs, and lobsters. The most likely sister group to insects is Remipedia, a class of small, pale, cave-dwelling crustaceans that look nothing like a beetle or a butterfly but share deep genetic roots with them. In other words, insects are essentially crustaceans that moved onto land and took to the air.
Wings appeared later in the fossil record. The earliest definitive fossils of winged insects date to about 325 million years ago, during the Carboniferous period. How wings evolved is still debated. One theory proposes that small winglets first helped insects control their descent when falling from plants. A competing theory suggests wings originated in aquatic insects, where proto-wings may have aided movement on or near water surfaces. Either way, flight gave insects an enormous survival advantage, and they’ve been the most species-rich group of animals on the planet ever since.