Blog Articles Banner

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”:

  1. Understand the system

  2. Make it fail

  3. Quit thinking & look

  4. Divide and conquer

  5. Change one thing at a time

  6. Keep an audit trail

  7. Check the plug

  8. Get a fresh view

  9. 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.