• anonymous (unregistered)

    TRWTF is that my home address is 68 characters long.

  • dgschrei (unregistered)

    TRWTF is that you can now create an entry without ANY Zip code. But really who would ever do this ;) .

  • foo AKA fooo (unregistered)

    A variable varchar, perfectly cromulent!

  • foo AKA fooo (unregistered) in reply to anonymous
    anonymous:
    TRWTF is that my home address is 68 characters long.
    StreetAddress1  varchar2(64) Comment 'No matter what they enter, one of these will be populated',
    StreetAddress1_68  varchar2(68) Comment 'No matter what they enter, one of these will be populated',
    Fixed?
  • Zippy (unregistered)

    Even better: now you can have multiple ZIP codes! Because of the anti-pattern reuse, this will cause havoc somewhere due to the inevitable typo and/or forgotten "else"...

  • anon (unregistered) in reply to anonymous
    anonymous:
    TRWTF is that my home address is 68 characters long.

    I've worked with a system that had similar problems but solved it rather elegantly. Every customer had a "comment" field for internal use and if the address didn't fit in its designated field it simply continued over into the comment field, giving another 255 characters to work with.

  • Geoff (unregistered)

    I don't know what it is about the relational database and SQL that see to inspire the most bizarre, creative, and WRONG solutions to problems.

    Oh sure people come up with all kinds of WTFy way to abuse and misapply other software tooling and data structures; but relational data and SQL seem to draw the crazy out of people. Which I find odd because when you think about other languages and other persistent data storage methods most of them off more choices in terms of control structures and storage classes/objects/formats and yet rarely do the the creatively stupid come up with WTFs that are really on the level of their counter parts working with SQL on top of relational data.

  • Charles F. (unregistered)

    TRWTF is "zip code". It's ZIP (Zone Improvement Plan) code, or postal code.

  • hanzo (unregistered) in reply to Geoff
    Geoff:
    I don't know what it is about the relational database and SQL that see to inspire the most bizarre, creative, and WRONG solutions to problems...Which I find odd because when you think about other languages[snip]

    Though there are languages which actually come with persistent storage of one kind or another; "database" is the persistent storage every n00b knows and understands ("understands" as in "knows how to spell", but still, he is able to find the "this i show you do $X in $yoursqldb" "tutorials"). Putting together a few of these can generate abominations quite easily.

  • faoileag (unregistered)

    The real WTF is of course that US postal codes in the 5+4 versions are usually displayed (or entered) including the separator, i.e. 18010-0000 (see http://pa.postcodebase.com/category/city_name/ACKERMANVILLE)

    So unless there is some client side logic fixing this (i.e. removing the minus), the bad job was not even done correctly, since a column like Zip10 is missing in the database.

    Definitely a great WTF on a monday!

  • ¯\(°_o)/¯ I DUNNO LOL (unregistered)

    TRWTF is that they're missing out on all that lucrative business in Canada. Eh?

  • (cs) in reply to Geoff
    Geoff:
    I don't know what it is about the relational database and SQL that see to inspire the most bizarre, creative, and WRONG solutions to problems.
    Well, this one I can also imagine in hierarchical DBs or mongoDB. Or XML!
    rarely do the the creatively stupid come up with WTFs that are really on the level of their counter parts working with SQL on top of relational data.
    Must be something like: hey, this guy cannot write C#. Let's assign him to DB work. Anyone can learn SQL.
  • Bappo (unregistered) in reply to Zippy
    Zippy:
    Even better: now you can have multiple ZIP codes! Because of the anti-pattern reuse, this will cause havoc somewhere due to the inevitable typo and/or forgotten "else"...

    It is not (hopefully) an antipatter. No everything stupid is a commonly repeated scheme of things.

    Bappo

  • ZoomST (unregistered) in reply to Charles F.
    Charles F.:
    TRWTF is "zip code". It's ZIP (Zone Improvement Plan) code, or postal code.
    The real zip code, as stated in "the Book of Five Urinals", is: <<Do not turn and face somebody <b>before zip up your pants. Always do it in the correct order: zip up and turn.>> Is in the chapter about Urinal Etiquette, just after the rule of the empty spaces.
  • DoctaJonez (unregistered) in reply to Bappo

    Mmmmmmmmm Antipasti! Which reminds me, lunch time!!!

  • EvilSnack (unregistered) in reply to Geoff
    Geoff:
    I don't know what it is about the relational database and SQL that see to inspire the most bizarre, creative, and WRONG solutions to problems.
    In the field of government regulation you will also see bizarre, creative, and WRONG solutions, oftentimes to things that aren't even problems.
  • StreetAddress69 (unregistered) in reply to foo AKA fooo
    foo AKA fooo:
    anonymous:
    TRWTF is that my home address is 68 characters long.
    StreetAddress64  varchar2(64) Comment 'No matter what they enter, one of these will be populated',
    StreetAddress65  varchar2(65) Comment 'No matter what they enter, one of these will be populated',
    StreetAddress66  varchar2(66) Comment 'No matter what they enter, one of these will be populated',
    StreetAddress67  varchar2(67) Comment 'No matter what they enter, one of these will be populated',
    StreetAddress68  varchar2(68) Comment 'No matter what they enter, one of these will be populated',
    Fixed?
    It is now
  • (cs) in reply to ¯\(°_o)/¯ I DUNNO LOL
    ¯\(°_o)/¯ I DUNNO LOL:
    TRWTF is that they're missing out on all that lucrative business in Canada. Eh?
    That is what Zip6 and Zip7 are for. The official format is like:
    L4W 1S2
    but some people drop the space in the middle:
    L4W1S2
    Canada Post's OCR software can handle both sets and a few variations. If the OCR software fails to read everything or it does not make enough sense to its program, sort of like failing a CAPTCHA, then the picture of the address is given to a human operator for him/her to figure out what is the actual postal code, and thus routing.

    Putting other things in the middle, like a dash, confused earlier versions of the text reading software, so it would get kicked off to a human to read and figure out what is going on with it. Bad Code:

    L4W-1S2

  • (cs) in reply to DoctaJonez
    DoctaJonez:
    Mmmmmmmmm Antipasti! Which reminds me, lunch time!!!
    Just be careful not to bring them into contact with Pasti, or you might have a huge explosion on your hands.
  • Bob (unregistered) in reply to Anonymouse
    Anonymouse:
    DoctaJonez:
    Mmmmmmmmm Antipasti! Which reminds me, lunch time!!!
    Just be careful not to bring them into contact with Pasti, or you might have a huge explosion on your hands.

    Don't be silly, Antipasti is just a pasta dish which has includes thiotimoline in its recipe, whose taste arrives on the tastebuds before you actually start to eat it. Brave practicitioners of experimental physics who want to see what happens if, on tasting it, then decide not to actually eat it, tend to find they wake up in the morning with a rather worse hangover than usual.

  • Delphi do (unregistered)

    So it won't take zip + 4 because that requires ten characters. And what does the insert statement look like? Does it check input lengths? I can't see this passing a minimal QA test.

    Are any of these stories true anymore? Were any of them ever?

  • anonymous (unregistered) in reply to faoileag
    faoileag:
    The real WTF is of course that US postal codes in the 5+4 versions are usually displayed (or entered) including the separator, i.e. 18010-0000 (see http://pa.postcodebase.com/category/city_name/ACKERMANVILLE)

    So unless there is some client side logic fixing this (i.e. removing the minus), the bad job was not even done correctly, since a column like Zip10 is missing in the database.

    Definitely a great WTF on a monday!

    No, there's nothing unusual about storing the number without the hyphen. TRWTF is that his design can store 6, 7, or 8 digit ZIP codes. A ZIP code is 5 digits plus an optional 4 digit extension: either 5 or 9 digits. Always. Six digits shalt thou not enter; neither enter thou seven or eight, excepting that thou then proceed to nine. Four is right out.

    Some great validation there...

  • golddog (unregistered) in reply to TGV
    TGV:
    Geoff:
    I don't know what it is about the relational database and SQL that see to inspire the most bizarre, creative, and WRONG solutions to problems.
    Well, this one I can also imagine in hierarchical DBs or mongoDB. Or XML!
    rarely do the the creatively stupid come up with WTFs that are really on the level of their counter parts working with SQL on top of relational data.
    Must be something like: hey, this guy cannot write C#. Let's assign him to DB work. Anyone can learn SQL.

    While I can't say this universally (I've worked with some very good DBAs), it often seems as if they've never developed software before.

    For example, our genius DBA and his buddy on a contract (who was the expert in the field put together a system about a year ago to do a lot of processing of data to allow reports to run against the processed data.

    Setting aside the parts about the reports being wrong (in the rare case they actually ran to completion) when doing a demo, they built this grandiose system to connect which stored procedures to run to another piece of data, table X.

    So, for row 1 in table X, they could map it to collect stored procedures sp1, sp2, sp3... for row 2, it might run sp2, sp5, and sp6. Fine, maybe a nice abstraction...

    Except in this mapping, they used the 'name' field from table X. When we discussed this, I pointed out the name field has an online admin function, and could change at any time, unlike the UniqueId field, which is an identity.

    I was told that use of either field was simply a preference and equally valid, as either one could change.

    I suppose that's theoretically true; someone could go into the database, set identity insert off, update the unique id to something else, then turn it back on, and the machine wouldn't run for row 2 in table X.

    Or, they could unse the online function to administer the name column. Which, of course, was practically the first thing out of the box the users did.

    Nothing like knowing your environment and building around the things which are likely to cause problems.

    Chimpanzee-like attention to detail.

  • (cs) in reply to golddog
    golddog:
    Chimpanzee-like attention to detail.
    Best description of the average DBA I've heard.
  • Rob Karver (unregistered)

    anyone else thought from the title this was going to be about a zip code field being confused with a phone number?

  • foo AKA fooo (unregistered) in reply to TGV
    TGV:
    golddog:
    Chimpanzee-like attention to detail.
    Best description of the average DBA I've heard.
    Well, with an attention like this, they probably never understood why we mere humans need a database in the first place.
  • (cs) in reply to Delphi do
    Delphi do:
    So it won't take zip + 4 because that requires ten characters. And what does the insert statement look like? Does it check input lengths? I can't see this passing a minimal QA test.

    The INSERT statement is prepared client-side so the server doesn't ever need to worry about it. See how simple that is?

  • XXXXXX (unregistered) in reply to StreetAddress69
    StreetAddress69:
    foo AKA fooo:
    anonymous:
    TRWTF is that my home address is 68 characters long.
    StreetAddress64  varchar2(64) Comment 'No matter what they enter, one of these will be populated',
    StreetAddress65  varchar2(65) Comment 'No matter what they enter, one of these will be populated',
    StreetAddress66  varchar2(66) Comment 'No matter what they enter, one of these will be populated',
    StreetAddress67  varchar2(67) Comment 'No matter what they enter, one of these will be populated',
    StreetAddress68  varchar2(68) Comment 'No matter what they enter, one of these will be populated',
    Fixed?
    It is now

    What about mine? It's only 42. There's a lot of missing address fields.

  • anonymous (unregistered) in reply to golddog
    golddog:
    TGV:
    Geoff:
    I don't know what it is about the relational database and SQL that see to inspire the most bizarre, creative, and WRONG solutions to problems.
    Well, this one I can also imagine in hierarchical DBs or mongoDB. Or XML!
    rarely do the the creatively stupid come up with WTFs that are really on the level of their counter parts working with SQL on top of relational data.
    Must be something like: hey, this guy cannot write C#. Let's assign him to DB work. Anyone can learn SQL.

    While I can't say this universally (I've worked with some very good DBAs), it often seems as if they've never developed software before.

    For example, our genius DBA and his buddy on a contract (who was the expert in the field put together a system about a year ago to do a lot of processing of data to allow reports to run against the processed data.

    Setting aside the parts about the reports being wrong (in the rare case they actually ran to completion) when doing a demo, they built this grandiose system to connect which stored procedures to run to another piece of data, table X.

    So, for row 1 in table X, they could map it to collect stored procedures sp1, sp2, sp3... for row 2, it might run sp2, sp5, and sp6. Fine, maybe a nice abstraction...

    Except in this mapping, they used the 'name' field from table X. When we discussed this, I pointed out the name field has an online admin function, and could change at any time, unlike the UniqueId field, which is an identity.

    I was told that use of either field was simply a preference and equally valid, as either one could change.

    I suppose that's theoretically true; someone could go into the database, set identity insert off, update the unique id to something else, then turn it back on, and the machine wouldn't run for row 2 in table X.

    Or, they could unse the online function to administer the name column. Which, of course, was practically the first thing out of the box the users did.

    Nothing like knowing your environment and building around the things which are likely to cause problems.

    Chimpanzee-like attention to detail.

    That's a major pet peeve of mine. If you give me a way to move or rename something, you should cross-reference and update everything that references it so that it doesn't break a whole bunch of linkages that I've created. I will accept no excuses; even Excel (usually) gets this right!

  • Compiler (unregistered) in reply to golddog

    While I can't say this universally (I've worked with some very good DBAs), it often seems as if they've never developed software before.

    For example, our genius DBA and his buddy on a contract (who was the expert in the field put together a system about a year ago to do a lot of processing of data to allow reports to run against the processed data.

    Setting aside the parts about the reports being wrong (in the rare case they actually ran to completion) when doing a demo, they built this grandiose system to connect which stored procedures to run to another piece of data, table X.

    So, for row 1 in table X, they could map it to collect stored procedures sp1, sp2, sp3... for row 2, it might run sp2, sp5, and sp6. Fine, maybe a nice abstraction...

    Except in this mapping, they used the 'name' field from table X. When we discussed this, I pointed out the name field has an online admin function, and could change at any time, unlike the UniqueId field, which is an identity.

    I was told that use of either field was simply a preference and equally valid, as either one could change.

    I suppose that's theoretically true; someone could go into the database, set identity insert off, update the unique id to something else, then turn it back on, and the machine wouldn't run for row 2 in table X.

    Or, they could unse the online function to administer the name column. Which, of course, was practically the first thing out of the box the users did.

    Nothing like knowing your environment and building around the things which are likely to cause problems.

    Chimpanzee-like attention to detail.[/quote]

    Parse error: Mismatched parentheses line 2 char 56 Segmentation fault [core dumped]

  • Compiler (unregistered) in reply to golddog
    While I can't say this universally (I've worked with some very good DBAs), it often seems as if they've never developed software before.

    For example, our genius DBA and his buddy on a contract (who was the expert in the field put together a system about a year ago to do a lot of processing of data to allow reports to run against the processed data.

    Setting aside the parts about the reports being wrong (in the rare case they actually ran to completion) when doing a demo, they built this grandiose system to connect which stored procedures to run to another piece of data, table X.

    So, for row 1 in table X, they could map it to collect stored procedures sp1, sp2, sp3... for row 2, it might run sp2, sp5, and sp6. Fine, maybe a nice abstraction...

    Except in this mapping, they used the 'name' field from table X. When we discussed this, I pointed out the name field has an online admin function, and could change at any time, unlike the UniqueId field, which is an identity.

    I was told that use of either field was simply a preference and equally valid, as either one could change.

    I suppose that's theoretically true; someone could go into the database, set identity insert off, update the unique id to something else, then turn it back on, and the machine wouldn't run for row 2 in table X.

    Or, they could unse the online function to administer the name column. Which, of course, was practically the first thing out of the box the users did.

    Nothing like knowing your environment and building around the things which are likely to cause problems.

    Chimpanzee-like attention to detail.

    Parse error: Mismatched parentheses line 2 char 56 Segmentation fault [core dumped]

  • postal coder (unregistered) in reply to anonymous
    anonymous:
    TRWTF is that his design can store 6, 7, or 8 digit ZIP codes. A ZIP code is 5 digits plus an optional 4 digit extension: either 5 or 9 digits. Always. Six digits shalt thou not enter; neither enter thou seven or eight, excepting that thou then proceed to nine. Four is right out.

    Some great validation there...

    If you Americans for once take a look at the rest of the world, you'll notice that there is more variety to postal codes under the Sun than a mere mortal can fathom. See http://en.wikipedia.org/wiki/File:Postal_codes_by_country.svg. And that is with stripping non-significant dashes or spaces.

    For such variety it is but appropriate that a varied variety of varchar fields be variably prepared. What is lacking in this is fields for 3 or 10 digits. And for true validation there should be separate fields for the alphanumeric varieties. Admitting codes of 6 digits and the canadian alternating abomination into the same field will surely thwart reasonable validation.

  • b0b (unregistered)

    Still fails. The 9-digit zip code is usually 10 characters. There's a dash after the first 5.

  • dignissim (unregistered) in reply to postal coder
    postal coder:
    If you Americans for once take a look at the rest of the world, you'll notice that there is more variety to postal codes under the Sun than a mere mortal can fathom.
    The lack of a "Country" column should be a hint that this particular table isn't intended to store international addresses.
  • (cs) in reply to golddog
    golddog:

    While I can't say this universally (I've worked with some very good DBAs), it often seems as if they've never developed software before.

    [snip]

    I was told that use of either field was simply a preference and equally valid, as either one could change.

    This seems to be a new thing: Flood of design suggestions and no firm recommendations. Now that we've reached the age of patterns versus anti-patterns, it seems like there's a subversive movement to avoid use of either.

    The best of all is these "experts" who say, "Well, there's lots of ways you can do it," and (carefully avoiding any indication of favor), "Which way you choose is up to you." Then, later, they tell you (gleefully), "You made the wrong choice."

    I feel like I'm playing shell games.

  • Anomaly (unregistered)

    Why is the dash even important for storing the number? The assumption can be made that if the zp code is more than 5 numbers, take the first 5, add a '-', pad the remaining digits to length 4, (the system may remove all zeros before a number 0004 becomes 4, so the 6 digit zip 123454 would be transformed into 12345-0004 appropriately) but that depends on the exact implementation of how the numbers are stored.

  • John (unregistered)

    That person must have gotten the job of building web page input handling for credit card numbers that is not smart enough to remove spaces from the user input before validating.

  • (cs) in reply to EvilSnack
    EvilSnack:
    Geoff:
    I don't know what it is about the relational database and SQL that see to inspire the most bizarre, creative, and WRONG solutions to problems.
    In the field of government regulation you will also see bizarre, creative, and WRONG solutions, especially to things that aren't even problems.
    FTFY
  • (cs) in reply to Geoff
    Geoff:
    I don't know what it is about the relational database and SQL that see to inspire the most bizarre, creative, and WRONG solutions to problems.

    Oh sure people come up with all kinds of WTFy way to abuse and misapply other software tooling and data structures; but relational data and SQL seem to draw the crazy out of people. Which I find odd because when you think about other languages and other persistent data storage methods most of them off more choices in terms of control structures and storage classes/objects/formats and yet rarely do the the creatively stupid come up with WTFs that are really on the level of their counter parts working with SQL on top of relational data.

    I don't even understand that. I'm not a DBA, but I could have seen how bad this was before I even ever touched a computer. It's just mind-blowing how bad some pieces of code are.

    That being said, this is one of those rare circumstances where the database software isn't great for validation, so it should loosely hold the data, and leave the country-specific validation up to the app. Similar to phone numbers.

  • (cs) in reply to Nutster
    Nutster:
    ¯\(°_o)/¯ I DUNNO LOL:
    TRWTF is that they're missing out on all that lucrative business in Canada. Eh?
    That is what Zip6 and Zip7 are for. The official format is like:
    L4W 1S2
    but some people drop the space in the middle:
    L4W1S2
    Canada Post's OCR software can handle both sets and a few variations. If the OCR software fails to read everything or it does not make enough sense to its program, sort of like failing a CAPTCHA, then the picture of the address is given to a human operator for him/her to figure out what is the actual postal code, and thus routing.

    Putting other things in the middle, like a dash, confused earlier versions of the text reading software, so it would get kicked off to a human to read and figure out what is going on with it. Bad Code:

    L4W-1S2

    TRWTF is Canada Post. And as someone who used to buy and sell regularly on eBay, I speak from more than mere national sneering.
  • (cs)

    But Canada has the postal code "H0H 0H0", so they're the most important country, when it comes to mail.

  • (cs)

    How come they are missing latitude longitude for U.S address? Our client want every address to be valid against google rooftop search.

  • Peter Wolff (unregistered) in reply to dignissim
    dignissim:
    postal coder:
    If you Americans for once take a look at the rest of the world, you'll notice that there is more variety to postal codes under the Sun than a mere mortal can fathom.
    The lack of a "Country" column should be a hint that this particular table isn't intended to store international addresses.
    O. Z.'s coworker will take care of it as soon as the company plans to get into international business.
  • Anomaly (unregistered)

    Type in your address exactly as your country requires to receive something shipped from USA*:

    (insert text area to collect address)

    *Disclaimer: We are not responsible for errors in your address. The address used will be the one YOU provide. If you provide an incorrect, wrong, old, or otherwise undeliverable address and your package is returned to us. We will refund the cost of the item to you, less any shipping charges. If you have any questions about how to properly format your address; Please See usps.com and google.com for helpful shipping tips.

    There problem solved forever. Give responsibility for the correct address to the consumer.

  • (cs) in reply to Nutster
    Nutster:
    Putting other things in the middle, like a dash, confused earlier versions of the text reading software, so it would get kicked off to a human to read and figure out what is going on with it. Bad Code:
    L4W-1S2

    When addressing mail I usually just write all six characters with a space in the middle, but I tend to put a dash in between if I enter my address in a form.

    When I started my most recent job I spent three days (yes, days) trying to get an offer letter sent to me by email. Every time I called to ask where it was I was told that it had been sent, but it still refused to arrive. Eventually someone got around to looking at their error logs and discovered that the custom built Recruit-O-Tron, Multinational Corporate Edition software they were using crashed completely whenever it so much as looked at a record with a seven character long postal code.

    The funny things about this are that:

    a) My email wasn't being delivered because of a problem with the postal code. I still have trouble accepting that that kind of problem can happen. b) I had already accepted the job offer a week earlier, c) I had also started working there two years before as a contractor, and d) The company happens to be one of the biggest banks in the country. I'm just going to keep telling myself that the systems used by HR have absolutely no connection to the ones that handle everybody's money but it never quite reassures me.

  • rwessel (unregistered)

    Back when ZIP+4 was introduced, a common technique on mainframe systems was to replace the existing "PIC 9(5)" (five digit, five byte, numeric, display character) field with "PIC 9(9) COMP-3" (nine digit, five byte, numeric packed decimal [BCD+sign]) to hold the longer format ZIP code. In the first case a ZIP like 60601 (downtown Chicago) would be stored as X'F6F0F6F0F1' (remember EBCDIC), and in the latter, 60601-1234 would be stored as X'606011234F'. This had the advantage of not requiring the layout of the records to be changed. Now most people at least converted the entire file at once. Some folks, in an effort to avoid the conversion, did a union (Cobol "REDEFINES") of both formats, and then did an "IS NUMERIC" test in each program reading that field to check which format was stored (the display and packed formats would never both pass the numeric test).

  • Shge (unregistered) in reply to dignissim
    dignissim:
    postal coder:
    If you Americans for once take a look at the rest of the world, you'll notice that there is more variety to postal codes under the Sun than a mere mortal can fathom.
    The lack of a "Country" column should be a hint that this particular table isn't intended to store international addresses.
    I'm not so sure....I've been to a lot of yank-based sites claiming to be international, but still insisting I enter a zip code (and sometimes a state abbreviation - limited to the 50, of course). It seems even the ones that include a 'country' drop down list still think that it's possible I live in Nebraska, Afghanistan/Albania/Algeria/Andorra/Angola/Argentina/Armenia/Australia/Austria/Azerbajain/..... and have a 5 digit zip code.....
  • Shge (unregistered) in reply to dignissim
    dignissim:
    postal coder:
    If you Americans for once take a look at the rest of the world, you'll notice that there is more variety to postal codes under the Sun than a mere mortal can fathom.
    The lack of a "Country" column should be a hint that this particular table isn't intended to store international addresses.
    I'm not so sure....I've been to a lot of yank-based sites claiming to be international, but still insisting I enter a zip code (and sometimes a state abbreviation - limited to the 50, of course). It seems even the ones that include a 'country' drop down list still think that it's possible I live in Nebraska, Afghanistan/Albania/Algeria/Andorra/Angola/Argentina/Armenia/Australia/Austria/Azerbajain/..... and have a 5 digit zip code.....
  • 3GSr (unregistered) in reply to anonymous
    anonymous:
    golddog:
    TGV:
    Geoff:
    I don't know what it is about the relational database and SQL that see to inspire the most bizarre, creative, and WRONG solutions to problems.
    Well, this one I can also imagine in hierarchical DBs or mongoDB. Or XML!
    rarely do the the creatively stupid come up with WTFs that are really on the level of their counter parts working with SQL on top of relational data.
    Must be something like: hey, this guy cannot write C#. Let's assign him to DB work. Anyone can learn SQL.

    While I can't say this universally (I've worked with some very good DBAs), it often seems as if they've never developed software before.

    For example, our genius DBA and his buddy on a contract (who was the expert in the field put together a system about a year ago to do a lot of processing of data to allow reports to run against the processed data.

    Setting aside the parts about the reports being wrong (in the rare case they actually ran to completion) when doing a demo, they built this grandiose system to connect which stored procedures to run to another piece of data, table X.

    So, for row 1 in table X, they could map it to collect stored procedures sp1, sp2, sp3... for row 2, it might run sp2, sp5, and sp6. Fine, maybe a nice abstraction...

    Except in this mapping, they used the 'name' field from table X. When we discussed this, I pointed out the name field has an online admin function, and could change at any time, unlike the UniqueId field, which is an identity.

    I was told that use of either field was simply a preference and equally valid, as either one could change.

    I suppose that's theoretically true; someone could go into the database, set identity insert off, update the unique id to something else, then turn it back on, and the machine wouldn't run for row 2 in table X.

    Or, they could unse the online function to administer the name column. Which, of course, was practically the first thing out of the box the users did.

    Nothing like knowing your environment and building around the things which are likely to cause problems.

    Chimpanzee-like attention to detail.

    That's a major pet peeve of mine. If you give me a way to move or rename something, you should cross-reference and update everything that references it so that it doesn't break a whole bunch of linkages that I've created. I will accept no excuses; even Excel (usually) gets this right!
    Yes, I love when I have calculations and I need to insert one, and the references don't change (think of a bank statement where you have to insert a transaction between B and C....it helps if the stuff moving from C to D now points to the inserted C, instead of the original B)

    That said, I also have encountered cases where it's handy the referential integrity is maintained... As with most things, perhpas there is no silver bullet....

  • Johnny (unregistered) in reply to Anomaly
    Anomaly:
    Type in your address exactly as your country requires to receive something shipped from USA*:

    (insert text area to collect address)

    *Disclaimer: We are not responsible for errors in your address. The address used will be the one YOU provide. If you provide an incorrect, wrong, old, or otherwise undeliverable address and your package is returned to us. We will refund the cost of the item to you, less any shipping charges. If you have any questions about how to properly format your address; Please See usps.com and google.com for helpful shipping tips.

    There problem solved forever. Give responsibility for the correct address to the consumer.

    Oh wow, oh wow. I nearly got laughed out of the office for suggesting something similar....

    Basically we were having issues where poor data was being entered and the problem was perceived to be us not handling the data rather than poor data entry. I suggested that perhaps it should be made clear that errors in data might see your details processed incorrectly and cause somewhat of a headache for you in the long run....

    There's only so much data validation that can/should/is safe to do before you need to stop the rubbish in. Bottom line (with anything computer) is that Rubbish can often result in rubbish out....

    One of the fundamentals of data search and matching is to keep the data in the rawest format you received it - by all means manipulate copies of it in an attempt to match it to things, but always keep as basic a copy as you can. Enforcing too much formatting on data only means that when it doesn't work for someone, they'll squeeze it in some way - and then data changes its shape and potentially starts to look like something it's not.

    Having people enter their address as they would expect it to appear on their mail is a great way of ensuring it's reasonably correct (and you can always do some checks and hints "did you mean to omit the country, and do you know it makes it hard to know who we should allow to mess up this delivery" just in case someone thinks a purchase from Sweden will know which Springfield their sending to....

Leave a comment on “Calling All Zip Codes”

Log In or post as a guest

Replying to comment #:

« Return to Article