Some days I despair at the code I write. I’ve been doing it for enough years now that I should be avoiding the stupid bugs, like keying a hash on a non-unique value over the run of the program. The brilliant part about that bug though, was that it looked distinctly like a random bit-flip. A value from the database appeared to be getting modified, even though there was no code that actually modified the value at any point.
A quick change to the keying value to be a composite of two values that would ensure uniqueness, and life was groovy.

How long were you bashing your head against that one :>?
Comment by Mum — November 30, 2006 @ 9:51
The report of the problem existed for over a month, but once I had time to work on it, 4 hours.
Comment by cricalix — November 30, 2006 @ 9:54