http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-b...
http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-b...
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-pro...
Falsehoods programmers believe about geography:
http://wiesmann.codiferes.net/wordpress/?p=15187
Falsehoods programmers believe about addresses:
https://www.mjt.me.uk/posts/falsehoods-programmers-believe-a...
The border is where the river used to be... total chaos now
https://www.google.com/maps/place/Vicksburg,+MS/@32.1198292,...
> 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?sye...
https://en.wikipedia.org/wiki/Daylight_saving_time#Procedure
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).
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.
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.
http://www.creativedeletion.com/2015/01/28/falsehoods-progra...
Sometimes these accents are disambiguating...
Many could handle the characters, but where I sent a paper form the person entering the data didn't know how to type it.
This must be a problem for somewhere like Armenia, where I have seen people really struggling with the English alphabet. Education was Armenian and Russian for a long time.
(There are postcodes in Denmark, but Ø is the first letter of East, so is a very broad code, in a way.)
That documents that not all addresses have postal codes. This is another example of the real world existing in order to give programmers kicks in the head.
http://spaceninja.com/2015/12/08/falsehoods-programmers-beli...
I don't think any of them about programmer hubris specifically. A lot of people could fail to realize that "23:59:60" is a valid time, for instance.
By the way, for people reading this, from my own experience, at least 30/40% of French people will put the last name first in the form, whatever the text says, so to get better data, the best thing is to put them in the order (last name / first name) for them to reduce the number of errors.