As I wander around the house adjusting the clocks (man, we have a LOT of clocks…), I remember one of the great programming projects that I used to have fun with in computer studies.

Of course, I had to introduce it by telling students that they’re so lucky that their computer adjusts the time for Daylight Saving Time automatically.  It wasn’t always so; they have it so easy.  I remember having to go around and adjust computer clocks twice a year manually.  This always invoked the mandatory “Yeah, sir, and it snowed more back then too…”

It was always an interesting time as we would wait at least a couple of days before all of the clocks in the school eventually adjusted to the change.  It’s a simple concept, isn’t it?

The whole concept actually leads to a good discussion of time servers and information about data that’s shipped along side regular data services like cable television or cell phones.

Back to the assignment; the program that they were asked to write was presented as one that the Microsofts of the world might have had to include as part of an operating system.  Given a date, the program determines, when it runs, whether or not to adjust the time.  (second Sunday of March and first Sunday of November)  Oh, and that also opens the door for the discussion as to just why the clocks are changed.  I always found it amazing the number of students who don’t know the history; thankfully, my rural upbringing helped.

The discussion (and resulting code changes) gets even more interesting.  It’s not as simple as just turning the clock one hour.  There’s Saskatchewan.  That makes for a little bit of research.  If you’re a Microsoft and you’re writing code for a world-wide audience, are there other jurisdictions that don’t adjust their clocks at all?  What difference does that make for your program?  How does a computer know where it is located?  If you go on holidays and take your computer to a different time zone, what happens to the clock?  What happens to the clock on your smartphone?  What will people think of your program (or operating system) if you’re not sensitive to different time zones and different implementation of daylight saving time?

And, what happens to your data when one service has a different time from another?  Are there implications of post dating information?

2013-03-10 07.08.38

Just how do computers store time anyway?  Does it think in days, hours, and minutes?

The whole project is a rich area for discussion, research, coding, and talking about the human interface.  It’s amazing how much goes into something as seemingly simple as hours and minutes.

Powered by Qumana

OTR Links 03/11/2013

Posted from Diigo. The rest of my favorite links are here.