The term "computer bug" or "software bug" is ubiquitous in IT parlance but where did the term actually come from? Although modern "bugs" have only existed since the invention of computers and software, the use of the term bug is much older indeed.
In the following article, we'll dive into the history of the term and explore its origins in the English language. We'll also explore its early uses and rise in popularity in the English lexicon.
What is the definition of the term "computer bug"?
A "Computer Bug" or "Software Bug" is generally defined as:
"In IT, a bug refers to an error, fault, or flaw in any computer program or a hardware system. A bug produces unexpected results or causes a system to behave unexpectedly. In short, it is any behavior or result that a program or system gets but it was not designed to do." - Techopedia.
Most bugs occur due to errors and mistakes made by developers when constructing the source code, or the overall design, or within components and operating systems used by the programs in question.
Some are the result of errors in translation between different languages, made by compilers, which produce incorrect or illegible code.
The term 'buggy' is often ascribed to programs that contain large numbers of bugs and/or bugs that seriously compound the software's functionality.
Much to the annoyance of many programmers, and users, "bugs" can trigger errors that produce ripple effects. Software bugs can either be subtle in nature (i.e. limited in effect - like a database button not responding) or can cause a program to crash or freeze.
Other bugs lead to issues with security and might, for example, enable a malicious user to bypass firewalls in order to obtain unauthorized access or privileges. But it should be noted that computer viruses are not bugs; computer viruses replicate, while bugs do not.
As any developer knows, there are very few, if any, programs that are completely error-free, even in those that have been extensively tested.
For this reason (as well as adding new functionality), most software packages will often have a series of "point updates" issued over time, to fix "bugs" and errors as they are found.
"Computer bugs" can have serious real-world implications
Although the vast majority of bugs are rather benign in nature, there have been some instances where they have had catastrophic consequences.
For instance, during the 1980s, a bug in the code that controlled the Therac-25 radiation therapy machines resulted in the deaths of patients. In 1996, the European Space Agency's (ESA) prototype Ariane 5 rocket had to be set to self-destruct less than one minute after launch, due to software errors in its onboard guidance systems.
Famously, in 1994, an RAF Chinook helicopter crashed into the Mull of Kintyre, killing all 29 crew on board. Although originally attributed to pilot error, later investigations, notably by Computer Weekly, successfully determined that the cause was a software error in the aircraft's engine-control systems.
Interestingly, a 2002 study by the U.S. Department of Commerce's National Institute of Standards and Technology concluded that:
"Based on the software developer and user surveys, the national annual costs of inadequate infrastructure for software testing is estimated to range from $22.2 to $59.5 billion. Over half of these costs are borne by software users in the form of error avoidance and mitigation activities. The remaining costs are borne by software developers and reflect the additional testing resources that are consumed due to inadequate testing tools and methods."
What was the first use of the term "bug"?
Although the term "computer bug" is relatively recent (as it has only been applied to IT with the rise of computers) the term "bug" has been used in informal engineering terminology for some time.
The concept, although not the term, might date as far back as 1843 when Ada Lovelace spoke about the possibility of problematic program "cards" used in Charles Babbage's analytical engine.
In an 1843 letter, she noted:
"An analyzing process must equally have been performed in order to furnish the Analytical Engine with the necessary operative data, and that herein may also lie a possible source of error. Granted that the actual mechanism is unerring in its processes, the cards may give it wrong orders."
Who found the first computer bug?
The first recorded use of the term "bug", with regards to an error or malfunction in a machine, comes from none other than Thomas Edison. In an 1878 letter to an associate (which was sold at auction in 2018), he noted:
“You were partly correct, 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.”
This was in relation to Edison's attempt to develop his quadruplex telegraph system to transmit and receive up to four separate telegrams on a single wire. He found a workaround for this problem that he termed a "bug trap".
Edison also used the term extensively in his later writings and a biography of Edison noted the frequent appearance of the term "bug" in his notebooks.
In November of the same year, he wrote to Theodore Puskas:
“It has been just so in all of my inventions. The first step is intuition and comes with a burst, then difficulties arise—this thing gives out and [it is] then that "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."
What inspired the term "computer bug"?
Long before computers and software were even conceived of the term "bug" was in common use to describe errors of faults in mechanical systems.
But the actual reasoning for the first use of the term "bug", in and of itself is a little hazy, to say the least, but it may have its origins in early English parlance. Some suggest it may have been derived from the Middle English bugge which forms the basis for the term "bugbear" and "bugaboo".
In this sense, the word bug shares a common source to terms like 'goblin' (Bögge from Low German) and may also share a linguistic link to the term "gremlin" which is also often used to describe seemingly mysterious mechanical malfunctions (as in, "a gremlin in the works") first used by RAF pilots during WWII.
Whichever is the origin of the word, at some point in the mid-1800's it became a popular term for mechanical faults whose source was yet to be identified or isolated and corrected? From this point on, the word bug was commonly used in engineering jargon.
Engineers used the term extensively throughout the late 1800s, as we have seen, with it seemingly entering common use around the turn of the century.
One fun example is a popular early 20th-century mechanical pinball game called Baffle Ball that proudly advertised itself in 1931 with the term "NO BUGS IN THIS GAME!". The term was also in common use during WWII in reference to equipment that was plagued by glitches.
But there was one significant influencer who probably made the term incredibly popular in the minds of the general public - the late, great Isaac Asimov. He used the term in relation to issues with a robot in a 1944 short story entitled, "Catch That Rabbit".
This was later included in his seminal collection of short stores I, Robot. In the story, he wrote, "U.S. Robots had to get the bugs out of the multiple robots, and there were plenty of bugs, and there are always at least half a dozen bugs left for the field-testing."
According to the ACM's digital library, the term bug also appears in three papers from 1952.
Interestingly the term "debug" also predates the computer age. Some sources make mention of the term being used in relation to the testing of airplane engines during the Second World War.
By 1963 the terms "bug" and "debugging" were in common enough use to be mentioned in the Compatible Time-Sharing System(CTSS) manually without any apparent attempt to explain their meaning.
A research article written by science historian Peggy Kidwell, titled "Stalking the Elusive Computer Bug", and published in the IEEE Annals of the History of Computing, Volume 20, discusses the etymology of "bug" and "debug" in greater detail.
What was the first "computer bug" called?
Although this is a common question, it is a bit misleading. Glossing over the early past use of the term in engineering jargon (which predated the electronic computer in any case) the first real computer bug wasn't actually named per se.
Famously, the very first instance of a computer "bug" was recorded at 3:45 pm (15:45) on the 9th of September 1947. This "bug" was an actual real-life moth, well, an ex-moth, that was extracted to the number 70 relay, Panel F, of the Harvard Mark II Aiken Relay Calculator.
This "bug" (which a two-inch wingspan (5 cm)) was preserved behind a piece of adhesive tape on the machines' logbook with the now immortalized phrase "[The] First actual case of a bug being found".
So the first "computer bug" was, in fact, a literal bug.
The cause of the bug's appearance appears to have been down to members of the programming teams' late-night shift, which included the pioneering computer scientist, and former U.S. Navy Rear Admiral Grace Hopper. A team member left the windows of the room open at night. This was more than enough to let in the moth, which was attracted by the lights in the room and the heat of the calculator to nestle in the 'gubbins' of the Mark II Harvard, where it met its unfortunate end.
Moths and other insects tend to exhibit a behavior called transverse orientation. This is the way in which they tend to navigate by flying at relative angles to a distant light source.
For millions of years, this strategy served nocturnal insects well by allowing them to navigate by the light of the Moon. Of course, with the advent of electricity and artificial lighting, they often become confused.
On the 9th of September 1947, Hopper traced an error on the Mark II to a dead moth that was trapped in a relay. The insect was carefully removed and taped to the logbook, and the term computer bug was used to describe the incident.
"This logbook, complete with attached moth, is part of the collection of the Smithsonian National Museum of American History, though it is not currently on display.
While it is certain that the Harvard Mark II operators did not coin the term 'bug', it has been suggested that the incident contributed to the widespread use and acceptance of the term within the computer software lexicon." - Graham Cluley
Henceforth the term "bug" entered more general use as a way to describe any errors or glitches in a program.
However, as Hopper often mentioned, she neither coined the phrase nor found the insect in question herself. That was down to the other engineers on the team.
These engineers included William "Bill" Burke (who later worked at the Naval Weapons Laboratory, Virginia). Bill and his colleagues were clearly well versed in the meaning of the term and Hopper would later take great pleasure in recalling the story.
How to clean a bug off your computer?
While a computer bug is usually some form of a coding error, people sometimes confuse bugs with the form of malicious software like viruses or other malware.
Finding out your computer has been infected with a virus can be a nightmare for most computer users. They are not only annoying to deal with but can be time-consuming to remove completely from your computer, not to mention potentially dangerous with regards to your personal or financial information.
For this reason, it is vital that you at least have some antivirus and spyware programs installed on your computer. It is also incredibly important that you keep them up to date and ensure they are set to routinely, and automatically, scan your files for potential threats.
Bugs, in contrast, are errors in code and do not tend to be transmitted from one computer to the next, in the same way as a virus. Most bugs come from mistakes made in either the program's design or source code, or by the use of incorrect code. Software bugs can, however, cause programs to behave in ways the software manufacturer never intended. The Y2K bug famously caused the display of the wrong date, because the programs were not designed to handle dates after the year 1999.
While the Y2K bug was relatively harmless, some software bugs can pose threats that are as serious as viruses. Bugs may cause the program to crash or freeze the computer. They can also trigger errors that may have ripple effects. Some bugs can affect security and might, for example, enable cybercriminals to gain unauthorized access to a system. Once in, they can then install malware or steal private information.
For computer users, bugs cannot usually be found or fixed by using anti-virus software. They are often fixed by applying a "patch", a piece of code that corrects the error. These usually need to be downloaded from the manufacturer. This is now usually done automatically, with "updates". For more persistent problems, it is sometimes necessary to uninstall the operating system and then reinstall a less "buggy" version.
For software developers, bugs are more problematic. While the changes needed to fix them are often small and may involve changing just a few lines of code, the process of identifying exactly which lines need to be fixed can be very time-consuming.
In 2015, researchers at MIT developed software, called CodePhage, that aimed to make this process easier by autonomously repairing software bugs. The software borrows code from other programs, without requiring access to the source code, and can even work across different programming languages. This could save developers thousands of hours of programming time and lead to much more stable software.
Although not usually as malicious or difficult to remove as viruses or malware, bugs can also cause problems long into the future. Many programmers "fixed" the Y2K bug in 1999 by using a quick fix called “windowing”, which treated all dates from 00 to 20 as from the 2000s, rather than the 1900s. The problem is that when 2020 came along, some of these computers were still in use, and now instead of using the date 2020, they reverted to 1920.
WWE 2K20, a professional wrestling video game, stopped working at midnight on 1 January 2020, although the game’s developers were able to issue a downloadable fix within 24 hours.
Another piece of software, Splunk, which looks for errors in computer systems used by most top companies, was also found to be vulnerable to the windowing problem, but the company was able to develop a patch within a few days.