Wednesday, January 27, 2010

Debugging

Effective debugging requires: from book 'debug it!' by Paul Butcher
  1. work out why the application is behaving unexpectedly.
  2. fix the problem
  3. avoid breaking anything else
  4. maintain or improve the overall quality
  5. ensure the same problem does not occur elsewhere and cannot occur again
  6. checkin codes and get code review
The core debugging process steps are:
  1. Reproduce
  2. Diagnose
  3. Fix
  4. Reflect: learn the lessons from the bug, does it happen elsewhere?
Make sure you know 'what is happening' and 'what should be happening'. Work on only one problem, the simplest problem at a time.
Make only one change at a time and keep a record of what you have tried.
Bugs take priority.

For the performance bugs, you need to find the bottleneck with getting an accurate profiling.

Use 'assert' to let application debugs itself.

No comments:

Post a Comment