General Debugging
Understand the System
- Read the documentation from cover-to-cover to understand how to get the results you want
- Go in depth on things applicable at the moment
- Know your roadmap
- Understand what is black box and what is not
- Understand your debugging tools
- What tools do you have in order to solve the issue? Learn them in detail.
- Do debug logs exist?
Make it Fail
- Do it again so you can look at it, focus on the cause, and know when it is fixed
- Start at the beginning, at a known state that is reliable.
- Simulate the conditions that stimulate the failure.
- Its fine to recreate the environment of failure to an extent, but at some point the failing system may not be identical to the recreated environment.
- Record everything and find the signature of intermittent bugs
Quit Thinking and Look
- Looking is hard, in Software Code it means put in breakpoints, add debug statements, monitoring program values, and examining memory. In Data, it means look at the data manually
- Guess only to narrow the search, but always look to make sure that is indeed the issue
- Build tools to insure that it is fixed
Divide and Conquer
- Narrow the search with successive approximation.
- Determine which side the bug is on
- Use easy-to-spot test patterns
- Start with the bad/bug and go backwards
Change One Thing at a Time
- Isolate the key factor
- Change one test at a time and remember to revert back to the state if the change did not fix
- Compare with a good one
- Determine what you changed since the last time it worked properly
Keep and Audit Trail
- Document what you did, in what order, and what happened as a result
- Any detail could be an important one
- Correlate events.
- "It made noise for four seconds starting at 21:04:53" is better than "it made noise"
Check the Plug
- Question your assumptions
- Are you running the latest code?
- Start at the Beginning
- Is it plugged in to power? Is power working to begin with?
- Is the correct input going through?
- Test the Tool
- Does it work on others?
Get a Fresh View
- Ask for fresh insights
- Coworkers is all around you, and consider tracking down an expert
- Report Symptoms, Not theories
- See if a colleague can reach same conclusion without telling them your conclusion
If you Didnt Fix it, It Ain't Fixed
- Check to see if its really fixed
- Problems do not go away by itself
- Learn from the fix, and design better in the future
No Comments