Previous Section Table of Contents Next Section

16.2 Avoiding Problems

I would be remiss if I didn't begin with the usual obligatory comments about avoiding bugs in the first place. Life will be much simpler if you can avoid debugging. While this is not always possible, there are several things you can do to minimize the amount of debugging you'll need.

  • Carefully design your program before you begin coding.

  • Be willing to scrap what you've done and start over.

  • Comment your code and use reasonable naming conventions.

  • Don't try to get too clever.

  • Develop and test your code incrementally.

  • Never try to write code when you are fatigued or distracted.

  • Master all the programming tools that are available to you.

Of course, you already knew all of this. But sometimes it doesn't hurt to badger someone just a little.

    Previous Section Table of Contents Next Section