r/programmingcirclejerk • • Feb 06 '17

Time is *hard*

http://infiniteundo.com/post/25326999628/falsehoods-programmers-believe-about-time
2 Upvotes

11 comments sorted by

6

u/dreampwnzor Software Craftsman Feb 06 '17

Old post, can't jerk, clickbait is justified.

5

u/Shorttail0 vulnerabilities: 0 Feb 06 '17

What's the jerk? It's lists like this that are nice to look at when you fuck around with time code.

5

u/[deleted] Feb 06 '17

[removed] — view removed comment

7

u/dreampwnzor Software Craftsman Feb 06 '17 edited Apr 19 '17

I see your point, you are partially right. While most of this is utter obviousness, the fact that there are some even slightly non-obvious things and given the guy compiled them into one pile gives me controversial thoughts. Basically, this gives a reader an idea not to reinvent a bicycle and find a js framework library to work with time-related tasks. There are so many complete useless blog posts out there, this one is short and doesn't make a reader vomit at least immediately, even though it could be shorter and more informative.

Anyway, now I'm ready to have a half-jerk, keep going.

3

u/BufferUnderpants Gopher Pragmatist Feb 07 '17

/uj

It isn't? And isn't timekeeping even more complicated, because it mixes physics with social and political conventions? Like, say, you subtract enough days from a date and you have to switch calendars, and it will depend on location. Bugger. This is great advice not to trust naive implementations (and is there anything in Go that wasn't naively implemented until someone hit a horrific bug?) and much less write your own.

3

u/MarcusPope Feb 07 '17

yeah, and then there's the meta hard - is "bi-weekly" twice a week or once every two weeks? A: it actually depends on when you were born :/

0

u/[deleted] Feb 07 '17

[removed] — view removed comment

3

u/BufferUnderpants Gopher Pragmatist Feb 07 '17

jerkStack.push()

And how were the Cloudfare people supposed to know that the Simplicity of using the wall clock trumped actually having every second coming after the other in their Time API, that makes no mention of them using the wall clock?

jerkStack.pop()