2015/11/04

Where Do Software Bugs Come From?


Why do programs work incorrectly? The answer is simple – they are created and used by people. There can be different types of errors, so let's first analyze them to find out where they come from.

An Error is a human action that produces an incorrect result. The programs are designed and created by people who may make (and they do make) errors. This means that there are deficiencies in software. They are called software defects or software bugs. It is important to remember that the software is more than just the code.


A Defect or Bug is the problem that occurs with an individual component and/or an entire system and which can lead to a failure in functionality. The bugs are noticed during the program use either when it doesn't work as it is expected to or vice versa when it works as it shouldn't work. This is called a failure.

A Failure is a noncompliance of actual result of how a component or system work with its expected result. Failure in program functioning may be an indicator of a defect in it.
Thus, there is definitely a defect if the following three conditions are satisfied:
- The expected result is known;
- The actual result is known;
- The actual result differs from the expected result.

It is important to understand that not all the bugs cause failures. Some of them remain unnoticed and might occur only under certain conditions.

There can be other reasons for failure except defects, for example such environmental conditions as radiation, electromagnetic fields or contamination. They might also affect the performance of both software and hardware.

In total there are several sources of defects and hence failures:
- Errors in the specification, design and implementation of a software system;

- Errors in system use;

- Adverse environmental conditions;

- Deliberately caused harm;

- The potential consequences of previous errors, conditions or deliberately harmful actions.

Defects can occur at different levels, so the software quality will depend on if and/or when these defects are fixed.

No comments: