• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 13. Debugging > Avoiding Bugs

Avoiding Bugs

Try as we might, it just seems that creating bugs is an inevitable side effect of writing code. Even the most careful programmers inadvertently create bugs. Many of the time-tested methods of limiting the number of bugs we create involve following good coding practices. We'll look at a number of useful tips that will not only reduce your bug count, they'll also make you a better coder.

If your house is a mess and cleaning is often the last thing on your mind, you may discover that your home has uninvited guests. The little critters are happy to clean up your mess for you; unfortunately, they make a mess of their own in the process. If you want fewer bugs in your home, you have to keep things clean, and relocate (or squash, depending on your approach) the bugs you find. The first technique we'll examine is also one of the first steps in reducing bugs—writing clean code.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint