Tuesday, August 12, 2008

What is the difference between a bug, a defect, and an error?

Question:
What is the difference between a
bug
, a defect, and an error?

Posted by Manoj

Answer:

According to the British norm BS 7925-1: bug--generic term for fault, failure, error, human action that produces an incorrect result.
Robert Vanderwall offers these formal definitions from IEEE 610.1. The
sub-points are his own.

mistake (an error)
: A human action that produces an incorrect result.
- mistake made in translation or interpretation.
- lots of taxonomies exist to describe errors.

fault
: An incorrect step, process or data definition.
- manifestation of the error in implementation
- this is really nebulous, hard to pin down the 'location'

failure
: An incorrect result.
bug: An informal word describing any of the above. (Not IEEE)


Rohan Khale found a web site that gave these definitions:
A bug exists because what is supposed to work does not work as what you
expected. Defects occur usually when a product no longer works the way it used to.

He found these easy to understand defintions: A defect is for something that normally works, but it has something out-of-spec. On the other hand a
Bug
is something that was considered but not implemented, for whatever reasons.

I have seen these arbitrary definitions:
Error
: programmatically mistake leads to error.
Bug
: Deviation from the expected result.
Defect
: Problem in algorithm leads to failure.
Failure
: Result of any of the above.

Compare those to these arbitrary definitions:
Error
: When we get the wrong output i.e. syntax error, logical error
Fault
: When everything is correct but we are not able to get a result
Failure
: We are not able to insert any input

See also
http://en.wikipedia.org/wiki/Software_bug


In other words, the software industry can still not agree on the definitions for
bug
, defect, error, fault, or failure. In essence, if you use the term to mean one specific thing, it may not be understood to be that thing by your audience. However, since the terms are not used correctly, you should learn the meaning of them where you work. They also could go under the name of PR (Problem Report), or CR (Change Request).

No comments:

How to Get files from the directory - One more method

 import os import openpyxl # Specify the target folder folder_path = "C:/Your/Target/Folder"  # Replace with the actual path # Cre...