Ns, but I was watching the master at work:
Take your code line by line, plug in all possible values (Did I check all inputs that the end user may do?) for each line, does the next line after that work correctly? Take about 10 lines, do these lines together work correctly? (Usually he brakes them up into sections based loops or conditional code) Take the whole thing after that, does that work correctly?