Debugging And Code Improvement

In ideal worlds, all programmers would be so skilled and attentive to detail that they would write bug-free code. Unfortunately, we do not live in an ideal world. As such, debugging, or tracking down the source of errors and erroneous result, is an important task that all developers need to perform before they allow end-user to use their applications. We will discuss some techniques for reducing the number of bugs in code up front.

There are three categories of bugs

Syntax error:

These errors occur when code breaks the rule of the language, such as visual Basic sub statement without a closing End sub, or a forgotten closing curly braces ({}) in c#. Theses error the easiest to locate. The language complier or integrated development environment (IDE) will alert you to them and will not allow you to compile your program until you correct them.

Semantic error

These errors occur in code that is correct according to rules of the compiler, but that causes unexpected problems such as crashes or hanging on execution. A good example is code that execute in a loop but never exists the loop, either because the loop depends on the variable whose values was expected to be something different than it actually was or because the programmer forget to increment the loop counter. Another category of errors in this area includes requesting a field from a dataset, there is no way to tell if the field actually exists at compile time. these bugs are harder to detect and are one type of running error.

Logic error

Logic errors are like semantic errors, logic errors are runtime error. That is, they occur while the program is running. But unlike semantic errors, logic errors do not cause the application to crash or hang. Logic error results in unexpected values or output. This can be a result of something as simple as a mistyped variables name that happens to match another declared variable in the program. This type of error can be extremely difficult to track down to eliminate.

Preventing Debug Write readable code

Develop and make consistent use of naming and coding standards. It not that important which standard we use, such as Hungarian notation or Pascal, Casing (First Name) or other naming conventions, as long as we use one. We should also strive for consistency in our comments and encourage liberal commenting code.

Create effective test plan

The only effective way to eliminate logic error is to test very path of your application with every possible data values that a user could enter. This is difficult to manage without effective planning. We should create our test plan at the same time we are designing the application, and we should update these plans as you modify the application design

This site is designed to help BCA MCA student to develop final project and synopsis Download Free BCA Project, MCA Project, IT Projects, Final report and Project synopsis with Full documentation and code

Free download MCA projects in ASP.NET with complete source code, Free download MCA projects in VB,NET with complete source code, Free download MCA MSc projects in C#.net with complete source code,

Free download MCA projects in JAVA with complete source code, Free download MCA projects in PHP with complete source code, Free download BSc CS IT projects in PHP,JAVA, ASP.NET with source code

Computer Science Final Project , Free download MCA projects in asp.net , Free download MCA projects in vb.net, Free download MCA projects in C#.net, Free download MCA projects in java, Free download MCA projects in PHP