Thursday, July 30, 2015

Infinite Undo: Falsehoolds Programmers Believe About Time

Falsehoolds People Believe About Time

Over the past couple of years I have spent a lot of time debugging other engineers’ test code. This was interesting work, occasionally frustrating but always informative. One might not immediately think that test code would have bugs, but of course all code has bugs and tests are no exception.

I have repeatedly been confounded to discover just how many mistakes in both test and application code stem from misunderstandings or misconceptions about time. By this I mean both the interesting way in which computers handle time, and the fundamental gotchas inherent in how we humans have constructed our calendar – daylight savings being just the tip of the iceberg.

In fact I have seen so many of these misconceptions crop up in other people’s (and my own) programs that I thought it would be worthwhile to collect a list of the more common problems here.

A really fascinating read, both if you're a programmer and if you're a normal human being who just happens to find timekeeping interesting.

Be sure to also read the sequel with even more falsehoods programmers believe about time.

No comments: