MessiandNeymar

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Friday, March 2, 2012

Satan's Trifecta

Posted on 1:37 PM by Unknown

One of the eternal complexities of computing is how to handle dates and times. Practice makes perfect, so goes the saying; a corollary to that saying is that if you only do something rarely, you don't get very good at it. Leap years are a good example, as they only occur once every four years (or so), which is not very often in the greater scheme of things, and means that they nearly always give rise to bugs.

And, indeed, this week brought news that a leap year bug took down the Internet (well, not the entire Internet, but a fairly significant piece of it).

Figuring out how to accurately handle dates and times in a computer is no easy task. People have been struggling with this problem for decades, and are continuing to struggle with it. For a recent example of some detailed and thorough thinking about dates and times, you might want to check out Jon Skeet's Noda Time, a .NET version of the well-known Joda Time library. Joda Time is rich and detailed and has lots of great documentation; Noda Time has some nice documentation, too, such as this page on Core Concepts and this page on choosing the correct datatype.

Of course, these are relatively recent libraries, and build on the work of others over decades. For a superb and encyclopedic treatment of dates and times in computing, you'll want to visit Paul Eggert's master page. It's an incredible resource; you could spend months just reading through all the reference material collected from that site. To cite just a few, you'll find a link to Gilbert Healton's lengthy article: The Best of Dates, The Worst Of Dates, as well as the National Institute of Standards and Technology's gorgeous history of timekeeping: A Walk through Time.

Eggert is an Internet legend for collecting, analyzing, cataloging, and providing all this information. But we nearly lost it all last fall when a lawsuit caused Eggert and his colleague Arthur David Olson to take down their web databases. Happily, the Electronic Frontier Foundation stepped in, and provided legal counsel, so access to these resources remains available.

I tend to think that this is one of those areas where Open Source makes a lot of sense. These are terribly detailed and intricate libraries, and it's really to everyone's advantage to have solid, reliable, accurate, and dependable date/time computations in every piece of software they use, so to me it makes perfect sense for us all to collaborate on a single library of shared software for these datatypes.

So if you might have felt tempted to scoff at this week's Internet outages, wondering how we computer programmers could mess up such a simple concept, rest assured that it's much more complicated than you might originally think, and consider becoming familiar with the extensive and excellent work that has already taken place in this area.

And, of course, when you're done with that, take a break and watch a show!

Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Shelter
    I meant to post this as part of my article on Watership Down , but then totally forgot: Shelter In Shelter you experience the wild as a moth...
  • The Legend of 1900: a very short review
    Fifteen years late, we stumbled across The Legend of 1900 . I suspect that 1900 is the sort of movie that many people despise, and a few peo...
  • Rediscovering Watership Down
    As a child, I was a precocious and voracious reader. In my early teens, ravenous and impatient, I raced through Richard Adams's Watershi...
  • Must be a heck of a rainstorm in Donetsk
    During today's Euro 2012 match between Ukraine and France, the game was suspended due to weather conditions, which is a quite rare occur...
  • Beethoven and Jonathan Biss
    I'm really enjoying the latest Coursera class that I'm taking: Exploring Beethoven’s Piano Sonatas . This course takes an inside-out...
  • Starting today, the games count
    In honor of the occasion: The Autumn Wind is a pirate, Blustering in from sea, With a rollocking song, he sweeps along, Swaggering boisterou...
  • Parbuckling
    The enormous project to right and remove the remains of the Costa Concordia is now well underway. There's some nice reporting on the NP...
  • For your weekend reading
    I don't want you to be bored this weekend, so I thought I'd pass along some articles you might find interesting. If not, hopefully y...
  • Are some algorithms simply too hard to implement correctly?
    I recently got around to reading a rather old paper: McKusick and Ganger: Soft Updates: A Technique for Eliminating Most Synchronous Writes ...
  • Don't see me!
    When she was young, and she had done something she was embarrassed by or felt guilty about, my daughter would sometimes hold up her hand to ...

Blog Archive

  • ►  2013 (165)
    • ►  September (14)
    • ►  August (19)
    • ►  July (16)
    • ►  June (17)
    • ►  May (17)
    • ►  April (18)
    • ►  March (24)
    • ►  February (19)
    • ►  January (21)
  • ▼  2012 (335)
    • ►  December (23)
    • ►  November (30)
    • ►  October (33)
    • ►  September (34)
    • ►  August (29)
    • ►  July (39)
    • ►  June (27)
    • ►  May (48)
    • ►  April (32)
    • ▼  March (30)
      • 30 days has September, April, June, and November ...
      • Online reviews
      • I don't know what the game will be like ...
      • Every day you get in your life is precious
      • Last year, it took a full hour!
      • Bill Slawski's Top Ten SEO Patents list
      • Cliff Click's deep dive into Constant Propagation ...
      • A great example of the power of generators
      • I have no idea what it will be like to play ...
      • I'm really enjoying Dan Boneh's online cryptograph...
      • BATS IPO Algorithmic Snafu?
      • The complicated task of trying NOT to keep up with...
      • It's not just a game...
      • Internet scale, administrations, and operations
      • Followup, followup, followup
      • Perfectly named for your career
      • rands on hacking
      • Mapping the past
      • Mark your calendars!
      • The Google I/O 2012 website is live
      • Software in the courts
      • Great gaming post
      • Link dumping, March 2012 edition
      • Are some algorithms simply too hard to implement c...
      • The Stanford online cryptography class is up and r...
      • A fine use of the web
      • RSA 2012 has come and gone
      • How will the field of software analysis emerge?
      • Satan's Trifecta
      • I love style guides
    • ►  February (10)
Powered by Blogger.

About Me

Unknown
View my complete profile