News for hackers. Stuff that matters.
Re:Ask HN: Was the Y2K crisis real? by bluGill on Thursday March 12, 2020 @11:12AM (#22557677)
More importantly we have figured out algorithms for time that account for timezone, daylight savings time, different calendar systems, and probably something else I'm not aware of. These all work by counting seconds since a fixed date.

Note that the algorithms were known since at least the late 1960s. Storage space even then shouldn't have been enough of a concern. However people still screw it up all the time.

Re:Ask HN: Was the Y2K crisis real? by davismwfl on Thursday March 12, 2020 @12:23PM (#22558440)
This is the accurate point. We had epoch date tracking since the 1960s or so and the coding of a two digit year was out of laziness and convenience in most cases. And not bashing anyone, but most of the systems I saw using the lazy method were more business systems where there wasn't thoughtful engineering a lot of the time, but more just get it done. Those two don't have to be mutually exclusive IMO, but in the 70s/80's it seems a lot of the time it was, simply because IMO we had predominately really two classes of developers, scientific and business where business devs took less of an engineering mindset and more get it done in a specific timeframe so they "hacked" it out. Plus it was new, so stuff happens.

Sadly this stuff still goes on today, just in slightly different ways. Data type and data structure choices are critical, and it isn't as important to me that someone know how to write an algorithm for a RB-tree (or pick your DS), but it is critical an engineer knows which data structure/type to choose for specific use cases. This is one of my biggest complaints with the way a lot of engineering interviews are structured today, they want you to regurgitate known algorithms which is a waste of time and personal memory, find out if the person knows when they'd use a specific data structure and why the rest is easily researched. I mention this because to me the fundamental flaw of the y2k problem was one of data structure and data type choice.

Re:Ask HN: Was the Y2K crisis real? by fanf2 on Thursday March 12, 2020 @01:25PM (#22559285)
Seconds since the epoch doesn’t work for times in the future. Consider a contract that will terminate at 2025-02-28 12:00 in New York: will that be -05:00 or -04:00? It could change.
Re:Ask HN: Was the Y2K crisis real? by LeifCarrotson on Thursday March 12, 2020 @12:16PM (#22558338)
And in that vein, no one (sane) is writing their own date libraries anymore, there's no reason to try to customize that for your application.