views:

92

answers:

1

For me it is the security cookie created for each process to prevent buffer-overflow attacks. Tracking its creation with a debugger, it's created by xoring the Thread ID, the Process ID, the PerformanceCount the TickCount and more... And then if by any chance the most word is zero, then the least word is copied into it...

+2  A: 

Leap years.

Ha ha, I know, it's no secret issue. But it's also a rather amazingly common "gotcha" and painful set of exceptions to any date codes. Most date libraries would be trivial, a dozen lines of code, except for leap year support which is essential, yet rare, and much more complex than it initially seems.

Remember also that leap years are not "every 4 years" at all. There's a complex set of rules. And even worse since you have to have historical exceptions.. and you have to decide on Gregorian versus Julian calendars.

SPWorley
Not as serious, because they're so rare and so short, but leap seconds are fun. http://en.wikipedia.org/wiki/Leap_second
Roger Pate