Avoiding Bugs

The first step in avoiding or fixing bugs is understanding the three kinds of errors you can encounter:

Because successful debugging requires that you understand what’s going on when your code runs, you’ll want to design code that’s easy to analyze. Try the following techniques when designing your code to make the debugging process easier: