Live data from Hacker News

Falsehoods Programmers believe about Time

infiniteundo.com

151–160 of 222 posts

Re: Falsehoods Programmers believe about Time

#151

Earlier quoted context omitted.

So, were you on the Concorde, or was it a Tu-144?

The terminator is only that fast near the equator. Further north, " ... it is possible to walk faster than the terminator at the poles, near to the equinoxes. The visual effect is that of seeing the Sun rise in the west." http://en.wikipedia.org/wiki/Terminator_(solar)

Cool! So you could find a spot somewhere up north where you can take a stroll and experience an eternal sunrise/sunset. Very romantic :)

Re: Falsehoods Programmers believe about Time

#152

I'd question #34 on this list somewhat: while formats like mm/dd/yyyy and dd/mm/yyyy definitely allow ambiguous interpretations, the ISO format yyyy-mm-dd seems fairly unambiguous; I've never seen any instance of yyyy-dd-mm floating around to confuse it with.

It's ambiguous for human users who are not familiar with the format. Some people may not even recognise it as a date, in some contexts. (2012-06-19, that's 1,987 right?)

Re: Falsehoods Programmers believe about Time

#153

Some more falsehoods: 1. Time never goes backwards (as other people have pointed out, time zones break this). 2. UTC time never goes backwards (as other people have pointed out, leap seconds break this). 3. The system boot time never changes. On most platforms, the current time is defined as "boot time plus uptime", and setting the current time is performed by changing the boot time. 4. System uptime never goes backw…

UTC time does not go backwards. Leap seconds are implemented as a minute with 61 seconds.

Re: Falsehoods Programmers believe about Time

#154
post #117
post #12

Earlier quoted context omitted.

Well time would be unidirectional, right? The computer clock might not be.

Ooooh, nerd time! If you are moving faster than the speed of light, you are perceiving whatever you are moving away from in reverse, because the light you are seeing was generated before when you left. (you are passing into light that is older than the light you started with). In terms of space-time, you would then be going backwards in time, if your point of reference for time was the Earth (and hint, given that we…

If you are moving faster than the speed of light, our understanding of physics is wrong and we can't make any sensible predictions.

Re: Falsehoods Programmers believe about Time

#156
My recent favorites wrong assumptions:

1. The year is 2012. In Thailand, the year is 2555. In Malaysia, the year is 1433.

2. But surely that is not used on computers and the web? http://www.railway.co.th/home/Default.asp?lenguage=Eng (look on the right side: "booking can be until : 18/8/2555"

Re: Falsehoods Programmers believe about Time

#157
post #153

Some more falsehoods: 1. Time never goes backwards (as other people have pointed out, time zones break this). 2. UTC time never goes backwards (as other people have pointed out, leap seconds break this). 3. The system boot time never changes. On most platforms, the current time is defined as "boot time plus uptime", and setting the current time is performed by changing the boot time. 4. System uptime never goes backw…

UTC time does not go backwards. Leap seconds are implemented as a minute with 61 seconds.

It can also, theoretically be a minute with 59 seconds, though I don't believe this has ever happened.

Re: Falsehoods Programmers believe about Time

#158
I took over from Snr dev who made 2 simple and bad time mistakes.

1) implementing their own DateAdd functionality in c# and forgetting about leap years.

2) thinking the app server and db server's time would never get out of sync.

Fml he was so bad I wanted to kill him almost every day and got paid quite a bit more than me

Re: Falsehoods Programmers believe about Time

#159
post #84

Earlier quoted context omitted.

Except it doesn't account for leap seconds.

Is that true? Isn't that the responsibility of the whatever component that translates the number of seconds since Jan 1 1970 into a calendar?

Unix time is not the number of seconds since Jan 1st 1970.

Re: Falsehoods Programmers believe about Time

#160

My recent favorites wrong assumptions: 1. The year is 2012. In Thailand, the year is 2555. In Malaysia, the year is 1433. 2. But surely that is not used on computers and the web? http://www.railway.co.th/home/Default.asp?lenguage=Eng (look on the right side: "booking can be until : 18/8/2555"

In Ethiopia it's about 2004 http://en.wikipedia.org/wiki/Ethiopian_calendar
Post reply on HN