Differential Diagnosis is an innovative technique for finding bugs.
It's a strategy a co-worker of mine uses that is so obvious
in retrospect, yet has an incredible amount of power.
Usually problem debugging starts from scratch everytime and our
heroes eventually find the probem. Using Differential
Diagnosis you go back and look at the change history for every
change since the bug wasn't a bug. The idea is that the code
worked at one time. The bug is likely to have been introduced
in one the later changes.
By inspecting the source of only the changes it's often possible
to figure out the problem or at least narrow it down
considerably.
This approach makes a lot of sense and works extremely well.
But i hadn't seen it before. Obviously no strategy will always
work, but it works a lot of the time. Even well unit tested code
can have intregration related bugs that don't show up until
later. And many products are so complex that any unit
test doesn't scratch the surface of possible tests.
Since then i've read a paper where the build system after
finding a bug from a smoke test run would automatically backout
changes and rebuild until it found which change caused the bug. Very
cool. Someday i hope to add this to our current build system.
comment[]
12:58:40 PM
|