Compartir a través de


And Or what?

From the, "it's funny because it happened to me" file, I did it again.  While debugging a recent issue in the test lab, I had pushed the root cause out as an attempt to free an invalid handle.  I cracked open the code to find the line and looked at it in passing, "yup, simple logic error, if ((deviceHandle != NULL) && (deviceHandle != INVALID_HANDLE_VALUE))"   What I saw was really not what I thought I saw.  Yup, I saw the reverse of this where it was checking if they were equal so I suggested the fix that state the && be changed to || and it should be if (! (deviceHandle == NULL) || (deviceHandle == INVALID_HANDLE_VALUE)).  Then Bob pointed out the obvious. :)

On the testing side, we had a meeting recently to discuss some new test tools and there the continual theme Bob started and I picked up on came to pass; Testers should be the most paranoid people in the world.  Over the years I've had my concepts of design and coding altered greatly.  I went from the simple error handling should the odd API / DDI fail to the belief that they will always fail.  As a result, my error handling routines have become exponentially more robust and adaptive.  So during this meeting Bob and I were always thinking negative, "how are you going to handle when this fails, because it will fail. Believe it or not, at some point, it will fail."  Yessir, I'm just a negative guy.

And finally, so long and thanks for all the fish Bill.  Yes, I'm feeling terribly melancholy today.

*Currently playing - Sloan All Used Up