October 6, 2017 Debugging Process for Topcoder Challenges
“If debugging is the process of removing bugs, then programming must be the process of putting them in.” – Edsger Dijkstra
Debugging is a must-have skill for every F2F competitor since most F2F challenges require to fix bugs in an existing application.
Below is a very simple & effective debugging lifecycle.
– Detect
In this phase you identify that the application is not working as excepted or for some reason it crashes.
You want to make sure you have a clear understanding of what the issue is and how to reproduce it.
– Isolate
Once you have identified the issue, the next step is to isolate it to its root cause. Find out if this is a design issue or an implementation issue.
– Resolution & Recovery
This is the fix phase where you implement a solution that fixes the issue. In this phase you also have to verify the fix. If the fix is not verified, then it’s not fixed 🙂
Following are the “Rules of Debugging”:
- Understand the system
- Make it fail
- Quit thinking & look
- Divide and conquer
- Change one thing at a time
- Keep an audit trail
- Check the plug
- Get a fresh view
- If you didn’t fix it, it ain’t fixed
(source: http://debuggingrules.com/)
The above rules outline a simple debugging workflow and provide a set of guidelines for which every developer should be aware.
This article is part of the 5 Weeks to Learn Topcoder educational series. Want to learn more? Check out the entire series and all the helpful content here.
thomaskranitsas
Guest Blogger