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

Types of programming errors

Lecture



There are various types of software errors that can occur during the development phase of a software program and each programmer should be aware of them.

In this article, you will find a description of the most common programming errors that each developer may encounter.

Programming errors, more commonly known as bugs in jargon, are the scourge of any software developer. As machines are increasingly used in automatic mode, with onboard embedded systems or computers controlling their operation, a software error can have serious consequences. There were cases when space shuttles and aircraft crashed due to software errors in embedded computer equipment. One loophole left in the operating system code can provide an entry point for hackers who can exploit this vulnerability. These errors need to be taken very seriously, as we increasingly rely on computers.

Main types of programming errors

Computer programming is a huge field with hundreds of languages ​​that use millions of applications. These include operating system programming, application programming, embedded system coding, web development, applications for mobile platforms, development of programs deployed on the Internet, scientific computing. The table presents the main types of errors.

Type of programming errors

Description

Logical error

This is perhaps the most serious of all mistakes. When a program written in any language compiles and works correctly, but gives the wrong output, the flaw is in the logic of the main programming. This is a mistake that was inherited from a flaw in the basic algorithm. The logic itself, on which the entire program is based, is flawed. To find a solution to this error, you need a fundamental change in the algorithm. You need to start digging at the algorithmic level to narrow the search for such an error.

Syntax error

Each computer language such as C, Java, Perl, and Python has a specific syntax in which the code will be written. When a programmer does not adhere to the “grammar” specifications of a computer language, a syntax error will occur. Such errors are easily eliminated at compile time.

Compilation error

Compilation is a process in which a program written in a high-level language is converted into a machine-readable form. Many types of errors can occur at this stage, including syntax errors. Sometimes, the source code syntax may be flawless, but a compilation error can still occur. This may be due to problems in the compiler itself. These errors are corrected at the development stage.

Runtime Errors ( Run Time)

The program code was successfully compiled, and an executable file was created. You can breathe a sigh of relief and run the program to check its operation. Errors during program execution may occur as a result of an accident or lack of carrier resources. The developer should have foreseen the real conditions of the program deployment. This can be corrected by returning to the coding stage.

Arithmetic error

Many programs use numeric variables, and the algorithm may include several mathematical calculations. Arithmetic errors occur when the computer cannot cope with problems, such as "Division by zero", or leading to an infinite result. This is again a logical error, which can only be corrected by changing the algorithm.

Resource errors

A resource error occurs when the value of a variable overflows the maximum allowed value. Buffer overflow, use of an uninitialized variable, access violation and stack overflow are examples of some common errors.

Interaction error

They may occur due to software mismatch with hardware interface or application programming interface. In the case of web applications, an interface error may be the result of a misuse of the web protocol.

Intensive testing and the debugging phase are an integral part of the software development cycle that can help nip these errors before the full-scale software deployment takes place. Many errors can be avoided by pre-planning during the coding stage. Most errors can be fixed in the software development process through practice and rigorous debugging procedures. Mistakes are part of the training, and they can never be completely avoided. However , you may have new mistakes, but you should not repeat the old ones!

created: 2015-05-09
updated: 2024-04-30
417



Rating 9 of 10. count vote: 2
Are you satisfied?:



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

Software and information systems development

Terms: Software and information systems development