Friday, March 16, 2007

David's Rule for Debugging

Ok someone has probably come up with this already, or perhaps it is so obvious that no one has taken credit for it, but on this blog it will be named David's rule for debugging (I was just going to name it David's rule, but that would keep me from naming other rules after myself).

If given your set of assumptions, your observations cannot be right then at least one of your assumptions is incorrect.

This may sound simple but I find it very useful when debugging, and I think it can be useful in other aspects of life. The key is that people will look at something and say, that cannot be right, and then they stay stuck and cannot move forward in figuring out what is wrong. The key is to recognize that one of your assumptions is wrong so start dropping assumptions until you find the one that is incorrect. Now you might claim that instead of an assumption it could be the observation that is wrong - true, you were able to drop the assumption that the test was done properly (as a designer this is always the first assumption I drop both because of my ego and it usually means work for someone else instead of me).

A follow on from a coworker is that once you figure out what is wrong it will be obvious.

No comments: