It is better to try to keep a bad thing from happening than it is to fix the bad thing once it has happened

In software engineering literature there are various definition for bug1, error, failure, defect2, fault3. Many of us spend more time testing than programming. But we still can find something like this:

Post from Hacker News

Full post here.

Old excavation ...

Full information here.

## Why is software defective?

Because people are imperfect! Maybe in the future when AI will write code replacing people with it, the code will be free from defects. But I think it is still a long way to go.

## How does it become defective?

Code become defective by obvious things such as incorrect program logic, errors of omission, unnecessary complexity, re-inventing the wheel in the wrong way. Omission opportunities for improvement, forgetting to cover for all error conditions, mismatched comments.

Lets be honest, most programmers do not on purpose write defected software, but of course software development process should strive to reduce the number of defects in the products the earliest possible.

Basically the goal is to minimization the number of defects in the last iteration. That means minimize the number of defects in the final version product released to users. The problem is to estimate the number of defects that can appear in software.

A large portion of the cost of software development consists of error removal and reworking on projects. The reworking process costs more than the initial process so early detection of defects during the design and requirements phase is necessary to avoid this extra expense. A large number of defects usually occur in the initial stages of a project and early defect detection will lower the overall cost of the project.

There are also a lot of testing teams whose service is software testing. Also, some companies can charge their customers for some additional features that customer cold: “bug”. In the most of cases, there is no bug but new functionality. If you work as a freelancer you can make some money fixing some others mistakes, porting system or an app.

## Conclusion

For better clients/users satisfaction quality matters. If you care about quality, cost of production are less expensive, you can avoid unpleasant surprises in the final stages of product delivery and also you can save money.

#### Reference:

Annotations:

1. A software bug is an error, flaw, failure or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways.

2. Defect life cycle is a cycle which a defect goes through during its lifetime. It starts when defect is found and ends when a defect is closed, after ensuring it’s not reproduced. Defect life cycle is related to the bug found during testing. From: http://istqbexamcertification.com/

3. Systematic faults are often a result of an error in the specification of the equipment and therefore affect all examples of that type. Such faults can remain undetected for years, until conditions conduce to create the failure. Given the same circumstances, each and every example of the equipment would fail identically at that time. From: https://en.wikipedia.org/wiki/Fault_(technology)