- Feature Articles
- CodeSOD
-
Error'd
- Most Recent Articles
- Secret Horror
- Not Impossible
- Monkeys
- Killing Time
- Hypersensitive
- Infallabella
- Doubled Daniel
- It Figures
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
There are many cheap providers of address verification. The expensive ones will charge half a penny per lookup.
Unless your company is the size of Amazon, writing this from scratch is a WTF. And if your company is the size of Amazon, you pay the annual fee to USPS for a direct access to their API and you're done.
Admin
Admin
Admin
Of course it would make no sense for pizza joints to support international addresses. Hower if a website offers international shipment, they should support international addresses.
Another example : airlines need foreigners going to the US (or in transit through the US) to fill a form with their destination address. Going from Canada to Europe via New-York, I had to fill this form. Required field for my destination address? A drop-down menu with only US states. TRWTF is that it was on a european airline website... Do you think their largest market is US customers too?
Admin
Looks like C# to me.
Admin
Previously, I have written a DB project that included validations for the postal codes, where I stored a regular expression in the Country table. Canada uses one style of code. The US has two (Zip and Zip+4), which can be easily handled by regular expressions.
Canada: [A-Z][0-9][A-Z] [0-9][A-Z][0-9] USA: [0-9]{5}(-[0-9]{4})? What is the UK doing? The lengths and letter/digit placement rules seem to be all over the place.
Admin
They might write it in a weird format, adding or removing spaces. Maybe they'll write an abbreviation, maybe they'll invent their own incorrect abbreviation.
Admin
in my limited experience of dealing with north america (us and canada), I have noticed that PC MIller is best thing to get addresses from.
Admin
or else 367 Prairie Ln 367 Prairie Dr
What's really fun is, in the latter case, when the street signs are inconsistent, and putting the name found on the nearest street sign into Google may actually take you somewhere else.
And then you've got the fun streets whose names look like part of the extra stuff normally tacked on (South St, Lane Rd) but you can't abbreviate those (S St, Ln Rd) because it's actually the name of the street.
Admin
TRWTF is turning customers away at the door for an analytics requirement. (Or, you just landed a huge order from Ford; rub is, it's big enough that they want it shipped by rail, and your backend systems can't handle destinations that aren't street addresses.)
Admin
txtStreetName.Text clearly shows this is taken from code behind for a web form, which in fact is probably worse.
Admin
Walmart's help desk was genuinely helpful -- they told me how to input a mix of fake and real information for my card's billing address when I ordered something for delivery in the US. (I bet I'll have to do the same next time too, even if I use my Walmart card. Seiyu department stores still use the Seiyu name but they issue Walmart cards.)
Admin
Missing the point. "Systems" Hungarian Notation is completely appropriate for the place it was correctly used. Where you relied entirely on the eyes of the 'reviewer'.
That is, for writing example code snippets on MSDN.
Not entirely sane or insane when working with small bits of interface code, where the intrinsic type was a reflection of the logical type,
Insane when copied in large enterprise applications.
Admin
Do you love addresses?
What do you think of this one, just a few houses from mine:
27 bis, rue Guynemer 94240 L'Haÿ-les-Roses France
Yes, those are an apostrophe two hyphens and one of the only three 'ÿ' in the whole country.
And as you can read, the street number is "27 bis", a perfect int.
I love my city name!
Admin
Easy fix, just don't live in Canada.
Admin
Having first-hand knowledge of where this code came from, I can say that only US addresses will be entered in the system. As for the street number being "integer only" that is a pain point that is still being argued. PO Boxes will also never be entered here, just FYI.
The entire need for the existence of this code is because every table in the system has a "LastUpdated" field, and we store address information in two different tables that actually have a 1x1 relationship (there was a reason for this at one point). After the page had been built, there was a requirement added during QA to make sure that "LastUpdated" was only updated when the address itself had changed (not just the other record).
When they developer asked how to do that (yes, they had to ask) they were told to compare each entered value against what was already in the database, and set a boolean variable to true if the values were different (in addition to updating the value, of course). At the end, if the boolean is true, update the "LastUpdated" field. That seemed simple enough. This is what that developer came up with :)
And, yes, this did make it to production (this was just a CRUD screen) and we had to do an emergency release to fix the problem when the client discovered it.
The developer who wrote this (and their code) are no longer with the company.
Admin
I'm really afraid that the answer to the question "Why do we throw an exception if the user accidently types an 'a' in Street Number is "Don't worry, The user doesn't see exceptions"