Professional Researcher's Encyclopaedia

Knowledge is only a click away

Computer bug - enyclopaedia article

Computer bug

Summary: A computer bug is an error, flaw, mistake or fault in a computer program which prevents it from working correctly. Bugs arise from mistakes and errors in either a program's source code or its design. It is said that there are bugs in all useful computer programs, but well-written programs contain relatively few bugs, and these bugs typically do not prevent the program from performing its task. Buggy programs (sometimes referred to as defective software), are those applications which contain a la ...

read the full Computer bug article

Buy Computer bug related products:


Buy from Amazon.co.uk Books - Music - Classical - VHS - DVD - Video-games - Software - Electronics - Toys
Buy from Amazon.com Books - Music - Classical - VHS - DVD - Videogames - Software - Electronics - Photo - Toys
Buy from Amazon.ca Books - Music - Classical - VHS - DVD - Video-games - Software - Livres en Français
Buy from Amazon.de - - - - - - -
Buy from Amazon.fr - - - - -
Advanced Product Search (new):    uk    |     us    |     ca    |     de    |     fr

Computer bug

     From Wikipedia, the free encyclopedia.

A computer bug is an error, flaw, mistake or fault in a computer program which prevents it from working correctly. Bugs arise from mistakes and errors in either a program's source code or its design. It is said that there are bugs in all useful computer programs, but well-written programs contain relatively few bugs, and these bugs typically do not prevent the program from performing its task. Buggy programs (sometimes referred to as defective software), are those applications which contain a large number of bugs, and/or bugs which seriously interfere with the program's functionality.

Table of contents
1 Overview
2 Etymology
3 Preventing bugs
4 Debugging
5 List of computer bugs
6 Common types of computer bugs
7 External links and references
8 Note: Early usage of the term bug

Overview

Bugs can have a wide variety of effects, with varying levels of inconvenience to the user of the program. Some bugs have only a subtle effect on the program's functionality, and may thus lie undetected for a long time. More serious bugs may cause the program to crash or freeze. In some operating systems, such as Microsoft Windows, crashing or freezing programs may render the computer unusable until it is rebooted (see blue screen of death.) Other bugs lead to security problems; for example, a common type of bug called a buffer overflow may allow a malicious user to execute a new program that is normally not allowed to run.

The results of bugs may be extremely serious. In 1962, an omitted hyphen in a Fortran program led to the loss of the Mariner 1 Venus probe, which cost over $80 million; Arthur C. Clarke dubbed this "the most expensive hyphen in history". In 1996, the European Space Agency's prototype Ariane 5 rocket was destroyed less than a minute after launch due to a bug in the on-board guidance computer, costing over US$1 billion.

Etymology

Usage of the term "bug" to describe inexplicable defects has been a part of engineering jargon for many decades; it may have originally been used in hardware engineering to describe mechanical malfunctions. Problems with radar electronics during World War II were referred to as bugs (or glitches), and there is evidence that the usage dates back as early as the 1870s, when it was known to have been used by Thomas Edison in his notebooks and in .

Invention of the term is often erroneously attributed to Grace Hopper, who publicized the cause of a malfunction in an early electromechanical computer. A typical version of the story is given by this quote:

In 1946, when Hopper was released from active duty, she joined the Harvard Faculty at the Computation Laboratory where she continued her work on the Mark II and Mark III. Operators traced an error in the Mark II to a moth trapped in a relay, coining the term bug. This bug was carefully removed and taped to the log book September 9th 1945. Hopper recounted the cause to be an actual insect stuck between the contacts of a relay in the logic mechanisms of the device. Stemming from the first bug, today we call an error in a program a bug. [1]
Hopper was not actually the one who found the insect, as she readily acknowledged. The operators who did find it were familiar with the engineering term and, amused, kept the insect with the notation "First actual case of a bug being found." Hopper loved to recount the story. [1]

Preventing bugs

Bugs are a consequence of the nature of the programming task. Some bugs arise from simple oversights made when computer programmers write source code carelessly or exceed their hrair limit. Many off-by-one errors fall into this category. Other bugs arise from unintended interactions between different parts of a computer program. This happens because computer programs are often complex, so that programmers are unable to mentally keep track of every possible way in which different parts can interact. Many race condition bugs fall into this category.

The computer software industry has put a great deal of effort into finding methods for preventing programmers from inadvertently introducing bugs while writing software. These include:

  • Programming techniques. Bugs often create inconsistencies in the internal data of a running program. Programs can be written to check the consistency of their own internal data while running. If an inconsistency is encountered, the program can immediately halt, so that the bug can be located and fixed. Alternatively, the program can simply inform the user, attempt to correct the inconsistency, and continue running.
  • Development methodologies. There are several schemes for managing programmer activity, so that fewer bugs are produced. Many of these fall under the discipline of software engineering (which addresses software design issues as well.)
  • Programming language support. Programming languages often include features which help programmers deal with bugs, such as exception handling. In addition, many recently-invented languages have deliberately excluded features which can easily lead to bugs. For example, the Java programming language does not support pointer arithmetic.
There is also a great amount of efforts devoted to detecting bugs, mostly around the concepts of type systems and program verification.

Debugging

Finding and fixing bugs, or "debugging", has always been a major part of computer programming. Maurice Wilkes, an early computing pioneer, describes his realization in the late 1940s that much of the rest of his life would be spent finding mistakes in his own programs. As computer programs grow more complex, bugs become more common and difficult to fix. Often, programmers spend more time and effort finding and fixing bugs than writing new code.

Usually, the most difficult part of debugging is locating the erroneous part of the source code. Once the mistake is found, correcting it is usually easy. Programs known as debuggers exist to help programmers locate bugs. However, even with the aid of a debugger, locating bugs is something of an art.

Typically, the first step in locating a bug is finding a way to reproduce it easily. Once the bug is reproduced, the programmer can use a debugger or some other tool to monitor the execution of the program in the faulty region, and (eventually) find the problem. However, it is not always easy to reproduce bugs. Some bugs are triggered by inputs to the program which may be difficult for the programmer to re-create. Other bugs may disappear when the program is run with a debugger; these are heisenbugs (humorously named after the Heisenberg uncertainty principle.) Debugging is still a tedious task requiring considerable manpower. Since the 1990s, particularly following the Ariane 5 Flight 501 disaster, there has been a renewed interest in the development effective automated aids to debugging. For instance, methods of static analysis by abstract interpretation have already made significant achievements, while still remaining much of a work in progress.

List of computer bugs

The following is a list of famous computer bugs:

Space exploration

Medical

  • The Therac-25 accidents (1985-1987), quite possibly the most serious computer-related failure ever in terms of human life lost.

Computing

  • Pentium FDIV bug
  • The year 2000 problem, popularly known as the "Y2K bug", spawned fears of worldwide economic collapse and an industry of consultants providing last-minute fixes

Telecommunications

Science fiction

Common types of computer bugs

External links and references

See also: Bugzilla, Bit rot

Note: Early usage of the term bug

One 19th-century example of the term bug being used in the same sense as "computer bug" can be found in a letter from Edison to an associate in 1878:

I have the right principle and am on the right track, but time, hard work and some good luck are necessary too. 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.
While obviously Edison was not talking about a computer at the time (he was writing about electric lighting), his description of them is still mostly consistent with the current usage of the term. Moreover, the word bug has been used generally in this same sense since long before there were computers; this fact is well known to everyone except those in computer culture, who usually think they invented everything that existed 100 or 1000 years ago.

Source: Edison to Puskas, 13 November 1878, Edison papers, Edison National Laboratory, U.S. National Park Service, West Orange, N.J., cited in Thomas P. Hughes, American Genesis: A History of the American Genius for Invention, Penguin Books, 1989, on page 75.

link to this article with the following HTML

 
This article is from Wikipedia. This article was up-to-date as of 8 May 2004 - See live article
All text is available under the terms of the GNU Free Documentation License.

This page is part of Professional Researcher
Web site design by Dean Marshall