Hacker News new | past | comments | ask | show | jobs | submit login

Which is a side effect of being consistent with the way we write all other numbers, with the value represented by each digit declining as we go left to right.



Lexicographic sorting does not work for numbers of different lengths, e.g. "100" and "9".


It does if you zero fill the shorter number to an equal number of digits: "100", "009".


There's a special place in hell for people that using variable length representations for time units that are meant to be consumed by machines.

I think it's across the hall from the room for people who configure servers for anything besides UTC.


Where do you put the people who think that we should inflict leap seconds on UTC?


UTC has leap seconds by definition. Conventional POSIXish epoch time is a little more complicated – typically, the length of a second varies.


I am fully aware.

I also don't believe that when everything was adopted, that people realized how big a deal it would become for software, and systems driven by software.

Every leap second, factories shut down. Just in case. Every leap second we face the possibility of a large chunk of the Internet going dark like happened in 2012. Computer programmers spend millions of dollars per year in aggregate dealing with the possibility of leap seconds.

All for something that, over thousands of years, won't lead to as big a discrepancy between the Sun and the clock as what we voluntarily do 2x per year for daylight savings time.

Does it make any sense to continue this insanity? Why?


> Computer programmers spend millions of dollars per year in aggregate dealing with the possibility of leap seconds.

Millions of dollars in aggregate per year? Assuming that’s just the US, with ~4 million working programmers with a median pay of ~$86,000/yr or about $43/hr assuming about 2,000 working hours per year, that’s, if I’m not messing up the math, on the rough order of 1 minute per programmer per year, on the order of a couple hours per programmer per year if you bumped it to hundreds of millions. In either case, its a neglible share of programmer-hours.


for accuracy


Accuracy of what? For 12:00 to be at noon on average? That's what timezones are for and they also already change. Just add leap seconds to the timezone offset instead.

Meanwhile leap seconds decrease accuracy when measuring long time periods unless you explicityly remove them again.


In a special room resting atop a centrifuge so they can spend eternity arguing with each other about how long they've been in there.


Is their punishment to be forced to parse "009" with the C language's strtoul() library function for all eternity? (-:


What's the problem with strtoul? Just make sure to pass 10 as the third parameter, not 0.


Error handling is pretty horrible. And also it happily accepts negative values.


Maybe the punishment in hell should be to RTFM for the rest of eternity.


Sorry, what?

It's not like it's a default parameter, you would have to explicitly pass zero if you want the "guess base based on prefix" behavior.


On Windows Explorer it does. Not sure why other systems and apps have not adopted this.


They have. There are even different variants of human/version sort. They are of course not as straight forward as a simple lexicographical sort so not everything is going to implement one.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: