How do you know if your algorithm (program)
works?
Well..you test it...Try it
out with a variety of test data and see if any problems arise.
One technique is to dry run the program.
This involves writing down a table of the
instructions that are executed and noting the values of all the
constants and variables as each instruction is executed.
Okay..so you need a lot of
paper...but it is a useful technique if you have a program which
does not work properly....and it really is useful when doing
Assembly Language programming...but that's another story....
|