The following is extracted from << Find the Bug >> by Adam Barr.Although they seem trivial tips, yet they are quite useful.These are the steps to take when looking at code. Keep in mind that, hopefully, you will not Need to Go Through all the steps:
1.
Split The Code Into Sections with Goals. Separate The Code Into Smaller Sections and Determine What Changes Each Section Is Suppodosed To make To the program's variables.
2.
Identify The meaning of it. Figure out the logical meaning of each variable and note where it is used and modified.
3.
Look for known gotchaas. Do some quick checks of the code to look for some bar ire................
4.
CHOOSE INPUTS for Walkthroughs. Pick a Good set of inputs to use when Walking through the code.
5.
Walk Through Each Section. Carefully Walk Through The Code, Emulating Each Instruction in Your Mind and Tracking What Changes It Makes To The Variables in The Program.