By Elliot Orth
How do software errors appear?
Why do programs go wrong? It’s very simple – they are created and used by people. If the user makes a mistake, it can lead to problems with the program – it runs incorrectly, which means it can behave differently than expected. An error is a human action that produces an incorrect result.
But programs are designed and created by people who can also make (and make) mistakes. This means that there are flaws in the software itself. They are called defects or bugs (both meanings are equivalent). It’s important to remember that software is more than just code.
Bug – a defect in a component or system that can lead to a failure of certain functionality. A defect detected during program execution may cause a single component or the entire system to fail. When executing the program code, the defects inherent in its writing can be manifested: the program may not do what it should or vice versa – do what it should not – there is a failure.
Failure – the mismatch of the actual result (actual result) of the component or system to the expected result (expected result). Failure of the program may be an indicator of the presence of a defect in it. Thus, the bug exists with three conditions:
– known expected result;
– known actual result;
– the actual result differs from the expected result.
It is important to understand that not all bugs are the cause of failures – some of them may not manifest themselves and go unnoticed (or appear only in very specific circumstances). Failures can be caused not only by defects but also by environmental conditions: for example, radiation, electromagnetic fields or pollution can also affect the operation of both software and hardware.
There are five possible causes of software defects.
Lack of communication in the team
Often, business requirements simply do not reach the development team. The customer has an understanding of how he wants to see the finished product, but if his idea is not explained to developers and testers properly, the result may not be as expected. The requirements should be accessible and understandable to all participants in the software development process.
Modern software consists of many components that are combined into complex software systems. Multi-threaded applications, client-server and distributed architectures, multi-level databases – programs are becoming more complex to write and maintain, and the more complex the work of programmers. And the harder the work, the more mistakes a person can make.
Even a small change in requirements in the later stages of development requires a lot of work to make changes to the system. The design and architecture of the application are changing, which, in turn, requires changes in the source code and the principles of interaction of software modules. Such current changes are often a source of defects that are difficult to trace. However, requirements that change frequently in today’s business are the rule rather than the exception, so continuous testing and risk control in such conditions is the direct responsibility of quality assurance professionals.
Poorly documented code
Poorly written or documented code is difficult to maintain and modify. Many companies have special rules for writing and documenting code by programmers. Although in practice it often happens that developers are forced to write programs in the first place quickly and this affects the quality of the product.
Software development environment
Visualization tools, libraries, compilers, script generators, and other development tools are also often programs that work poorly and are poorly documented – they can be a source of defects in the finished product.