Monday, October 13, 2008

Solution: Debugging a Difficult Progam Error

Every now and again you come across a really difficult bug where you cannot for the life of you see what's wrong, you've narrowed the bug down to just a few lines of code but still cannot solve it. How to solve it?

Well the reason you cannot debug it is because ONE FACT THAT YOU HOLD TO BE ABSOLUTELY TRUE IS ACTUALLY FALSE.

This means that you assume that a variable contains a certain value , etc or that a function you call cannot contain a bug, it doesn't matter you are turning a BLIND EYE to the problem.

The Solution: Write down your ASSUMPTIONS and then test each one

Labels:

0 Comments:

Post a Comment

<< Home