4 ms·
Also: Falsehoods programmers believe about time: http://infiniteundo.com/post/25326999628/falsehoods-programmers-believe-about-time http://infiniteundo.com/po
by greenyoda 11y ago
Also:
Falsehoods programmers believe about time:
http://infiniteundo.com/post/25326999628/falsehoods-programmers-believe-about-time http://infiniteundo.com/post/25326999628/falsehoods-programm...
More falsehoods programmers believe about time:
http://infiniteundo.com/post/25509354022/more-falsehoods-programmers-believe-about-time http://infiniteundo.com/post/25509354022/more-falsehoods-pro...
Falsehoods programmers believe about geography:
http://wiesmann.codiferes.net/wordpress/?p=15187 http://wiesmann.codiferes.net/wordpress/?p=15187
Falsehoods programmers believe about addresses:
https://www.mjt.me.uk/posts/falsehoods-programmers-believe-about-addresses/ https://www.mjt.me.uk/posts/falsehoods-programmers-believe-a...
- pje 11y agoMy pet peeve: "falsehood lists" that see no reason to explain _why_ any of the falsehoods are false.
- deathanatos 11y agoA while back, when this came up on HN previously, I wasn't sure that all of them were actually falsehoods, so I went through each and listed reasoning for why I though they were or weren't: https://gist.github.com/thanatos/eee17100476a336a711e https://gist.github.com/thanatos/eee17100476a336a711e
- masterzora 11y agoA few explanations you can add for more-falsehoods.rst: > 15. Unix time is the number of seconds since Jan 1st 1970. The section you quote from Wikipedia shows why this one is false: leap seconds. Similar to how the number of hours between 00:00 and 3:00 in most of the United States depends on whether the timezone remains constant, springs forward, or falls back, the number of seconds between two Unix timestamps depends on how many leap seconds were inserted or deleted in that time frame. > 16. The day before Saturday is always Friday. This one is true only within the assumption but I'm not sure if the falsehood is literally false. When Alaska did the calendar change it had two consecutive Fridays (October 6th & 18th, 1867). This gives us the day after Friday not being Saturday but technically not the day before Saturday not being Friday. The falsehood still holds in spirit (outside of the assumption), of course, and it's possible somewhere else had it be true in practice as well. > 27. The weekend consists of Saturday and Sunday. The weekend differs across the world. Friday and Saturday is another popular one but Brunei gets a special shout out for having a Friday and Sunday "weekend" with Saturday being a working day. > 59. DST is always an advancement by 1 hour As far as I know, this is currently true if you aren't dealing with historical datetimes but Singapore will mess you up with historical data. They had a really odd case[1] where they went on DST by advancing 20 minutes and then ended DST without changing the clock at all. [1] http://www.timeanddate.com/time/zone/singapore/singapore?syear=1925 http://www.timeanddate.com/time/zone/singapore/singapore?sye...
- joncrocks 11y agoWikipedia suggests that there's an Australian island that still uses a half-hour DST. https://en.wikipedia.org/wiki/Daylight_saving_time#Procedure https://en.wikipedia.org/wiki/Daylight_saving_time#Procedure
- deleted 11y ago[deleted]
- jameslk 11y agoNice! I wish I had known about these articles before. I just created a repository to keep track of them: https://github.com/jameslk/awesome-falsehoods https://github.com/jameslk/awesome-falsehoods
- laut 11y agoAlso: Falsehoods programmers believe about time and time zones: http://www.creativedeletion.com/2015/01/28/falsehoods-programmers-date-time-zones.html http://www.creativedeletion.com/2015/01/28/falsehoods-progra...
- Bluestrike2 11y agoOh, god. It's like a perfect storm for a crippling epistemological dilemma. "Nothing can be known, not even this" about sums it up. I guess we're stuck with working from probabilities. Carneades would be proud.
- Marazan 11y agoThe point is not to include validation rules that will fail for well formed data.
- mikeash 11y agoGoing further, if at all possible, leave validation up to others. For example, don't validate delivery addresses at all if your shipping company has a validation API. If you must do validation yourself, put in the time to research it and get it right, don't just bang something out based on your own experience of the problem domain. Edit: one more: if you must validate, keep this separate from how you store the data, so you can more easily fix your mistakes or adapt to changes.
- patmcguire 11y agoWish the geography one had "terrain is consistent through time" The border is where the river used to be... total chaos now https://www.google.com/maps/place/Vicksburg,+MS/@32.1198292,-91.0866534,12.22z/data=!4m2!3m1!1s0x8628e027f6b111b9:0x77422a69074f7bc0 https://www.google.com/maps/place/Vicksburg,+MS/@32.1198292,...
- hobarrera 11y agoThere's a street in Buenos Aires with a name that translates to "17 of Novemeber 1894" (or some other year, not sure). So, not only does the street have a number, it has TWO. And your address ends up being: "17 of November 1894 230 3C" (we put building numbers after street names).
- jordigh 11y agoSo... what are we supposed to do? Every abstract model of reality has to make some simplifying assumption. Or should we curate some sort of general libraries that can handle all the exceptions to the rules if they are given enough context? Many of these libraries already exist. This is like trying to accept all valid email addresses according to the RFC. Even when we have a spec, there's a maddeningly complex array of possibilities, but it's ok if for almost everything we accept some subset of it. It would be madness, for example, if we forced government employees of a particular country to be able to deal with all possible scripts of the world, including Prince's symbol, just to account for all possible ways that humans name themselves.
- xenophonf 11y agoThis is remarkably easy if you aren't writing an MDA/MTA: Treat the email address like a blob. The only verification necessary, if any, is whether the user clicks the enrollment link or whatever.