9 Debugging a program structurally

Your best ally in terms of debugging a program is to design it right to begin with.

 9.1 Shorter subroutines
 9.2 Think top-down, do bottom-up
 9.3 Get rid of global variables, as much as possible