Midaslocator.com Zip Codddde Validation

« Return to Article
  • snoofle 2012-07-31 09:10
    \a\w\e\s\o\m\e
  • AH 2012-07-31 09:10
    Did I get first?
  • Chronomium 2012-07-31 09:12
    Not bad, it not only recognizes the Canadian A1A 1A1 format, but it doesn't accept illegal letters for the first digit for it.

    Now if only whoever coded the American half did any testing whatsoever. (Or even saw the [0-9]s in the Canadian half, which may be techncially narrower than \d, but what keyboard uses digits outside the 0-9 range?)
  • PZ 2012-07-31 09:17
    Chronomium:
    ..., but what keyboard uses digits outside the 0-9 range?)


    My keyboard has A to F for when I want to write hex.
  • KattMan 2012-07-31 09:21
    Perfect example of why regular expressions are NOT for everything.

    Seriously, you really aren't validating a zip code, that would take a lookup into a zip code list or somethign and matching it against the city entered. What you are really doing is simply limiting input, should be an easy task even with regex.
  • pantsman 2012-07-31 09:25
    TRWTF is entering 'ddddd' instead of just disabling JavaScript.
  • pantsman 2012-07-31 09:27
    The Other Real WTF is this being a Feature Article instead of a CodeSOD.
  • Aaron M. Greenberg 2012-07-31 09:32
    That is what you get for using DotNetNuke for your CMS.
  • Severity One 2012-07-31 09:35
    Ah, zip codes. Sometimes I long for those days where you could enter an international address on site from an American company, but you still needed to provide a zip code. And a state.

    In fact, the hλlf-wits at Valve insist to this very day that I fill in a state, which I dutifully fill in as 'n/a'. Please note that the country I live in has just over 420,000 inhabitants, and has no need for states. But on the other hand, our postal codes are so accurate that I suspect that each house has its own postal code.
  • Brent 2012-07-31 09:57
    PZ:
    Chronomium:
    ..., but what keyboard uses digits outside the 0-9 range?)


    My keyboard has A to F for when I want to write hex.


    Those would be xdigits, not digits.


    Also note that the regex allows for the Canadian postal code of |0|-0|0.
  • Cbuttius 2012-07-31 10:00
    But my zip code is 908765
  • A 2012-07-31 10:00
    So... you're from the Nation of Brunei, the Abode of Peace?
  • Chronomium 2012-07-31 10:14
    Brent:
    Also note that the regex allows for the Canadian postal code of |0|-0|0.
    Right you are, so it looks like both coders were a bit out to lunch here (presumably two people did this, or we wouldn't have the \d attempt in one half and [0-9] in the other half).

    Actually, I keep seeing more errors in the Canadian half the more I look at it. It correctly blocks D, F, I, O, Q, and U out of the first letter (because those letters look too much like other letters), but doesn't do so for the other two letter positions. Yet the first letter can still be "d" - wait, why is lowercase allowed at all?
  • PiisAWheeL 2012-07-31 10:18
    Chronomium:
    Brent:
    Also note that the regex allows for the Canadian postal code of |0|-0|0.
    Right you are, so it looks like both coders were a bit out to lunch here (presumably two people did this, or we wouldn't have the \d attempt in one half and [0-9] in the other half).

    Actually, I keep seeing more errors in the Canadian half the more I look at it. It correctly blocks D, F, I, O, Q, and U out of the first letter (because those letters look too much like other letters), but doesn't do so for the other two letter positions. Yet the first letter can still be "d" - wait, why is lowercase allowed at all?
    I gave up. I'm not that good at regex but this made my eyes bleed.
  • FrostCat 2012-07-31 10:24
    Brent:
    PZ:
    Chronomium:
    ..., but what keyboard uses digits outside the 0-9 range?)


    My keyboard has A to F for when I want to write hex.


    Those would be xdigits, not digits.


    http://en.wikipedia.org/wiki/Thai_numerals (as a representative sample)
  • Dave 2012-07-31 10:27
    A:
    So... you're from the Nation of Brunei, the Abode of Peace?


    I thought that too. Brunei does of course have districts, he could use that instead.
  • foo 2012-07-31 10:45
    KattMan:
    Perfect example of why regular expressions are NOT for everyone.
    FTFY
    Seriously, you really aren't validating a zip code, that would take a lookup into a zip code list or somethign and matching it against the city entered. What you are really doing is simply limiting input, should be an easy task even with regex.
    Which is what you can reasonably do client-side if you want a quick response (no additional server connection). Sure, it's possible without regex, but the corresponding code (esp. for the Canadian case) would fill a page and thus wouldn't be easier to understand (to someone who has bothered to learn regex syntax).
  • Brad 2012-07-31 11:00
    Pet peeve of mine; over-validation. Who friggin cares what they enter for zip? If you intend to send out spam mail later; clean addresses then.
  • dogmatic 2012-07-31 11:01
    TRWTF is not changing your own oil! They use crap oil sometimes recycled at quickie oil change places. Plus it's good for us nerds to get our hands dirty once in a while.
  • dignissim 2012-07-31 11:05
    A:
    So... you're from the Nation of Brunei, the Abode of Peace?

    My bet would be more on Malta.
  • Techpaul 2012-07-31 11:07
    Severity One:
    Ah, zip codes. Sometimes I long for those days where you could enter an international address on site from an American company, but you still needed to provide a zip code. And a state.

    In fact, the hλlf-wits at Valve insist to this very day that I fill in a state, which I dutifully fill in as 'n/a'. Please note that the country I live in has just over 420,000 inhabitants, and has no need for states. But on the other hand, our postal codes are so accurate that I suspect that each house has its own postal code.


    Post code so accurate they even go down to each dog kennel.

    Possibly with extension for each flea as well
  • Nagesh 2012-07-31 11:09
    In my country, if you want oil change, you go to place you have make purchase of car. Once YOU GIVE them your car, all thing are fixed if you want or not.

    No zip code bull crap.
  • Chelloveck 2012-07-31 11:13
    Brad:
    Pet peeve of mine; over-validation. Who friggin cares what they enter for zip? If you intend to send out spam mail later; clean addresses then.


    The ones which really grind me are digit-only phone number and credit card fields. Really, can't the programmer figure out how how strip non-digits out of a text string so I can enter '(123)456-7890' or '1234 5678 9012 3456'?
  • Ross Presser 2012-07-31 11:20
    Who needs IPv6? Let's just give every device a post code!
  • PiisAWheeL 2012-07-31 11:21
    Nagesh:
    In my country, if you want oil change, you go to place you have make purchase of car. Once YOU GIVE them your car, all thing are fixed if you want or not.

    No zip code bull crap.
    I know you ride a camel to work. You don't gotta lie to kick it.
  • foo 2012-07-31 11:21
    Techpaul:
    Severity One:
    Ah, zip codes. Sometimes I long for those days where you could enter an international address on site from an American company, but you still needed to provide a zip code. And a state.

    In fact, the hλlf-wits at Valve insist to this very day that I fill in a state, which I dutifully fill in as 'n/a'. Please note that the country I live in has just over 420,000 inhabitants, and has no need for states. But on the other hand, our postal codes are so accurate that I suspect that each house has its own postal code.


    Post code so accurate they even go down to each dog kennel.

    Possibly with extension for each flea as well
    AKA PostCodev6
  • Chelloveck 2012-07-31 11:30
    foo:
    Techpaul:

    Post code so accurate they even go down to each dog kennel.

    Possibly with extension for each flea as well
    AKA PostCodev6


    I was really impressed to learn that the postal barcode you see on letters (in the USA, anyway) contains a planet code. "Wow, that's some really progressive future-proofing!" I thought. Imagine my disappointment when I learned that it was something quite more mundane than sending postcards to Mars.
  • Some Jerk 2012-07-31 11:31
    WTF 1: the developer didn't test it.
    WTF 2: QA didn't test it.
    WTF 3: IT IS STILL THERE!
  • genitus 2012-07-31 11:35
    AH:
    Did I get first?

    No. And you're an arse for trying.
  • OldCoder 2012-07-31 11:43
    dignissim:
    A:
    So... you're from the Nation of Brunei, the Abode of Peace?

    My bet would be more on Malta.

    Almost certainly Iceland.
  • Kevin 2012-07-31 11:46
    It's also what you get for hiring DotNetNuke developers to do your website. *sigh*
  • Some Jerk 2012-07-31 11:49
    I still don't even know what DotNetNuke is
  • Cbuttius 2012-07-31 12:20
    I just tried their form. Lol, they got a booking from a Fred Bloggs...

    I had to enter a valid phone number. They didn't accept 123 456 7890 or some random digits so I just entered their number.

    I tried 12302 as a zip which was their zip and it got rejected. I tried ddddd and it worked.
  • themagni 2012-07-31 12:28
    Severity One:
    Ah, zip codes. Sometimes I long for those days where you could enter an international address on site from an American company, but you still needed to provide a zip code. And a state.

    In fact, the hλlf-wits at Valve insist to this very day that I fill in a state, which I dutifully fill in as 'n/a'. Please note that the country I live in has just over 420,000 inhabitants, and has no need for states. But on the other hand, our postal codes are so accurate that I suspect that each house has its own postal code.


    I enter 00000 as the zip code, and if the state is drop-down, I pick CA. Then I put in the street as per normal with the postal code at the end:

    1234 Fake Street V8V 8V8
    Fake City, BC, Canada
    CA 00000

    If they give you two lines for the address:
    1234 Fake Street (address one)
    Fake City, BC (address two)
    V8V 8V8 (city)
    CA 00000

    Of course, it's dumb to do this because the shippers will ream you at the border. I bought a $49 housing for my camera and paid a total of $33 in shipping after FedEx was done with it.
  • Nagesh 2012-07-31 12:29
    PiisAWheeL:
    Nagesh:
    In my country, if you want oil change, you go to place you have make purchase of car. Once YOU GIVE them your car, all thing are fixed if you want or not.

    No zip code bull crap.
    I know you ride a camel to work. You don't gotta lie to kick it.


    I bow to your supreme knowledge of geography, Jahanpanah! Tussi great ho! Camels are part of Rajasthan not Andhra Pradesh, you buffoon!
  • Nagesh 2012-07-31 12:30
    OldCoder:
    dignissim:
    A:
    So... you're from the Nation of Brunei, the Abode of Peace?

    My bet would be more on Malta.

    Almost certainly Iceland.

    Definitely not India, then.
  • Anon 2012-07-31 12:40
    dogmatic:
    TRWTF is not changing your own oil! They use crap oil sometimes recycled at quickie oil change places. Plus it's good for us nerds to get our hands dirty once in a while.


    TRWTF is assholes who think changing their own oil somehow makes them superior.

    My time is worth more than the cost of having somebody else do it.
  • Cbuttius 2012-07-31 12:41
    just enter a real address, just not yours but theirs.
  • herby 2012-07-31 12:57
    Ross Presser:
    Who needs IPv6? Let's just give every device a post code!

    Wrong! Who needs post code? Give every house an IPv6 address.

    FTFY
  • null 2012-07-31 13:13
    Chelloveck:
    foo:
    Techpaul:

    Post code so accurate they even go down to each dog kennel.

    Possibly with extension for each flea as well
    AKA PostCodev6


    I was really impressed to learn that the postal barcode you see on letters (in the USA, anyway) contains a planet code. "Wow, that's some really progressive future-proofing!" I thought. Imagine my disappointment when I learned that it was something quite more mundane than sending postcards to Mars.


    the 'planet' you are referring to is actually an acronym PLANET that stands for: 'Postal Alpha Numeric Encoding Technique' and encodes digits 0-9 much as the now deprecated POSTNET (i.e. also an acronym and not a planet, or a galaxy, or a black hole) did.

    CAPTCHA: EARTH is a Planet; PLANET is an acronym
  • jnewton 2012-07-31 13:26
    When you consider the time it takes to drive to the Qwiklube and wait for them to get around to changing it, it is probably faster to change your own oil than to have someone else do it. That is assuming you know what you are doing, of course.
  • AN AMAZING CODER 2012-07-31 13:46
    jnewton:
    When you consider the time it takes to drive to the Qwiklube and wait for them to get around to changing it, it is probably faster to change your own oil than to have someone else do it. That is assuming you know what you are doing, of course.


    I work on my own cars: swapping engines, adding performance parts, etc.

    But I DO NOT change the oil in my daily drivers. (I change it on my car with big mods because I don't trust them enough.)

    It's not worth the time and effort. I'll make an appointment, drop it off, work on a project or read a book while they're dealing with it, and then drive back to what I was doing.
  • Zecc when not signed on 2012-07-31 13:52
    pantsman:
    TRWTF is entering 'ddddd' instead of just disabling JavaScript.
    Or fixing the code with Firebug, for bonus points.
  • Neveralull 2012-07-31 14:32
    The real WTF is taking a car to Midas.
  • Anonymous. 2012-07-31 14:51
    Two observations.

    1. I don't know if this got fixed since the story went live or the code varies for different browsers, Midas locations, etc, but I've checked appointment booking pages for two locations next to me and they both contained regexp's starting with "(^[0-9]{5}(-[0-9]{4})", not "(^d{5}(-d{4})".

    2. I'm not familiar with modern web development tools, but that code did not look to me like it was written by a person. Maybe the regexp was somehow autogenerated too? What would the original human programmer input look like? Any experts here?
  • Jay 2012-07-31 15:17
    Severity One:
    Please note that the country I live in has just over 420,000 inhabitants, and has no need for states. But on the other hand, our postal codes are so accurate that I suspect that each house has its own postal code.


    What?! So if two people live in the same house, you have to share a postal code?
  • a cursive recronym 2012-07-31 15:27
    Severity One:
    Please note that the country I live in has just over 420,000 inhabitants, and has no need for states. But on the other hand, our postal codes are so accurate that I suspect that each house has its own postal code.


    Go back to your side of the Atlantic, Lëtzebuergian, and take your funny ümlauts with you! ;-)
  • Scrummy 2012-07-31 15:39
    Brad:
    Pet peeve of mine; over-validation. Who friggin cares what they enter for zip? If you intend to send out spam mail later; clean addresses then.


    I agree. This is what's so great about Agile. A minor feature such as zip code validation would probably never even make the product backlog, and if it did, it would receive the proper attention to have it done right.
  • OccupyWallStreet 2012-07-31 15:49
    themagni:
    Of course, it's dumb to do this because the shippers will ream you at the border. I bought a $49 housing for my camera and paid a total of $33 in shipping after FedEx was done with it.


    FedEx's reaming is at least $25+tax. UPS' is much worse. That $49 item you bought would've been $50 from UPS, minimum (I've seen it higher).

    The best shipment is via DHL (if supported) or USPS - $5+tax, and sometimes Canada Post doesn't even bother charging you!

    Unless you really need it, if they only offer UPS, go to a competitor. UPS is popular because they make up for their low-cost service by gouging the recipient with various fees and taxes.

    FedEx's is $25 flat, UPS is anywhere from 30-200% from experience (yes, 200%...).

    pantsman:
    TRWTF is entering 'ddddd' instead of just disabling JavaScript.


    That doesn't work if the form requires javascript to submit it. Some onSubmit handlers work that way, annoyingly. Other forms require it or other form things break, horrendously.

    It's one of the nicer things with Chrome - you can easily manipulate the stuff live and make changes. I'm sure firefox can do it, but I haven't figured out how.
  • PiisAWheeL 2012-07-31 16:04
    Nagesh:
    PiisAWheeL:
    Nagesh:
    In my country, if you want oil change, you go to place you have make purchase of car. Once YOU GIVE them your car, all thing are fixed if you want or not.

    No zip code bull crap.
    I know you ride a camel to work. You don't gotta lie to kick it.


    I bow to your supreme knowledge of geography, Jahanpanah! Tussi great ho! Camels are part of Rajasthan not Andhra Pradesh, you buffoon!
    Hey hey hey! My ignorance began the moment I hit the border. Its all India. Camels are used. And you are Nagesh... The shining example of Indian stereotypes. Why are you in such a bad mood? Camel break down?

    On a side note, does that mean I have successfully Trolled Nagesh?
  • PedanticCurmudgeon 2012-07-31 16:15
    PiisAWheeL:
    On a side note, does that mean I have successfully Trolled Nagesh?
    Yes, but Nagesh has been off his game lately. Notice that his latest posts don't have any spelling or grammar mistakes.
  • PiisAWheeL 2012-07-31 16:21
    PedanticCurmudgeon:
    PiisAWheeL:
    On a side note, does that mean I have successfully Trolled Nagesh?
    Yes, but Nagesh has been off his game lately. Notice that his latest posts don't have any spelling or grammar mistakes.
    So its like picking on the special kids that ride the short bus: I'v won... but have I really won?
  • null 2012-07-31 16:26
    PiisAWheeL:
    Nagesh:
    PiisAWheeL:
    Nagesh:
    In my country, if you want oil change, you go to place you have make purchase of car. Once YOU GIVE them your car, all thing are fixed if you want or not.

    No zip code bull crap.
    I know you ride a camel to work. You don't gotta lie to kick it.


    I bow to your supreme knowledge of geography, Jahanpanah! Tussi great ho! Camels are part of Rajasthan not Andhra Pradesh, you buffoon!
    Hey hey hey! My ignorance began the moment I hit the border. Its all India. Camels are used. And you are Nagesh... The shining example of Indian stereotypes. Why are you in such a bad mood? Camel break down?

    On a side note, does that mean I have successfully Trolled Nagesh?


    His bad mood is the direct result of a few people telling him that his jokes are not funny and the power outage they are currently experiencing there.
  • Freddy 2012-07-31 17:52
    Chelloveck:
    Brad:
    Pet peeve of mine; over-validation. Who friggin cares what they enter for zip? If you intend to send out spam mail later; clean addresses then.


    The ones which really grind me are digit-only phone number and credit card fields. Really, can't the programmer figure out how how strip non-digits out of a text string so I can enter '(123)456-7890' or '1234 5678 9012 3456'?
    The propaganda from a data matching suite we use (quite rightly) suggests that data should be stored as unfiltered as possible, to allow you to consistently match how people enter the same data rather than how you have used it in several different places. That is, let the users enter whatever they want, store it as such, and try to mould it into whatever format you want when you actually use it.

    Additionally, Client Side validation simply requires users to enter more realistic-looking data which is harder to discern from real data.

    Example:
    I have an unvalidated form that I need to fill in:

    Name: Fuck Off
    Email Address: Not today
    Zip Code: Nope
    Phone: Blah


    vs the Validated form

    Name: Fuck Off
    Email Address: Not@today.com
    Zip Code: 55416
    Phone: 555 1234


    A human can see both of these are likely bodge, but because the computer has forced the 2nd to be in a format it considers valid, it can't see that it's a crock.

    The only time the user needs a response like "invalid zip code/phone number" is if they would be expecting an immediate response. If (as is usually the case) they are sending feedback or subscribing to something, you let them think everything is hunky dory and can choose whether to pay attention to their rubbish or not....but this is a decision that is made at the time the data is used not at the time the data is entered....
  • Mile 2012-07-31 17:59
    Anonymous.:
    Two observations.

    1. I don't know if this got fixed since the story went live or the code varies for different browsers, Midas locations, etc, but I've checked appointment booking pages for two locations next to me and they both contained regexp's starting with "(^[0-9]{5}(-[0-9]{4})", not "(^d{5}(-d{4})".

    2. I'm not familiar with modern web development tools, but that code did not look to me like it was written by a person. Maybe the regexp was somehow autogenerated too? What would the original human programmer input look like? Any experts here?
    for the Zip Code or the Phnone Numbrero?
  • Kim 2012-07-31 18:00
    For shame,

    Noone has yet mentioned "You Midas well have the best".
  • bambam 2012-07-31 18:26
    Yeah, its really time consuming to unscrew a bolt and filter, screw them back on, and dump some oil in.
  • consequat 2012-07-31 18:44
    OccupyWallStreet:
    It's one of the nicer things with Chrome - you can easily manipulate the stuff live and make changes. I'm sure firefox can do it, but I haven't figured out how.

    You do it by installing Firebug.

    Also, as usual, Opera could already edit pages live before "Inspect Element" was even invented.
  • SG_01 2012-07-31 19:24
    Also interesting how |0|1|1 is also a valid zip-code... I've never seen zip-codes with pipe symbols before ^^
  • Hand-E-Food 2012-07-31 19:43
    I'm betting the compiler complained that "\d" wasn't a valid escape code. The fix for that is to remove the "\" of course!
  • foxyshadis 2012-07-31 19:57
    null:
    Chelloveck:
    I was really impressed to learn that the postal barcode you see on letters (in the USA, anyway) contains a planet code. "Wow, that's some really progressive future-proofing!" I thought. Imagine my disappointment when I learned that it was something quite more mundane than sending postcards to Mars.


    the 'planet' you are referring to is actually an acronym PLANET that stands for: 'Postal Alpha Numeric Encoding Technique' and encodes digits 0-9 much as the now deprecated POSTNET (i.e. also an acronym and not a planet, or a galaxy, or a black hole) did.

    CAPTCHA: EARTH is a Planet; PLANET is an acronym

    Whoosh.

    (Thank you for regurgitating Wikipedia, you get a B+ on your 3rd grade book report.)
  • mx 2012-07-31 22:19
    luxembourg?

    and my comment is not (that much) spam... akismet!
  • Andrew 2012-07-31 22:25
    actually there's two parts to that regex. "a0a0a0" would also work.

    broken down into words, the entire regexp is:

    5 d's at the start of the string followed by an option hyphen and 4 d's at the end of the string.

    or

    any letter at the start of the string, followed by a numeral, followed by any letter, followed optionally by a hyphen, followed optionally by a space, followed by a non-optional numeral, followed by any letter, followed by any numeral at the end of the string.

  • Anonymous. 2012-08-01 00:49
    Mile:
    Anonymous.:
    Two observations.

    1. I don't know if this got fixed since the story went live or the code varies for different browsers, Midas locations, etc, but I've checked appointment booking pages for two locations next to me and they both contained regexp's starting with "(^[0-9]{5}(-[0-9]{4})", not "(^d{5}(-d{4})".

    2. I'm not familiar with modern web development tools, but that code did not look to me like it was written by a person. Maybe the regexp was somehow autogenerated too? What would the original human programmer input look like? Any experts here?
    for the Zip Code or the Phnone Numbrero?


    dnn_ctr685_UIComponentInjector_ctl00_ZipPostalCodeRegEx.validationexpression = "(^[0-9]{5}(-[0-9]{4})?$)|(^[ABCEGHJKLMNPRSTVXY|abcdeghjklmnprstvxy][0-9][A-Z|a-z](-)?( )?[0-9][A-Z|a-z][0-9]$)";
  • AndyCanfield 2012-08-01 02:10
    My total peeve is when my bank will not accept as input my account number ENTERED EXACTLY AS THEY DISPLAY IT THEMSELVES. You show it with hyphens, you should accept it with hyphens.
  • lucidfox 2012-08-01 02:37
    TRWTF is ASP.NET, which is what the site uses.
  • Severity One 2012-08-01 03:14
    a cursive recronym:
    Severity One:
    Please note that the country I live in has just over 420,000 inhabitants, and has no need for states. But on the other hand, our postal codes are so accurate that I suspect that each house has its own postal code.

    Go back to your side of the Atlantic, Lëtzebuergian, and take your funny ümlauts with you! ;-)

    Bit more south. :)
  • TheSHEEEP 2012-08-01 03:15
    Severity One:

    In fact, the hλlf-wits at Valve insist to this very day that I fill in a state, which I dutifully fill in as 'n/a'. Please note that the country I live in has just over 420,000 inhabitants, and has no need for states. But on the other hand, our postal codes are so accurate that I suspect that each house has its own postal code.


    Pfff.... just get annected by next biggest neighbor and be done with that attitude. It's fun! Ask Tibet!
  • Severity One 2012-08-01 03:16
    Nagesh:
    In my country, if you want oil change, you go to place you have make purchase of car. Once YOU GIVE them your car, all thing are fixed if you want or not.
    And provided you live in the half of the country that actually has electric power.
  • Full of Gas 2012-08-01 04:30
    Severity One:
    Ah, zip codes. Sometimes I long for those days where you could enter an international address on site from an American company, but you still needed to provide a zip code. And a state.


    Many gas stations in the U.S. allow you to pay by credit card if you enter a zip code which is annoying for foreigners. The attendants don't seem to understand why you might want to pay by card but not at the pump...

    One day I decided to try a zip code of 00000 - and it worked. I chose not to think too hard about that.
  • Watson 2012-08-01 05:04
    herby:
    Ross Presser:
    Who needs IPv6? Let's just give every device a post code!

    Wrong! Who needs post code? Give every house an IPv6 address.

    Pfft, old news. http://tools.ietf.org/rfc/rfc1606.txt
  • someone 2012-08-01 05:34
    ahh, the "code" was written in a WYSIWTF IDE
  • A 2012-08-01 05:35
    OldCoder:
    dignissim:
    A:
    So... you're from the Nation of Brunei, the Abode of Peace?

    My bet would be more on Malta.

    Almost certainly Iceland.


    Seeing as Iceland the population of Iceland is 320 000, not 420 000, it's almost certainly not Iceland.
  • Cbuttius 2012-08-01 06:29
    according to http://www.worldatlas.com/aatlas/populations/ctypopls.htm

    the country with the population closest to 420K is Malta.
  • Severity One 2012-08-01 06:30
    dignissim:
    A:
    So... you're from the Nation of Brunei, the Abode of Peace?

    My bet would be more on Malta.
    Bingo. Most densely populated country in Europe (after Monaco Gibraltar and Vatican City, but those are city states), most densely populated non-coastal island in the world, and fifth highest number of vehicles per capita in the world. So you can imagine that finding where to park is a bit of a problem.

    I doubt, though, that each parking space would have its own postal code, particularly because mail is not usually delivered to parking spots.
  • Some Jerk 2012-08-01 08:12
    lucidfox:
    TRWTF is ASP.NET, which is what the site uses.


    the true WTF is that people are stupid enough to say things like this.
  • Blue Collar 2012-08-01 08:32
    The real WTF is that the guy is going to Midas.
  • M.M Lee 2012-08-01 09:44
    We don't (even) need no feelthy steenking cities.

    Here in "Disneyland with the death penalty" we are tired of the world (not to mention it's dog)'s insistence that we enter
    Country = Singapore
    State = Singapore
    City = Singapore

    (oh, and with one 70th of the population of 'murka, we apperently need one more digit in our zip codes, which is probably similar to their being enough IPV6 addresses to give one to every star in the universe (aka, my as shas its own zip code))
  • PiisAWheeL 2012-08-01 09:50
    bambam:
    Yeah, its really time consuming to unscrew a bolt and filter, screw them back on, and dump some oil in.
    Actually most shops lose money on oil changes. The oil change is where a mechanic can put the vehicle on the lift and inspect it for other problems. How are your brakes and pads? CV boots torn anywhere? etc. The shop then brings these items up to the customer when they come back for their vehicle (or after a list has been made, if the customer is in the waiting room), to see if the shop can sell the customer more work (and keep their car properly maintained).
  • Zippy Coder 2012-08-01 11:57
    I once came across a site which used 000+[country dialing code] (or 00+[country dialing code]), i.e. 00044 for the UK, for non-US locations, so I now try this every-time I need to enter a ZIP code.

    If they don't accept that (as often they will not), I use the one zip code most people outside the US will have heard of... 90210.
  • Evan 2012-08-01 12:26
    AndyCanfield:
    My total peeve is when my bank will not accept as input my account number ENTERED EXACTLY AS THEY DISPLAY IT THEMSELVES. You show it with hyphens, you should accept it with hyphens.

    But filtering out hyphens from the input string is so haaaard!
  • Jay 2012-08-01 14:00
    OccupyWallStreet:
    pantsman:
    TRWTF is entering 'ddddd' instead of just disabling JavaScript.


    That doesn't work if the form requires javascript to submit it. Some onSubmit handlers work that way, annoyingly. Other forms require it or other form things break, horrendously.

    It's one of the nicer things with Chrome - you can easily manipulate the stuff live and make changes. I'm sure firefox can do it, but I haven't figured out how.


    Yeah to point 1. Unless you've studied the code, you have no idea what the Javascript does. It may just do some validations that aren't needed if you manually insure that there are no errors ... or it may be massaging the data in any number of ways before submitting the form, doing Ajax calls that fire related updates, etc etc.

    As to point 2: You could always copy the web page (and any attached script files, style sheets, etc) to your local drive, study the Javascript, and edit it to fix the errors. But wow, that sounds like a lot of work just to submit an order. Before you can order their products, you have to debug their ordering system?
  • Mozzis 2012-08-01 14:02
    So instead of being far-sighted, it is short-sighted; now the USPS won't be able to have a planet code in snailmail barcodes without creating mass confusion. No wonder the mail to Ceres never arrives on time!
  • Jay 2012-08-01 14:08
    Freddy:
    Chelloveck:
    Brad:
    Pet peeve of mine; over-validation. Who friggin cares what they enter for zip? If you intend to send out spam mail later; clean addresses then.


    The ones which really grind me are digit-only phone number and credit card fields. Really, can't the programmer figure out how how strip non-digits out of a text string so I can enter '(123)456-7890' or '1234 5678 9012 3456'?
    The propaganda from a data matching suite we use (quite rightly) suggests that data should be stored as unfiltered as possible, to allow you to consistently match how people enter the same data rather than how you have used it in several different places. That is, let the users enter whatever they want, store it as such, and try to mould it into whatever format you want when you actually use it.

    Additionally, Client Side validation simply requires users to enter more realistic-looking data which is harder to discern from real data.

    Example:
    I have an unvalidated form that I need to fill in:

    Name: Fuck Off
    Email Address: Not today
    Zip Code: Nope
    Phone: Blah


    vs the Validated form

    Name: Fuck Off
    Email Address: Not@today.com
    Zip Code: 55416
    Phone: 555 1234


    A human can see both of these are likely bodge, but because the computer has forced the 2nd to be in a format it considers valid, it can't see that it's a crock.

    The only time the user needs a response like "invalid zip code/phone number" is if they would be expecting an immediate response. If (as is usually the case) they are sending feedback or subscribing to something, you let them think everything is hunky dory and can choose whether to pay attention to their rubbish or not....but this is a decision that is made at the time the data is used not at the time the data is entered....


    Hmm. So if the user's phone number is, say 123-555-9876, but he slips on the key entering it and it comes in as 123-555-986, you want to just accept it without warning, and somehow figure it out later? How? How do you find what the missing digit was? Okay, maybe you don't really need the phone number. But in that case, why did you ask for it? I think we can safely assume that at least SOME of the data requested on a form is required.

    Of course a format validation will not prevent all possible errors. If someone's zip code is 12345 and they accidentally type 12346, a format check won't catch that. But a format check will catch SOME errors, and some is better than none.
  • Jay 2012-08-01 14:15
    Oh, follow-up to my previous post.

    You talk as if the only point of data validation is to distinguish serious entries from spam. I can certainly understand the desire to filter out spam. But presumably the main point of, say, an order processing system, is to GET ORDERS so that we can collect money and ship merchandise. It's not enough to determine that an order is indeed a real order and not spam. We'd also like to collect enough information so we can actually get their money, and if we don't want to be forced to refund their money, we probably need to collect enough information to actually ship the merchandise the customer wanted.

    So sure, if someone types in "up yours" as a credit card number, then if we just accepted it, the jokester will have his laugh and we can safely disregard the order. but if someone types in a credit card number that doesn't have the right number of digits or doesn't pass the check-digit rule, it's quite likely that this was just a typing mistake and not spam. In that case, it seems like a good idea to alert the user that the credit card number entered is invalid so he can fix it, rather than just accepting it and later saying, Oh well, invalid credit card number, I guess we'll just throw away that order.
  • SilentRunner 2012-08-01 14:45
    It may surprise you, but you DO live in a state. What the hell to you think a country/nation is?

    God, when will we get some educated people on this board?
  • Jay 2012-08-01 14:56
    M.M Lee:
    We don't (even) need no feelthy steenking cities.

    Here in "Disneyland with the death penalty" we are tired of the world (not to mention it's dog)'s insistence that we enter
    Country = Singapore
    State = Singapore
    City = Singapore

    (oh, and with one 70th of the population of 'murka, we apperently need one more digit in our zip codes, which is probably similar to their being enough IPV6 addresses to give one to every star in the universe (aka, my as shas its own zip code))


    On the slightly serious side: Does anyone know why the IPv6 space is so huge? I mean, I can understand wanting to give plenty of room for future expansion and allowing for some dead space because we want to give out numbers in blocks. But with 6 billion or so people in the world, even if every person had 1000 devices, that would make 6 trillion, which would require ... quick calculation here ... 34 bits. So round it up to 40 to make an even 5 bytes. Or round it up to 48 to make an even 6 bytes. Even round it up to 64 so it takes up a long integer as defined in many languages. But 128? Isn't that rather a lot of overkill?

    Hey, quick calculation: There are 6e23 molecules per mole. Say the average person weighs maybe 80 kg. People are mostly water (over 90% I think I've read), which is 18 grams/mole, most other stuff in a person would be heavier, so conservatively a typical person should be less than 80,000 / 18 ~= 4,400 moles. 4,400 moles * 6e23 molecules/mole = 2.6e27 molecules. Times 6e9 people means there are about 1.6e37 molecules of people in the world. IPv6 address space is 3.4e38. So the IPv6 address space is big enough to give a separate IP address to every molecule in the body of every person in the world! That would still have 95% of the space free to accomodate future population growth, beings from other planets, etc.
  • Agention 2012-08-01 15:59
    Jay:
    ...So the IPv6 address space is big enough to give a separate IP address to every molecule in the body of every person in the world!


    Just the kind of thinking I'd think from a small-minded baryonic-matter-supremacist race.
  • Shea 2012-08-02 02:13
    THERE! The page IS working. One guy got through it.

    I'ma go play some Crysis now.
  • Krupuk 2012-08-02 04:35
    Living too in a country with only 500,000 inhabitants, we have postal codes for every street (not only per city).

    I remember registering at an american site where I had to fill in my address. You could either select your city or type in your zip code. I selected my hometown and it automatically filled in a code, I had never seen. I looked it up and it sure was the postal code of a street in my town. They apparently had randomly selected a street and copied its zip code, mistaken it for the entire city's code. So my address now had a wrong zip code. I changed it to the real one, but the system didn't want to accept it, because it didn't match their code for the town. I checked other towns and they sure only had 10 zip codes for the 10 towns in their database.

    We even have a few streets (with more than 500 houses) that have 2 zip codes! One for the even numbered side and one for the odd numbered one.
  • Severity One 2012-08-03 08:56
    Yeah, that's pretty normal. What many people in a country with low-granularity postal/zip codes often don't realise, is that postal codes are no longer really necessary to deliver mail (as the Irish found out, mentioned earlier), but they do have demographic information attached. And you can buy, and more importantly, sell this information.

    So with my last address in the Netherlands, with postal code 1083 CZ, not only can you see that it's in Amsterdam, but also that it's in an affluent neighbourhood (in Google Earth/Maps, there's actually an Audi R8 parked in front of the flat), although not nearly as affluent as the apartment block next to it. This means that you can really target your advertising, for example.

    Phone numbers is another one. Quite a few sites insist that you fill in an area code. Cool, but area codes with mobile phones are useless (and we don't even have a landline any longer), and in this country we just have eight digits and that's it.
  • oheso 2012-08-04 07:34
    Severity One:
    And provided you live in the half of the country that actually has electric power.


    One more thing India inherited from its former colonial boss, apparently.
  • oheso 2012-08-04 07:37
    Full of Gas:
    if you enter a zip code which is annoying for foreigners.


    Damn foreigners. Where do they get off being annoyed at zip codes?
  • Josh Einstein 2012-08-05 00:22
    The real WTF is taking your car to Midas for an oil change.
  • Chris 2012-08-06 05:52
    Severity One : "Phone numbers is another one. Quite a few sites insist that you fill in an area code. Cool, but area codes with mobile phones are useless (and we don't even have a landline any longer), and in this country we just have eight digits and that's it."

    That one will go right over the head of most Yankees. They still have landline area codes to their mobiles.
  • Stefan Andersson 2012-08-08 14:29
    http://midastucson.com/MidasLocatorV2/TestingPage/tabid/198/language/en-US/Default.aspx
  • Blinkin The Misanthropic IT Gremlin 2012-08-13 12:38
    To be fair, US postal codes get specific down to individual houses as well (though I recently found out the same is not true for apartment dwellings; they seem to be grouped within apartment buildings). The "ZIP + 4" specifies the area postal code and the specific physical location code. Very few online forms require the ZIP + 4 however, tending to only use the 5 digit ZIP. Shipping services, UPS, FedEx, and the USPS, will typically auto-fill the succeeding 4 digits of the full ZIP based on what you enter for a street address.
  • Sanity 2012-08-13 19:21
    Alternate solution: Ctrl+shift+J and paste ' dnn_ctr685_UIComponentInjector_ctl00_ZipPostalCodeRegEx.validationexpression = ".*";' into the console, then type whatever zipcode you want.