Government Grade Error Handling



  • I recently moved and needed to update my address with the U.S. Selective Service. I pulled up the FAQ trying to find how to locate my selective service number and noticed a strange entry.

    Q   I filled out the On-Line Registration form, submitted and received the following error:

    Microsoft VBScript runtime error'800a000d'
    Type mismatch: 'Cint'
    /regver/register_nc.asp, line 293

    What do I need to do to correct this?

    A   This error is caused by entering non-numeric data, such as dashes or slashes, in the Date of Birth field. Ensure that you enter your date of birth in MMDDYYYY format. For example, if your birthday is May 20, 1981, you would enter 05201981. </FONT>

    What programming ideology says, "I have identified that a runtime error can occur here under these conditions, but instead of handling those conditions, I'm going to stick them in a FAQ and let the program bomb."?

    yeesh



  • Not only that but why is a date being stored as an int in that way?



  • @Casiotone said:

    Not only that but why is a date being stored as an int in that way?

    And why isn't it stored as the ISO date format specifies, which even allows you to sort the birth dates out of the box



  • Maybe someday there will be a programming genius that can include date/time data types in both a programming language AND in database tables. I think that day will be somewhere around 1012010.



  • @Manni said:

    Maybe someday there will be a programming genius that can include date/time data types in both a programming language AND in database tables. I think that day will be somewhere around 1012010.

    120. October 2010 or whenever such a day comes?



  • @Manni said:

    Maybe someday there will be a programming genius
    that can include date/time data types in both a programming language
    AND in database tables. I think that day will be somewhere around
    1012010.




    If you use PL/SQL as your programming language of choice, you can have it right now. ;-)



  • Early in 2000 I tried to do an office lookup by zip code on a Sunday night.  The SSA web site at the time reported that this feature was only available during working hours.

    And check out this problem waiting for a CSS solution:

    http://www.ssa.gov/textsize.htm



  • @Manni said:

    Maybe someday there will be a programming genius
    that can include date/time data types in both a programming language
    AND in database tables. I think that day will be somewhere around
    1012010.


    Most language + database combinations I can think of that I'd want to build a web app with can do that already.



  • @Manni said:

    Maybe someday there will be a programming genius that can include date/time data types in both a programming language AND in database tables. I think that day will be somewhere around 1012010.

    Let me guess ... I think Manni is joking.

    (for everyone that didn't get it I think that Manni was making fun of something that we all know, aka sarcasm)

    (and yes, every joke losses it's funniness when it's explained)



  • @Zak said:

    @Manni said:
    Maybe someday there will be a programming genius that can include date/time data types in both a programming language AND in database tables. I think that day will be somewhere around 1012010.


    Most language + database combinations I can think of that I'd want to build a web app with can do that already.

    Sorry, forgot my </sarcasm> tag. I just thought it was blatantly stupid enough that most people would assume I had to be joking.

    And I guess I was being too obscure with the date thing. If you tried to store the date of January 1, 2010, it would be 01012010, but converting it to a number truncates off the first zero. Just pointing out the ridiculousness of such a methodology.

    And you're right, jokes are apparently less funny when they are explained.



  • @wk633 said:

    Early in 2000 I tried to do an office lookup by zip code on a Sunday night.  The SSA web site at the time reported that this feature was only available during working hours.

    And check out this problem waiting for a CSS solution:
    http://www.ssa.gov/textsize.htm


    You know what that implies, don't you? When you submit your zip code, somebody sitting at a desk is alerted. Quickly, they look up the zip code in their directory, and type in the appropriate office address(es).

    And they have to do it all before your browser times out.[;)]



  • @Casiotone said:

    Not only that but why is a date being stored as an int in that way?


    Actually, everything in VBScript is a variant. The programmer is specifically trying to cast this as an integer using the cint() function. Perhaps this IS his actual idea of error-handling. I have no idea why, given there is an isdate() function in the ASP Library as well.

    Obviously, this is probably a database restraint that the programmer had to deal with, but he chose to pass the buck down to the end user. There is no reason he couldn't have done a cstr() and just replaced any illegal characters.



  • @R.Flowers said:

    @wk633 said:
    Early in 2000 I tried to do an office lookup by zip code on a Sunday night.  The SSA web site at the time reported that this feature was only available during working hours.

    And check out this problem waiting for a CSS solution:
    http://www.ssa.gov/textsize.htm


    You know what that implies, don't you? When you submit your zip code, somebody sitting at a desk is alerted. Quickly, they look up the zip code in their directory, and type in the appropriate office address(es).

    And they have to do it all before your browser times out.[;)]


    I can just imagine the original specs behind the system:

    "Clicking the submit button causes a pin to pop the balloon, which wakes the cat.  The running cat turns the belt lifting the bucket of water.  The splashing water wakes the infinite number of monkeys, which eventually find the right office."

Log in to reply
 

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