Testing is essential if you want to have any faith that your programs work.

For each of the examples you wrote down in the Examples step, starting with the simplest,

  1. type it into the Interactions window (just the expression itself, not the semicolon or the "expected answer"), and
  2. see whether it gives the answer you expected.
  3. If it's not what you expected, either you were expecting the wrong thing (possible, though unlikely) or there's a bug in your program. Figure out how the answer is wrong (not just that it's wrong) and how this wrong answer could have happened, fix it, and try again. When you fix a bug, be sure to re-examine the previously working examples to make sure they still work!

Last modified: Thu Jun 1 15:31:53 EDT 2000
Stephen Bloch / sbloch@adelphi.edu