The Origin of the Term 'Computer Bug'

The origin and history of "Computer Bugs" is a surprisingly long and fascinating one. Join us as we explore its origins and popularization in IT terminology.

The Origin of the Term 'Computer Bug'

The term "Computer Bug" or "Software Bug" is ubiquitous in IT parlance but where did the term actually come from? Although the modern forms 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 or 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 its overall design, or within components and operating systems used by the programs in question.

Some others are also the result of errors in translation between different languages by compilers that produce incorrect or illegible code. 

"From a developer perspective, bugs can be syntax or logic errors within the source code of a program. These errors can often be fixed using a development tool aptly named a debugger." - TechTerms

The term 'buggy' is often ascribed to programs that contain large numbers of bugs and/or bug 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 qualify as security bugs and might, for example, enable a malicious user to bypass access controls in order to obtain unauthorized privileges. But it should be noted that things like computer viruses are not bugs - they replicate, 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 that are found throughout time. 

computer bug
Source: wongo888/Flickr

'Computer Bugs' can have serious real-world implications

Although the vast majority of bugs are rather benign in nature there have been some instances in history when they have catastrophic consequences. 

For instance during the 1980's 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 self-destructed less than 1 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 inquiries, 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 an 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 a relatively recent construct (i.e. only applied to IT with the rise of computers) the term 'bug' has been used in informal engineering terminology for some time. 

The very concept, though 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."

The first recorded use of the term 'bug', with regards to being an error or malfunction in a machine, comes from none other than Thomas Edison. In an 1878 letter to an associate (which was sold in an 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.”

computer bug edison letter bug
Source: Adapted from SwannGalleries

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 later used the term extensively in his later writings and a later Edison biography 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 an 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, it shares a common source to terms like 'goblin' (Bögge from Low German) and may also share a linguistic evolution with the term "gremlin" which is also often used to describe seemingly mysterious mechanical malfunctions first coined by RAF pilot during WW2.

Whichever is the case 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 it was commonly used in engineering jargon until the present day.

The likes of Thomas Edison would use it extensively throughout the late 1800's, as we have seen, with it seemingly entering common use around the turn of the Century. 

A fun example is a 1931 popular mechanical pinball game called Baffle Ball that proudly advertised itself as "NO BUGS IN THIS GAME!". The term was also common during WW2 to refer to any equipment that was plagued by glitches. 

computer bug Baffle Ball
Source: Gottlieb/Wikimedia Commons

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 made good use of the term to relate to issues with a robot in his 1944 short story "Catch That Rabbit". 

This was later included in his seminal collection of short stores I, Robot. Within this 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."

Interestingly the term "debug" also predates the computer age. Wikipedia also makes mention of the term being used in relation to airplane engines and the testing thereof during the second world war.

Early in-depth discussions on programming errors in 1951 didn't actually make reference to the term "bug" but it, according to the ACM's digital library does appear in three papers from 1952

By 1963 the term "bug" and "debugging" were in common enough use to be mentioned in the Compatible Time-Sharing System (CTSS) manual without any apparent attempt to explain its meaning.

Kidwell's article Stalking the Elusive Computer Bug discusses the etymology of "bug" and "debug" in greater detail.

computer bug found
Source: Pixabay

What was the first "Computer Bug" called?

Although this appears to be a common question its a bit of a misnomer. 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, well ex-moth, that was extracted from the number 70 relay, Panel F, of the Harvard Mark II Aiken Relay Calculator.

This "bug" was preserved for all time 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 real insect. 

The cause appears to have been the programming team's, that including Grace Hopper, late night shift who left the windows of the room open at night. This was more than enough for the moth, with a two-inch wingspan (5 cm) to be attracted by the lights in the room and the heat of the calculator. 

It is thought this is why it was attracted to nestle in the 'gubbins' of the Mark II Harvard where it met its unfortunate end.

The Origin of the Term 'Computer Bug'
Source: Adapted from U.S. Naval Historical Center/Wikimedia Commons

Moth's and over insects tend to exhibit a behavior called transverse orientation. This is the way in which insects tend to navigate and they do this by flying at relative angles to a distant light source.

For millions of years, this strategy served insects well allowing nocturnal genera to navigate by the light of the moon. Of course with the advent of electricity, more importantly, artificial lighting, they do get confused on fairly regular occasions. 

"This log book, 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

Did Grace Hopper find the first "Computer Bug"?

The common story about this event goes something like this:-

Grace Hopper was released from active service after the war in 1946 when she joined the Harvard Faculty at their Computation Laboratory. Here she continued her work on the Mark II and Mark III computers. 


Computer Tabs: Friend or Foe?

On the 9th September, 1947 Grace 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 log book and the term computer bug was coined.

Henceforth the term "Bug" was used to describe any errors or glitches in a program. 

However, as Grace often espoused, she neither coined the phrase nor found the insect in question herself. In fact, it was her team who found the offending organism, extracted it and duly noted its presence (and remains) in the Mark II's logbook.

computer bug Grace Hopper
Source: United States Navy/Wikimedia Commons

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.