Hacker News new | ask | show | jobs
by gloryless 1045 days ago
This is not good. Some of the time stuff is relevant if you're digging deep into it, but it's more like "uncomfortable truths we ignore for sanity." They're mostly edge cases that are unreasonable or silly to address until it's a problem.

Just listing off "falsehoods" is not a good exercise. It's literally an endless list. Some sections have no explanation and you lose context on what it is you should be learning.

More than half of what I read should just be deleted. It's not a reminder, or a lesson to be learned, or actionable

2 comments

To me the point has always been of shattering the naive confidence programmers have when modeling things.

I never thought I should handle each and every case, just be mindful of the assumptions I'm making.

I got lost why 23:59:60 is valid time...
Occasionally a leap second is added or removed, to account for various sources of drifts. This leap second is taken to be the last second of the day where it is inserted, so the time technically either goes 23:59:59→23:59:60→00:00:00 or 23:59:58→00:00:00, depending on if a leap second is being added or removed.

That being said, many OSes handle this in such a way that 23:59:60 doesn't appear, either by repeating 23:59:59 (so it last two seconds), or "smearing" the extra second over the course of the day (so each second on the system clock that day is just over a second long).

Edit: I'm pretty sure I read recently that they are no longer going to be adding/removing leap seconds, although I'm not 100% sure that was a definitive decision.