Debugging can be extremely difficult. Often you will be stuck in the situation of needing to track down errors in code written by someone else (as in today's exercise). When you write your own code, you have control over its quality. What can you do to improve your chances of getting it right the first time?

Novice programmers have a tendency to start writing code before they really understand what it is supposed to do. Here are some guidelines that experienced programmers have shared over the years:

As you leave lab and walk across campus, ask yourself some questions: