Program fail date : Jan 1, 2010



  • I maintain several legacy apps in Oracle Forms 6i. These were originally written in ~1990 (they may have been written in an earlier version and ported; unsure).These apps have gone through various changes throughout the years, by dozens of programmers, all trying to patch this thing for one more year. I equate trying to do any fix to them like trying to make a move in an hour-long game of jenga - just about anything you do will cause it to collapse under its own weight.

     While stumbling around, I found some interesting validation on some date fields. Whats interesting is that there is next to no validation anywhere else, so why on the date fields. Someone, somewhere, decided that they didn't want invalid dates entered into the system - good so far. What they decided to do was to check if any date entered was greater than Jan 1, 2010. There is no business rule to support this decision, either. It may have seemed a good idea then, but if we hadn't spotted it a few weeks ago, the entire application would come crashing down in the next few months. 

     A minor wtf is that they didn't use a function to check a date passed in, but checked each one, one by one... except for one instance - where they did use a function.. which checked a specific date and had nothing passed in. I think that was the week the programmer learned about functions and decided to try one out. And they didnt compare dates directly - they turned it into a string and compared it to '01012010'.

     This may be a minor wtf, but these programs are chock full of them. Anyway, hope you enjoy my pain.

     

     



  •  @chadsexington said:

    but if we hadn't spotted it a few weeks ago, the entire application would come crashing down in the next few months.

     what year are you living in?  that is a good 16 months away.



  • The software I work on, in areas such as accounts, forecasting, appointment scheduling... you are typically dealing with dates in the next 12 months... I suppose it's not a push to say in four months, it will be rejecting dates one year in the future as invalid.



  • ITYM four months and two days. TYVM. HTH. HAND.



  • @eclipsed4utoo said:

     @chadsexington said:

    but if we hadn't spotted it a few weeks ago, the entire application would come crashing down in the next few months.

     what year are you living in?  that is a good 16 months away.

     The application deals with drugs and
    the regulations and testing of same. Its not uncommon for a 'goal' to
    be a year, or longer, away. They often have several goals or milestones that are chosen from one situation - so the second or third milestone could easily hit the 14-16 month mark

     

     



  • @tgape said:

    ITYM four months and two days. TYVM. HTH. HAND.

    just in case I'm the only that is lost there:

     

     

    lordofthepigs@lotp-fsa:~$ wtf is ITYM
    ITYM: I think you mean
    lordofthepigs@lotp-fsa:~$ wtf is TYVM
    TYVM: thank you very much
    lordofthepigs@lotp-fsa:~$ wtf is HTH
    HTH: hope this helps
    lordofthepigs@lotp-fsa:~$ wtf is HAND
    HAND: have a nice day


  • HTH means Happy To Help where I'm from.



  • The real and widespread problem: 2038

    Jan 19, 2038 at 03:14:07

     time_t comes to an end unless they force a 32-bit fix or force all OS's to run 64bit in the next decade or so.


Log in to reply