1. 22
  1.  

  2. 7

    I once had to debug a program that only failed under a strange set of conditions. One was that the hour of the day had to be in the single digits. It worked after 10:00 o clock. That was fun debugging on a Solaris box w/o root. Had to call the admin to change the clock all day.

    1. 3

      So what was the problem?

      1. 3

        If I were to guess, it was converting the time into a string… that wasn’t big enough to hold two digits. You’d have “9:59 PM\0” and then “10:00 PM” - causing the problem.

        But, what really happened is the knowledge of @fs111.

    2. 1

      One company I joined had a unit test that failed if it ran less than 5 minutes before the top of the hour. Turns out there was some bogus ad-hoc time arithmetic that added 5 minutes to the time without taking into account hours, day, month, year, etc. This test had been that way for years but the company culture was “eh, run it again and see if it passes” so nobody had noticed the pattern.