You get a bonus - 1 coin for daily activity. Now you have 1 coin

Causes of bugs: where do software errors come from?

Lecture



Why is it that programs sometimes work incorrectly? It's very simple – they are created and used by people. If a user makes a mistake, this can lead to a problem in the program's operation – it is used incorrectly, which means it may behave differently than expected.

An error (error) is a human action that produces an incorrect result.

However, programs are developed and created by people, who can also make (and do make) mistakes. This means that flaws also exist in the software itself. They are called defects or bugs (both terms are equivalent). It is important to remember here that software is something more than just code.

Defect, Bug (Defect, Bug) – a flaw in a component or system that can cause it to fail to perform a certain function. A defect discovered during program execution can cause the failure of an individual component or of the entire system.

When the program code is executed, defects that were introduced back when it was written can manifest themselves: the program may fail to do what it should, or conversely – do what it should not – a failure occurs.

A failure (failure) is a discrepancy between the actual result (actualresult) of the operation of a component or system and the expected result (expectedresult).

A failure in the program's operation can be an indicator of the presence of a defect in it.

Thus, a bug exists when three conditions are simultaneously met:

  • 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 bugs cause failures – some of them may never manifest themselves at all and remain unnoticed (or may manifest only under very specific circumstances).

The cause of failures can be not only defects, but also environmental conditions: for example, radiation, electromagnetic fields, or pollution can also affect the operation of both software and hardware.

There are, in total, several sources of defects and, accordingly, failures:

  • errors in the specification, design, or implementation of the software system;
  • errors in using the system;
  • adverse environmental conditions;
  • intentional damage;
  • potential consequences of previous errors, conditions, or intentional actions.

Defects can arise at different levels, and the quality of the system will directly depend on whether and when they are fixed.

Quality (Quality) is the degree to which a set of inherent characteristics meets requirements.

Software Quality (Software Quality) is the set of characteristics of software that reflect its ability to satisfy stated and implied needs.

Requirement – a stated need or expectation. It is generally implied or obligatory.

Causes of bugs: where do software errors come from?

In the first case, everything was done correctly, and we obtained a product that fully meets the customer's expectations and satisfies the quality criteria.

In the second case, errors were already made during coding, which led to defects appearing in the finished product. But at this level, bugs are fairly easy to detect and fix, since we can see the discrepancy with the requirements.

The third variant is worse – here, errors were made at the system design stage. This can only be noticed by carrying out a thorough check against the specification. Fixing such defects is also not easy – the product's design has to be reworked from scratch.

In the fourth case, defects were introduced back at the stage of forming the requirements; all further development, and even testing, followed an initially incorrect path from the start. During testing we will not find any bugs – the program will pass all the tests, but may be rejected by the customer.

Conditionally, five causes of defects appearing in program code can be identified.

  1. Lack or absence of communication within the team. Often, business requirements simply do not reach the development team. The customer has an understanding of what they want the finished product to look like, but if their idea is not properly explained to the developers and testers, the result may turn out to be different from what was intended. Requirements must be accessible and understandable to all participants in the software development process.
  2. Software complexity. Modern software consists of many components that are combined into complex software systems. Multithreaded applications, client-server and distributed architecture, multi-tier databases – programs are becoming increasingly complex to write and maintain, and the work of programmers is becoming correspondingly harder. And the harder the work, the more mistakes the person performing it can make.
  3. Changes in requirements. Even minor changes to requirements at late stages of development require a large amount of work to modify the system. The application's design and architecture change, which in turn requires changes to the source code and to the principles of interaction between program modules. Such ongoing changes often become a source of hard-to-detect defects. Nevertheless, frequently changing requirements in modern business are more the rule than the exception, so continuous testing and risk control under such conditions are a direct responsibility of quality assurance department specialists.
  4. Poorly documented code. It is difficult to maintain and modify poorly written and weakly documented program code. Many companies have specific rules for how programmers should write and document code. In practice, however, it often happens that developers are forced to write programs quickly above all else, and this affects the quality of the product.
  5. Software development tools. Visualization tools, libraries, compilers, script generators, and other auxiliary development tools are also often poorly functioning and weakly documented programs, which can become a source of defects in the finished product.

See also

  • [[b5190]]
  • [[b5189]]
  • [[b6116]]
  • [[b766]]
  • [[b9450]]
  • [[b8636]]
  • [[b6184]]

See also

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Quality Assurance"

Terms: Quality Assurance