I'm a proud citizen of NULL



  • I work at a university. A very swanky, expensive, private university in the States. I'm currently working with one of the Alumni data specialists on the implementation of a new online alumni community. Our job is to make sure the final, live ETL is clean and solid, and to tie into the web services exposed by the vendor of the hosted community service to keep their data and ours in synch.

    This afternoon "Alice" and I were going over address data, and along the way to determining the best way to validate nation names I noticed that US residents - the great majority of our alumni, us being in the U.S. and all - didn't have values in the nation column. "Oh," she said, "that's because we use NULL to mean the United States." I must have gaped openly, because she quickly explained, "It's for the benefit of the data entry people. Saves typing." I said, "Uh, that's...just....wrong. That's not what NULL means. NULL means not known or not entered."

    She seemed a little miffed that someone who was not much experienced in Alumni data specifically would have a strong opinion about this, and started again about saving time. I said, "But why can't that column default to 'United States'?" She didn't seem to have thought of that, and suggested we call the Data Entry supervisor to ask about it.

    "Cheryl", the Data Entry supervisor, cheerily explained yes, they had been using NULL to mean United States for years. In fact, it's one of our official data entry standards. "What's that sound?" she asked. Alice said, "That's Don banging his head on the table for some reason. Let me ask, what happens when an alum logs in to the web form and chooses 'United States' as his country?" "Oh," said Cheryl, "every Thursday the database runs a report of anyone with that in the nation field, and I go in and fix them. Say, is that thumping sound getting louder?"

    After ten minutes breathing into a paper bag and then lying quietly for a while with a damp cloth over my eyes, I was strong enough to go back to work. The real punch line came a little later, when we were reviewing the validation list of nations to remove those that no longer exist. We had just deleted 'U.S.S.R.' when Alice noticed something odd a little above it. "Now why," she asked, "do they have an entry 'Unknown or unspecified country'?"



  • Data Entry Supervisor... Not validating data entries in the application is not enough, they have to go and put a human in charge of it. Way to implement a Mechanical Turk service.



  • Great story. Main content worthy.



  • Saves typing, yet someone has to go in behind the scenes and ... type.
    So not only have they offloaded the typing duty to someone else, they've turned it into a convoluted manual process, wasted a supervisor's time, and standardized a terrible data model!
    Awesome WTF, thanks for sharing.



  • Oh, Holy ...

     That makes my brain hurt.
     



  • Not to mention going to the expense to build an online alumni community in the first place.  Just put a link to the right facebook group on the alumni page...



  • Doesn't seem too much like a WTF to me. We support CRM software, and have lots of clients that use this technique (blank/null implies US, anything else is explicitly stated).

    Why?

    1. When 99% of your customers are in the US, then it just makes sense.

    2. You don't want an address label or automated mail-merge letter to your customer to say "USA", but you DO want it to specify another country if applicable. Sure, you could program the business logic into the template, but most of the included templates and reports for the products we support would have to be altered, which costs time and money.

    Ok, so it makes queries a little wonky, especially if clients are inconsistent in applying this rule. But not usually that big of deal.



  • @BradC said:

    Doesn't seem too much like a WTF to me. We support CRM software, and have lots of clients that use this technique (blank/null implies US, anything else is explicitly stated).

    Why?

    1. When 99% of your customers are in the US, then it just makes sense.

    2. You don't want an address label or automated mail-merge letter to your customer to say "USA", but you DO want it to specify another country if applicable. Sure, you could program the business logic into the template, but most of the included templates and reports for the products we support would have to be altered, which costs time and money.

    Ok, so it makes queries a little wonky, especially if clients are inconsistent in applying this rule. But not usually that big of deal.

    You haven't provided any reasons that this isn't a WTF. You've just proven that you believe in the same WTF justification.

    Seriously, NULL means "unspecified". It doesn't mean "defaults to something". Set the database column to USA like you're supposed to, and use your programming "skillz" (not obvious that you have any, from the lack of knowledge indicated in your post) to suppress printing or display if you want. And it wouldn't cost time and money if you hadn't done it wrong to begin with; there wouldn't be any alteration required.

    Trying to justify WTF logic with more WTF logic is a WTF in itself. You should be ashamed of yourself, posting like this in a public place.
     



  • @BradC said:

    Doesn't seem too much like a WTF to me.

    RED FLAG.

    @BradC said:

    We support CRM software, and have lots of clients that use this technique (blank/null implies US, anything else is explicitly stated).
     

    BAD. 

    @BradC said:

    Why?

    1. When 99% of your customers are in the US, then it just makes sense.

     

    It NEVER makes sense it have implicit data.

    @BradC said:

    2. You don't want an address label or automated mail-merge letter to your customer to say "USA", but you DO want it to specify another country if applicable.Sure, you could program the business logic into the template,
     

    YES.

    @BradC said:

    but most of the included templates and reports for the products we support would have to be altered, which costs time and money.

    :care

    @BradC said:

    Ok, so it makes queries a little wonky, especially if clients are inconsistent in applying this rule. But not usually that big of deal.

    It is sacrificing consistency in favour of LAZINESS. You're mixing up display logic with data. You perpetuate idiocy by not caring. J'accuse.



  • @KenW said:

    And it wouldn't cost time and money if you hadn't done it wrong to begin with

    Tell that to the other guy, the one who created the thing before there were any international customers.

    I'm not saying this isn't a WTF. It really is a good one, and I agree it is front page material (at current standards). I just don't think things are that black & white, and BradC does have a point.*

     

    *That would be point 2. 🙂 Point 1 doesn't make sense if you were predicting international customers since the beginning. 



  • Ok, yes, this is a DB design WTF, and probably an application-specific WTF. I guess my primary point was that its not terribly uncommon to have one WTF (an odd business rule about the country field) to account for another WTF (an application that isn't really built propertly for internationalization).

    I just checked our internal customer database. Out of about 10,000 records, we have 7 (SEVEN!!) that are not located in the US. Sometimes handling exceptions manually is easier than changing the rule. And yes, I know that last statement will probably be considered a WTF by some. Suck it. 😛

    The original posting, however, does have some additional WTF elements, especially the confusion that results when other systems are tied into the mix.



  • Didn't you read KenW and drhomed's posts? You're just adding more WTF's to your train of thought. Also, there's an old saying that goes something like "don't use an error to justify another error."

    Setting that country field to default to US would cost you what, a handful of seconds?

    Sometimes handling exceptions manually is easier than changing the rule.

    It's only fun until someone gets hurt.

    You are probably lucky that your application doesn't require lots of maintenance job involving that field. But that doesn't mean it couldn't happen someday. Following this idea in the quote is like driving while mildly drunk. You won't necessarily suffer an accident, but it increases the risk of one to very dangerous levels - and when it happens, it's going to be pretty ugly.



  • @BradC said:

    an odd business rule about the country field) to account for another WTF (an application that isn't really built propertly for internationalization).

    I personally wouldn't call that a business rule. The requirement is "to store the country". A technical guy may choose to do that by using NULL as a default meaning USA. But that would be a very stupid technical guy.

    @BradC said:

    Out of about 10,000 records, we have 7 (SEVEN!!) that are not located in the US. Sometimes handling exceptions manually is easier than changing the rule.

    As far as the DB goes, this is not one of those cases. Programming some logice around a null vallue is more work than setting country not null default 'USA'

    @BradC said:

    Suck it. 😛

    That's the smiley for Lick, not suck. 🙂

     

    Using a Nothing to mean Something betrays a fundamental unlove for information organisation.

     

    I used much CAPITALIZATION in my previous post. That may have come across HARSH. I was dehydrated and crabby. 

    [quote user="Renan "C#" Sousa"]drhomed's[/quote]

    dhromed 😉
     



  • Sorry, typo.

    What's the smile for suck? Would it be 😘 ? (I think it's taken for kiss or something)



  • [quote user="Renan "C#" Sousa"]

    Sorry, typo.

    What's the smile for suck? Would it be 😘 ? (I think it's taken for kiss or something)

    [/quote]

    ^o^ 



  • [quote user="Renan "C#" Sousa"]

    Didn't you read KenW and drhomed's posts? You're just adding more WTF's to your train of thought. Also, there's an old saying that goes something like "don't use an error to justify another error."

    Setting that country field to default to US would cost you what, a handful of seconds?

    Sometimes handling exceptions manually is easier than changing the rule.

    It's only fun until someone gets hurt.

    You are probably lucky that your application doesn't require lots of maintenance job involving that field. But that doesn't mean it couldn't happen someday. Following this idea in the quote is like driving while mildly drunk. You won't necessarily suffer an accident, but it increases the risk of one to very dangerous levels - and when it happens, it's going to be pretty ugly.

    [/quote]

     

    As a side-note, that is a terrible analogy.  7/10000 would be like a few drops of beer, not "mildly drunk".



  • It's more like,

    If 1 good man lived in Sodom, etc.

    Now, managing exceptions in a largely uniform set in an unformal way is one thing. But using null as a default meaningful stored value is... well... I mean... you know...



  • @KenW said:

    @BradC said:

    Doesn't seem too much like a WTF to me. We support CRM software, and have lots of clients that use this technique (blank/null implies US, anything else is explicitly stated).

    Why?

    1. When 99% of your customers are in the US, then it just makes sense.

    2. You don't want an address label or automated mail-merge letter to your customer to say "USA", but you DO want it to specify another country if applicable. Sure, you could program the business logic into the template, but most of the included templates and reports for the products we support would have to be altered, which costs time and money.

    Ok, so it makes queries a little wonky, especially if clients are inconsistent in applying this rule. But not usually that big of deal.

    You haven't provided any reasons that this isn't a WTF. You've just proven that you believe in the same WTF justification.

    Seriously, NULL means "unspecified". It doesn't mean "defaults to something". Set the database column to USA like you're supposed to, and use your programming "skillz" (not obvious that you have any, from the lack of knowledge indicated in your post) to suppress printing or display if you want. And it wouldn't cost time and money if you hadn't done it wrong to begin with; there wouldn't be any alteration required.

    Trying to justify WTF logic with more WTF logic is a WTF in itself. You should be ashamed of yourself, posting like this in a public place.
     

     

    The "products we support" bit implies that they're working with a system built by some other company.  In this case, while it's indeed a bit of a WTF, it may not be enough of one to justify spending time on it.

     

    In contrast, the original post implies that they built the system themselves.  They then compound the problem from "null/blank implies USA" to "null is the only way to indicate USA" to "we allow entering USA and then waste someone else's time manually changing it to null".  Now [i]that[/i] is a WTF.

     


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.