A software bug is the common term used to describe an error, flaw, mistake, failure, or fault in a computer program or system that produces an incorrect or unexpected result, or causes it to behave in unintended ways. Most bugs arise from mistakes and errors made by people in either a program's source code or its design, and a few are caused by compilers producing incorrect code. A program that contains a large number of bugs, and/or bugs that seriously interfere with its functionality, is said to be buggy . Reports detailing bugs in a program are commonly known as bug reports , fault reports, problem reports, trouble reports, change requests, and so forth.
Effects
Main article: List of software bugsBugs 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 leading to a denial of service. Others qualify as security bugs and might for example enable a malicious user to bypass access controls in order to obtain unauthorized privileges.
The results of bugs may be extremely serious. Bugs in the code controlling the Therac-25 radiation therapy machine were directly responsible for some patient deaths in the 1980s. In 1996, the European Space Agency's US$1 billion prototype Ariane 5 rocket was destroyed less than a minute after launch, due to a bug in the on-board guidance computer program. In June 1994, a Royal Air Force Chinook crashed into the Mull of Kintyre, killing 29. This was initially dismissed as pilot error, but an investigation by Computer Weekly uncovered sufficient evidence to convince a House of Lords inquiry that it may have been caused by a software bug in the aircraft's engine control computer.
In 2002, a study commissioned by the US Department of Commerce' National Institute of Standards and Technology concluded that software bugs, or errors, are so prevalent and so detrimental that they cost the US economy an estimated $59 billion annually, or about 0.6 percent of the gross domestic product .
Etymology
The concept that software might contain errors dates back to 1842 in Ada Byron's notes on the analytical engine in which she speaks of the difficulty of preparing program 'cards' for Charles Babbage's Analytical engine:
Use of the term "bug" to describe inexplicable defects has been a part of engineering jargon for many decades and predates computers and computer software; it may have originally been used in hardware engineering to describe mechanical malfunctions. For instance, Thomas Edison wrote the following words in a letter to an associate in 1878:
Problems with radar electronics during World War II were referred to as bug s (or glitches), and there is additional evidence that the usage dates back much earlier.
The 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:
Hopper was not actually the one who found the insect, as she readily acknowledged. And the date was September 9 , but in 1947, not 1945. The operators who did find it (including William "Bill" Burke, later of the Naval Weapons Laboratory, Dahlgren Va.), were familiar with the engineering term and, amused, kept the insect with the notation "First actual case of bug being found." Hopper loved to recount the story.
While it is certain that the Mark II operators did not coin the term "bug", it has been suggested that they did coin the related term, "debug". Even this is unlikely, since the Oxford English Dictionary entry for "debug" contains a use of "debugging" in the context of airplane engines in 1945 (see the debugging article for more).
Prevention
Bugs are a consequence of the nature of human factors in the programming task. They arise from oversights or mutual misunderstandings made by a software team during specification, design, coding, data entry and documentation. For example: In creating a relatively simple program to sort a list of words into alphabetical order, one's design might fail to consider what should happen when a word contains a hyphen. Perhaps, when converting the abstract design into the chosen programming language, one might inadvertently create an off-by-one error and fail to sort the last word in the list. Finally, when typing the resulting program into the computer, one might accidentally type a '<' where a '>' was intended, perhaps resulting in the words being sorted into reverse alphabetical order. More complex bugs can arise from unintended interactions between different parts of a computer program. This frequently occurs because computer programs can be complex — millions of lines long in some cases — often having been programmed by many people over a great length of time, so that programmers are unable to mentally track every possible way in which parts can interact. Another category of bug called a race condition comes about either when a process is running in more than one thread or two or more processes run simultaneously, and the exact order of execution of the critical sequences of code have not been properly synchronized.
The software industry has put much effort into finding methods for preventing programmers from inadvertently introducing bugs while writing software. These include:
Debugging
Main article: DebuggingFinding and fixing bugs, or "debugging", has always been a major part of computer programming. Maurice Wilkes, an early computing pioneer, described 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. Software testers are professionals whose primary task is to find bugs, or write code to support testing. On some projects, more resources can be spent on testing than in developing the program.
Usually, the most difficult part of debugging is finding the bug in the source code. Once it is found, correcting it is usually relatively easy. Programs known as debuggers exist to help programmers locate bugs by executing code line by line, watching variable values, and other features to observe program behavior. Without a debugger, code can be added so that messages or values can be written to a console (for example with printf in the c language) or to a window or log file to trace program execution or show values.
However, even with the aid of a debugger, locating bugs is something of an art. It is not uncommon for a bug in one section of a program to cause failures in a completely different section, thus making it especially difficult to track (for example, an error in a graphics rendering routine causing a file I/O routine to fail), in an apparently unrelated part of the system.
Sometimes, a bug is not an isolated flaw, but represents an error of thinking or planning on the part of the programmer. Such logic errors require a section of the program to be overhauled or rewritten. As a part of Code review, stepping through the code modelling the execution process in one's head or on paper can often find these errors without ever needing to reproduce the bug as such, if it can be shown there is some faulty logic in its implementation.
But more typically, the first step in locating a bug is to reproduce it reliably. 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 find the point at which the program went astray.
It is not always easy to reproduce bugs. Some are triggered by inputs to the program which may be difficult for the programmer to re-create. One cause of the Therac-25 radiation machine deaths was a bug (specifically, a race condition) that occurred only when the machine operator very rapidly entered a treatment plan; it took days of practice to become able to do this, so the bug did not manifest in testing or when the manufacturer attempted to duplicate it. 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 effort. Since the 1990s, particularly following the Ariane 5 Flight 501 disaster, there has been a renewed interest in the development of effective automated aids to debugging. For instance, methods of static code analysis by abstract interpretation have already made significant achievements, while still remaining much of a work in progress.
As with any creative act, sometimes a flash of inspiration will show a solution, but this is rare and, by definition, cannot be relied on.
There are also classes of bugs that have nothing to do with the code itself. If, for example, one relies on faulty documentation or hardware, the code may be written perfectly properly to what the documentation says, but the bug truly lies in the documentation or hardware, not the code. However, it is common to change the code instead of the ot
Fix my broken computer, bridgend computer repairs, laptop repair, pc ...
Telephone (01656) 880648 Mobile 07930 673053 Email: repairs@fixmybrokencomputer.com Welcome To Fix My Broken Computer First Class Local Computer Repair Service- Evenings and ...
Fix my computer! In Home PC Repair
If you scream fix my computer call your geek in rowayton we do spyware removal tivo set up in home pc repair & wireless network.
fix my PC now | Online Computer Repair | PC Tune-up | Remove Spyware
fix my PC now! Nationwide computer and network services for your home or office. Online Computer Repair, Networking Help, PC Tune-up, Spyware Removal, Hardware Installation and ...
Fix Computer | Computer Technical Support | DigitalSupport.com
Need computer technical support? We fix computer problems instantly - Let DigitalSupport.com restore, fix, and clean up your computer for quicker running - we provide affordable ...
FixMyOwnComputer :: How To Videos, Tutorials Videos, Education Videos.
Fix My Own Computer - ... A BIOS security password restricts a computer from booting until a correct password is provided.
Welcome to Fix My Computer - How can we help you?
Our mission is to offer you the fastest and the best computer help, repairs and technical support. We’ll come directly to your home or office and solve your computer problem on ...
Home | Fix My PC Right Now - Computer Repair
PC Repair for the DFW Metroplex including Plano, Frisco, Allen, Richardson, McKinney, Parker, Garland, Wylie, Sachse, and The Colony
How To Fix My Computer | Learn How To Fix Your Own Computer | Fix ...
How To Fix My Computer, books on computer, change windows registry, computer hangs, computer repair, computer windows xp, delete internet explorer, disable internet explorer, edit ...
Hey Fix My Computer
Fix My Computer specializes in: Quick response, On-site Customer Support, hardware repair troubleshooting & repair, PC Workstation / Server repairs. Repairs are completed on-site ...
Welcome to Fix My Darn Computer!
Insert Description Here ... 2009 -- FIX MY DARN COMPUTER REPAIR & SERVICES