To Avoid Most Faceable Errors in                                                     Programming

To Avoid Most Faceable Errors in Programming

The best developer becomes comfortable to navigate the errors/bugs in programs and software’s. 5 types of errors are mostly facing on coders. They are, •Syntax Errors •Logic Errors •Compilation Errors •Arithmetic Errors •Runtime Errors

Syntax Errors:- It is a rule of computer languages. Computers are strictly following the rules and can’t ignore the mistakes. If you print the word “hi” the code is print (‘hi’), but accidentally missing any one symbols like quotation, parentheses and etc. That time the syntax error will happen and stop the program running.
To use text editors or IDEs to decrease the syntax errors. It will warn you about syntax errors at the time of writing.

Logic Error:- This error is hardest to find. All codes are looks like correct but the program isn’t run. To understand what you’re trying to accomplish? And what your code did? Start the debugger and resolve the syntax error and identify key variables or conditions to resolve the errors.

Compilation Errors:- Some programming languages require a compilation step. It converts high level language to low level language that the computer understands better. The compilation error occurs the computer doesn’t know how to convert your code in low level language. You can correct the error by deleting extra semicolons, replacing commas with semicolons, or reintroducing missing semicolons. To prevent going in an infinite loop during the correction.

Arithmetic Errors:- It is type of logic error but involve mathematics. For example when performing division algorithm is that cannot be divisible by zero it is arithmetic error. Having functional tests that always include edge-cases like zero, or negative numbers is an excellent way to stop these arithmetic errors in their tracks.

Runtime Error:-

Runtime errors happen as a user is executing your program. All code is looking like correct but the code is run exception is occur this error is called runtime error.
You can correct the error by deleting extra semicolons, replacing commas with semicolons, or reintroducing missing semicolons. To prevent going in an infinite loop during the correction. To clear above all the errors to clear runtime error.

Conclusion:- This article has prepared for different types of errors in programming and to avoid most faceable errors on your program.

  • By Balaganeshan P