4 ms·
Another nightmare for programmers.
by carlmr 8y ago
Another nightmare for programmers.
- jobigoud 8y agoRelevant Tom Scott: https://youtube.com/watch?v=DSG-zxGRkJw https://youtube.com/watch?v=DSG-zxGRkJw
- hrktb 8y agoIt’s fine, it’s a nightmare with or without street names. You already shouldn’t assume streets to have names and also accept arbitrary strings. If you really need something reliable (i.e. it needs to be accepted by an external authority or you will actually deliver goods) you can ask the user for a validated adress from an official source.
- Freak_NL 8y agoThe residents of Hilgermissen are quite likely well adapted to entering 'Hilgermissen' as the street name as well as the place in any form that forces it.
- okl 8y agoNot much worse than zip codes with letters.
- carlmr 8y agoCanada says hi.
- d33 8y agoIf you're trying to store numbers that might start with a zero using an integer type, you're doing it wrong anyway. A rule of thumb is to ask yourself the question: what does the result of adding two such values mean?
- K2L8M11N2 8y agoDoes that mean that e.g. numeric user ID should also me strings since adding them is meaningless?
- bausshf 8y agoNothing difficult about zip codes as long as you treat them as strings :)
- karolg 8y agohttps://www.mjt.me.uk/posts/falsehoods-programmers-believe-about-addresses/ https://www.mjt.me.uk/posts/falsehoods-programmers-believe-a...