It's the little surprises that make programming so interesting. In chapter 14 ( Pragmatic Paranoia ) of the
Pragmatic Programmer the authors Andrew Hunt and David Thomas teach the reader that assuming things about code is a bad idea (one example they give is about
minutes which have more or less than 60 seconds). You should double and triple check every assumption you make and then let the program check your assumption again with an assert statement.
Yesterday one of these assumptions cost me about 90 minutes. What do you think is the result of the expression 0xFFFFFFFF12345678 & 0xFFFFFFFF where & is the operator of the bit-wise AND operation?
Continue reading "It's the little surprises ..."