Interesting dates in computer programming

July 15, 2011

Everybody knows about the Linux “epoch”, as in January 1st, 1970 UTC.

Some people might remember the original Mac OS equivalent, which was January 1st, 1904. From what I remember back in the day, Jerome Coonen picked that date (instead of 1900) because it simplified the leap year calculations. And using an unsigned 32 bit value for seconds meant that Macs could handle dates up to 2023 or some point way in the future.

Then yesterday I came across the MUMPS/Caché “$h” date format, which is described as:

This format returns the date as the number of days since 1st January 1841, and the time as the number of seconds since midnight.

I was speculating with my friend as to why they picked 1841, and guessed that this was some convenient date (similar to the Mac 1904 choice) that was before the birthdate of the oldest person they could imagine being in the system, back in the 1960s.

After turning to the Source of Truth (Wikipedia’s article on MUMPS), it seems like our guess was correct. James Poitras explains why he picked this odd date:

I remembered reading of the oldest (one of the oldest?) U.S. citizen, a Civil War veteran, who was 121 years old at the time. Since I wanted to be able to represent dates in a Julian-type form so that age could be easily calculated and to be able to represent any birth date in the numeric range selected, I decided that a starting date in the early 1840s would be ‘safe.’ Since my algorithm worked most logically when every fourth year was a leap year, the first year was taken as 1841. The zero point was then December 31, 1840

Maiden voyage of Garmin foretrex 401

July 10, 2011

I finally got a chance to try out the new Garmin wrist-mounted GPS unit that my friend Stefan gave me.

Pretty sweet – it does a good job of tracking, even in the foothills of the Sierras, where GPS signals come and go.

I wish I could directly embed the map of the hike, but that requires an , which isn’t allowed by – oh well. You can still click here to view it on the site.