back to article Software changed the world, then died on the first of the month

Welcome again to Monday, and therefore to a new edition of “Who, me?”, The Register’s confessional column in which readers own their errors. This week meet “Stan” who told us that he once did the world a great service – for a week or two. Stan’s story started in 1998 when he “worked for a certain company that had developed a …

  1. Dan 55 Silver badge

    Imagine a phone ringing on a human ear... forever.

    Those failures happened while Stan slept and he had no inkling of the issue as he arrived at work the next morning.

    You mean expecting a call at any time wasn't part of the job description? What madness is this?

    1. Olivier2553

      You mean expecting a call at any time wasn't part of the job description? What madness is this?

      They didn't call when the hours were a single digit :)

      1. John Brown (no body) Silver badge
        Pint

        Re: You mean expecting a call at any time wasn't part of the job description? What madness is this?

        "They didn't call when the hours were a single digit :)"

        An icon for you sir!

  2. Anonymous Coward
    Anonymous Coward

    An overseas customer wanted a mainframe Remote Job Entry application - job card packs in, printer for results. They had been waiting some time for it to be developed by the local company office - and now they wanted it immediately.

    Our local company's official system software developer was going on a month's holiday in the middle of doing the development. I had been hurriedly put on a plane to cover his O/S support activities in his absence.

    I saw a way to weld together a couple of existing software functions from O/S modules. Had it working and tested in a couple of days. The customer was happy with it in live running.

    On his return the official developer decided that my implementation must be replaced by his "proper" application. Finally he finished it and the customer went live with it.

    The first time it had to print a line longer than 80 characters it produced garbage beyond column 80. I took one look at the output and told him what was wrong with his implementation. He had not fully understood the technical spec of the RJE device - and had never coded or tested to handle longer lines.

  3. Sorry that handle is already taken. Silver badge
    WTF?

    Wait a minute...

    The first of the month was an edge case?

    1. Anonymous Coward
      Anonymous Coward

      Re: Wait a minute...

      "The first of the month was an edge case?"

      If "edge" is taken to mean "limit" - it is any point at which there is a significant change in the handling. That may be in the format of the data - or some underlying resource like chained buffers.

      In the early days of interactive terminals it was not unusual for a new developer to allow multiple "backspace" actions to delete more characters in memory than had actually been stored.

    2. DavCrav

      Re: Wait a minute...

      I was about to ask this. A third of the possible dates is a fairly thick edge.

      1. Giovani Tapini

        Re: Wait a minute...

        If it was a mainframe back in the insistence on the leading zero is not a surprise, as its probably a fixed length integer that wont accept an alphanumeric space.

        Calling this an "edge case" is a bit of a stretch, although this does seem the sort of function that would need testing over a month end even if only for MI reporting.

        I think the most fascinating aspect is that the senior managers are squabbling amongst themselves for hours without ever contacting the support engineer of the middleware. The back end support should also have been able to establish a data issue, even if they could not fix it either.

        It all therefore seems perfectly plausible, and open to re-creation at any time by a lot of different organisations...

        1. Mark 85

          Re: Wait a minute...

          I think the most fascinating aspect is that the senior managers are squabbling amongst themselves for hours without ever contacting the support engineer of the middleware

          But.. but... that's what managers do. Squabble and run amok waving their arms. I always thought the Kermit the Frog bit of yelling and arm waving was taken from some management training book.

      2. Omgwtfbbqtime
        Coat

        "A third of the possible dates is a fairly thick edge."

        No need to be blunt about it.

        1. Anonymous Coward
          Anonymous Coward

          Re: "A third of the possible dates is a fairly thick edge."

          Maybe call it a "wedge" case.

      3. Anonymous Coward
        Anonymous Coward

        Re: Wait a minute...

        I have less of an edge on my rolling pin.

    3. Anonymous Coward
      Anonymous Coward

      Re: Wait a minute...

      String comparison of a numeric value?

  4. Gomez Adams

    No matter what the specs say this is the kind of detail that an experienced developer would have checked back on.

    1. Rich 11

      Have to agree. Has anyone ever blindly followed a spec and not pointed out problems (diplomatically presenting them as a 'possible oversight', of course)?

      1. DJV Silver badge

        @Rich 11

        Yep, it all depends on the quality of the "spec" and the ability of a developer to understand the problem from the customer's point of view.

        20 years ago I worked in a company that had a developer who was asked by someone else in the company to produce a specific piece of software - the "spec" was verbal only. All this happened while I was on holiday. When I came back she told me that what the developer, who hadn't questioned anything in the verbal "spec", had produced for her was "exactly what I'd asked for" but "didn't do what I wanted".

        1. joewilliamsebs

          Re: @Rich 11

          "And the users replied with a laugh and a taunt,

          'It's just what we asked for, but not what we want!'"

          1. Sorry that handle is already taken. Silver badge

            Re: @Rich 11

            'It's just what we asked for, but not what we want!'

            Ahh, government clients...

            1. Anonymous Coward
              Anonymous Coward

              Re: @Rich 11

              'It's just what we asked for, but not what we want!'

              Ahh, government>ALL clients...

              Fixed it for you. :)

              Every client has difficulty describing what they want in a spec and ALWAYS requires help to cover the 'Wedge' cases in the real world vs the so called spec.

              P.S. 'Wedge' cases is now in my lexicon. :)

          2. Korev Silver badge
            Windows

            Re: @Rich 11

            "And the users replied with a laugh and a taunt,

            'It's just what we asked for, but not what we want!'"

            at $JOB-1 I heard a manager shout across the room "Do what I meant not what I said"!

            The state of me when I left -->

          3. Mark 85

            Re: @Rich 11

            'It's just what we asked for, but not what we want!'"

            And this is rule number one in how give a manager a nervous breakdown. The military taught me (in ingrained it) to give them exactly what they ask for. Nothing more, nothing less.

        2. Nick Kew
          Devil

          Re: @Rich 11

          Never mind software. Doing exactly what you say, not what you want, is the stuff of myth: just look at Τιθωνός. Expert practitioners include Satan, and lawyers through the ages.

        3. Martin an gof Silver badge

          Re: @Rich 11

          "exactly what I'd asked for" but "didn't do what I wanted".

          First came across this way back when I was taking O-level computer studies. The task was to produce (in BBC BASIC) some kind of maths drill-and-practice game. I spotted the problem immediately - the spec. said that on an incorrect answer some kind of response should be given, and should be displayed for ten seconds. On a correct answer, an appropriate response was given and then the user could progress to the next question by pressing (say) the space bar.

          So (because this wasn't an assessed task and the teacher was usually quite friendly) I deliberately coded a non-breakable pause for incorrect, but a breakable one for correct.

          And got moaned at (and marks docked) for being so pedantic.

          It's stuck with me though, and I do tend to "sanity check" any specification, as far as possible, and intend to point this sort of issue out before I commit too much effort :-)

          (developing software isn't my main game, it's not even my second or third, but I do do it occasionally)

          M.

          1. Dagg Silver badge
            Trollface

            Re: @Rich 11

            And got moaned at (and marks docked) for being so pedantic.

            Those who can do

            Those who can't teach

            And those with no idea write the specs

        4. Doctor Syntax Silver badge

          Re: @Rich 11

          When I came back she told me that what the developer, who hadn't questioned anything in the verbal "spec", had produced for her was "exactly what I'd asked for" but "didn't do what I wanted".

          That's IT's ultimate revenge on users.

        5. Rasslin ' in the mud
          Holmes

          Re: @Rich 11

          Bzzzzt!

          It is the spec writer who is responsible for understanding "the problem from the customer's point of view."

          The developer/coder/programmer is responsible only for creating software which implements the "spec."

          1. Terry 6 Silver badge

            Re: @Rich 11

            If I had a quid for every spec writer who'd consulted the users........ I wouldn't have a quid.

            1. Anonymous Coward
              Anonymous Coward

              Re: @Rich 11

              Terry 6,

              Totally unfair !!! :)

              Often you do consult the user(s) BUT they do not understand what you want and often tell you what the system is supposed to work like and not how it actually does.

              This is because the work arounds and fudges are done by the workers on the 'coalface' and the users you get access to are often middle ranking people who do not want to admit that they are 'fixing' things by fixes and fudges learnt over time and by experience.

              They would get the blame if the reality came to light and was known to the senior managers.

              i.e. the business only runs because the right people know how to 'poke' the systems every month end to get the correct results. !!!

              This is reality in many businesses.

              Never experienced the company that retires a member of staff and 'suddenly' the month-end does not run as smoothly as it used to do because they have lost the key member of staff that made it all run.

              1. Dagg Silver badge

                Re: AC Totally unfair !!! :)

                NOT unfair, the job of a BA is to actually understand and to determine exactly what is required.

                If all the BA does is just take what the user says and write it down as the spec then that is a big fail. Never let the user define the problem.

                Most important question a BA can ask is "Why?"

                Little things like "Why do you need a star shaped piece of glass?" when the user is standing there with a broken window.

              2. Terry 6 Silver badge

                Re: @Rich 11

                Consulting does not mean asking what they want the software to do, then making it happen - because users may have little or no idea what the software is meant to be doing. They may not even want the same outcomes as the organisation needs. Also, assuming they do know the purpose they may not be able to explain, without prompting and exploration, what they actually need. When they tell you,-say- "We need to be able to share the users' data between all our computers." you may see that as requiring a shared database. What they may actually mean is that they need to be able to pass a specific customer's specific query and background information to a member of the team who specialises in giving a specific part of the service.Still might need a database, but not that database.

                Still less is it about asking a manager what the team needs, because the manager will tell you that (in this instance) they need to be able to pass a message to another staff member with details about what the customer has requested, so you'll write a ticketing system. What the staff needs to be able to do is, as above. So a database that includes some aspect of a ticketing system, but needs some very specific information about request, staff specialism and customer details so not just a ticketing system

        6. Andrew Moore

          Re: @Rich 11

          "exactly what I'd asked for" but "didn't do what I wanted".

          And when you point out that you did exactly what they asked for they use Default Idiot Statement #1: "but you know what I mean". Which basically means that it is your fault as the developer because obviously you did not use your powers of telepathy in order to ascertain exactly what they wanted.

      2. Giovani Tapini

        That's exactly what outsourced coders do...

      3. Alan W. Rateliff, II
        Facepalm

        Blindly, no. But there do exist environments which suffer the "NMI" problem and the wave-off of a highly unlikely scenario which will be dealt with *if* it ever occurs.

        This is why we need Tom Smykowskis of the world. Engineers should not deal directly with the customer.

    2. DJV Silver badge

      Indeed, it's as silly as having software not work on a weekend just because the developer only worked Mondays to Fridays.

      1. Anonymous Coward
        Anonymous Coward

        "Indeed, it's as silly as having software not work on a weekend just because the developer only worked Mondays to Fridays."

        My current timecard system doesn't have Saturday or Sunday in it. Those days of the week just aren't there. Monday through Friday is it. Why? Because "We aren't supposed to have to work on weekends." So we are supposed to book the hours on Friday if we work on the weekend.

        For a single day you can't log more than 12 hours. Why? Because "We aren't supposed to work more than 12 hours in a day, at the most."

        So the 10 day stretch of 14+ hour days working on a CritSit with a customer took an extra 5 weeks to log all of the hours. And hence to bill the customer, as you can only bill hours that are logged. Even with the customer asking for the full bill for the write-up of the situation.

        And I still can't get anyone to agree it needs to be fixed.

    3. Anonymous Coward Silver badge
      Facepalm

      Checking like this...

      Dev: "what date format do you want? Leading zeroes or not?"

      Backend bod: "Either way is fine"

      Yes, it happens.

      1. Omgwtfbbqtime

        Backend bod: "Either way is fine"

        Ouch that is painful.

        The correct answer should always be ISO-8601 format.

        Even if you need to present it to a user in dd/mm/yyyy or in a completely wrong format (i.e. mm/dd/yyyy) it should be stored as ISO-8601 and translated in the UI.

        1. Anonymous Coward
          Anonymous Coward

          Re: Backend bod: "Either way is fine"

          > it should be stored as ISO-8601

          No, it should be stored using whatever the underlying datastores' date/time format is, assuming that format has the needed precision.

          If it doesn't have a native format, then storing it in text might be workable. ISO-8601 would then be the way to go.

          1. Anonymous Coward
            Anonymous Coward

            Re: Backend bod: "Either way is fine"

            "If it doesn't have a native format, then storing it in text might be workable. ISO-8601 would then be the way to go.

            Excel has a native internal format. It makes all sorts of assumptions when converting a cell text - so I find it is safer to store as yyyy-mm-dd_. The trailing _ stops it recognising it as a date.

            Browser Javascript can be confusing. It will often interpret a fixed date in data as having an implicit time of 00:00:00. It will then apply any time zone correction - which will make the date the previous day for a user west of Greenwich - or during Summertime at Greenwich.

            1. Killfalcon Silver badge

              Re: Backend bod: "Either way is fine"

              I learned the hard way that VBA and Excel treat the localisation settings differently. If you read 05/04/2003 from Excel into a VBA variable, then write it back to Excel, it flips the day/month parts in the day <=12.

              Excel-> VBA works correctly. It'll take Excel's internal five-digit number-of-days-since 1/1/1900 and turn it into a date (dd/mm/yyyy by default in UK locale), or a string that looks like one if you want, happily. Passing that back to excel gets treated as a user-typed string formatted as ##/##/#### and Guesswork happens.

              If you're absolutely certain you're working in English exclusively, you can force Excel and VBA to agree on a date format by using DD-MMM-YYYY. 01/02/03 is ambiguous as hell, 01/Feb/1903 is not.

              ...in English localisation, at least. If anyone knows an easy multi-language-safe fix for that, I'm all ears. Best I can do is try to back-calc the excel 5-digit date, remembering that according to Excel, 1900 was a leap-year [it wasn't].

            2. J.G.Harston Silver badge

              Re: Backend bod: "Either way is fine"

              Excel goes out of its way to try and interpret anything as a date.

              "11/12","High Street" becomes "11-Dec","High Street"

              And if that wasn't bad enough, it will try and translate strings into numbers

              "12E2" because "1200"

              "01709" becomes "1709"

              "123456789012345" becomes "12345678901E4"

              "-" becomes "-0" !!!!

        2. Nick Kew

          Re: Backend bod: "Either way is fine"

          it should be stored as ISO-8601 and translated in the UI

          Worst of at least two worlds. Store it as a regular timestamp, then use standard libraries (and locale settings) to present it. In the unlikely event that you have a system that still has a 32-bit time_t, either document it ("recompile before 2038") or grab a library with 64 bits.

          These days there's no excuse to mess up date&time: any mainstream environment will provide standard library functions to deal with them. Broken or other nonstandard timedate should only be seen in those legacy systems that didn't get cleaned up in the Y2K purges.

          1. Dan 55 Silver badge

            Re: Backend bod: "Either way is fine"

            But then you've got existing backend systems still talking to each other using protocols with timestamps specified to be four bytes. Getting all of those changed is like wading through treacle.

        3. cream wobbly

          Re: Backend bod: "Either way is fine"

          I always use YYYY-MM-DD format on documents, and yet, I recently had to explain to someone that "Since the other date on the cover sheet is March 20th, it should be pretty clear that the one you're confused about is June 2nd, not February 6th."

          I was going to say that ISO date format is idiot-proof, but the others on the call were already laughing at him.

          1. Anonymous Coward
            Anonymous Coward

            Re: Backend bod: "Either way is fine"

            > I always use YYYY-MM-DD format on documents,

            For situations like that, where people reading it might still get it wrong... use the alphabetic version of the month. eg 2018-JUN-06. Seems to work in all cases (for people).

      2. Olivier2553

        Re: Backend bod: "Either way is fine"

        But then, either should be accepted as a valid input, and either should be working and producing the same output.

        Or else, that is the backend that is bogus.

        1. Phil O'Sophical Silver badge
          Headmaster

          Re: Backend bod: "Either way is fine"

          But then, either should be accepted as a valid input, and either should be working and producing the same output.

          No, that's what you would do if they said both ways are fine. Saying either way is fine would leave the developer the freedom to choose one or the other.

          It's like those car park signs which say "use both exits". We know what they were trying to say, but what they actually asked for is likely to be difficult

          1. Olivier2553

            Re: Backend bod: "Either way is fine"

            "No, that's what you would do if they said both ways are fine. Saying either way is fine would leave the developer the freedom to choose one or the other."

            I am not native English speaker, so give me a break. You understand perfectly what I was meant to say, that saying either format is ok means that the program could output any of the date format, and the module that will accept that for processing would accept and work with format 1 and format 2 the same.

            1. Anonymous Coward
              Anonymous Coward

              Re: Backend bod: "Either way is fine"

              saying either format is ok means that the program could output any of the date format, and the module that will accept that for processing would accept and work with format 1 and format 2 the same.

              If I, as a developer, asked the designer which format should I use, then a response of "either" would mean "I don't mind, you choose one of them". If (s)he wants me to support both (s)he would have to say so.

  5. Anonymous Coward
    Anonymous Coward

    Not quite the end of the month....

    ....but you could see it from there!

    Worked for a company that produced software that would crash if you tried to add users from the 26th of the month.

    This new version of software was released with great fanfare about the (IIRC) middle of the month, so it was a couple of weeks before we were getting lots of calls about the problem. It wasn't helped that the sales weasels were giving out copies to their "favourite" customers - took us months to sort it all out.

    As a tech support bod on the phones, we rarely had to ask what version of software they were using - we could just tell from the problem. E.G. - v.1 had a certain bug, v.2 fixed it - but introduced a new one, v.3 fixed both of them!

    1. imanidiot Silver badge

      Re: Not quite the end of the month....

      Let me guess, V.3 introduced 2 new completely unrelated bugs.

      1. Anonymous Coward
        Anonymous Coward

        Re: Not quite the end of the month....

        Let me guess, V.3 introduced 2 new completely unrelated bugs.

        Sorry, quite a few years ago - but the chances are that you are right.

        It also taught me about dealing with developers and their motto when ever I tried to report a problem or make a suggestion - "It works alright on my machine!"

        I perhaps should point out, these were developers for an application for a niche industry and are highly unlikely to be reading this website and dealing with IT and the real world - I'm sure that any software bods will understand and not downvote me!

        1. Anonymous Coward
          Anonymous Coward

          Re: Not quite the end of the month....

          "It works alright on my machine!"

          I gave that reply to a user a while ago for a web page that had been running for several years. Then I thought about the possibilities for difference. Only by changing my Windows time zone - and reloading the browser - did their "wrong date" problem reproduce on my PC. It only affected users in time zones west of Greenwich.

          What it told me was that the putative users in those time zones had either never noticed the problem - or had not bothered to report it.

          1. Anonymous Coward
            Anonymous Coward

            Re: Not quite the end of the month....

            I was lumbered with business critical (isn't it always) Excel spreadsheet which had to import data including dates and draw graphs with dates on them for important people.

            After messing around with it for hours I got the dates to work fine on everybody's Windows 7 computer in different locales and timezones. Then someone got a Windows 10 computer, and I had to waste more time looking at it. Excel and VBA have slightly different ways of treating dates and the OS, location, and locale also affect things... but if the locale is US English and the location is the US everything's fine so it's obviously not a problem.

          2. J. Cook Silver badge
            Devil

            Re: Not quite the end of the month....

            I've given that to users (and clueless support droids who've escalated the issue to me) for troubleshooting why their web pages are loading, especially when the support droids haven't properly done the troubleshooting that the documentation clearly asks the to do before escalating the problem...

        2. Andrew Moore

          Re: Not quite the end of the month....

          "It works alright on my machine!"

          Had a situation a couple of years ago where a company based in Switzerland was producing a piece of software that only ran on Windows 8 (no, I don't know why either). Many people tried and failed to get the software working and eventually it landed in my lap. After many days back and forth with the Swiss developers, I finally got on a plane, flew over to their offices and showed them their software, not working on my machine. Within half-an-hour I'd got to the bottom of the issue- you can't switch off UAC on Windows 8, so the developer had some nasty registry kludge on his development PC which disabled it. The bug was UAC on regular PCs not allowing a deep system call to comms devices.

      2. phuzz Silver badge

        Re: Not quite the end of the month....

        If you're only introducing one bug per version, then you're doing pretty well.

        1. Stevie

          Re: Not quite the end of the month....

          I was once handed a shell script by a retiring co-worker with the airy "there's some sort of bug that happens only once in a blue moon and shuts down the process, but I've never been able to find it".

          The date was used to build filenames that would be found on the system and needed to be processed. On rare occasions the script couldn't find the files and they had to be managed manually, apparently.

          Sometimes the date on the files to be found was for "yesterday", but the script could deal with that I was told.

          So I took a look. Ahem:

          mytodaysdate=`date '%Y%m%d'`

          myYesterdaysdate=$mytodaysdate-1

          The quickest fix for this "bug" was to pen a quick perl script called yesterday.pl which did all the stuff you have to do to figure out yesterday's date from today's and replace the second line with :

          myYesterdaysdate=`yesterday.pl`

          My bosses (I have several) couldn't see why I had "made things complicated with perl". I explained that the alternative was lobbying the government to add January the notghingth, July zeroth and August the zipst to the calendar, and perl was faster.

          1. dfsmith

            Re: Not quite the end of the month....

            But why would you complicate the task with perl, when you can complicate it just as much with bash?

            today=`date +%Y-%m-%d`

            yesterday=$( date -d @$(( `date -d "$today 1200" +%s` - 60*60*24 )) +%Y-%m-%d )

            (The "1200" is to mitigate the leap second problems.)

            1. Stevie

              Re: Not quite the end of the month....

              But why would you complicate the task with perl, when you can complicate it just as much with bash?

              Because it wasn't a bash script. Our site standard is ksh with a smattering of grandfathered sh.

              I Googled for a solution that would work on our O/S/shell and found nowt. Since I'm reasonably fluent in perl this was a "three refinements of the search, then do actual useful work" use case.

          2. eldakka

            Re: Not quite the end of the month....

            myYesterdaysdate=`yesterday.pl`

            Depending on the version of the 'date' program, you could have just done:

            myYesterdaysdate=$(date -d "yesterday" +%Y%m%d)

            1. Stevie

              Re: Not quite the end of the month....

              "Depending on the version of the 'date' program,"

              Undid your own criticism with the salient point. I work with what tools I have.

          3. Criggie

            Re: Not quite the end of the month....

            date -d "yesterday 13:00" '+%Y-%m-%d'

            60 percent of the time, it works everytime. The other 40 percet of the time, it also works everytime. And its DST-safe too. Stick that in your recipe book.

  6. mt_head

    I work with one of the major players in the US electronic health record market; how they got as popular as they are is still something of a mystery to me. Each data entry screen (called a "template") corresponds to its own table in the database, and template development is a wild and woolly free-for-all - in fact, the program originally shipped with no templates at all, just a template editor. After a couple of years, the company acquired the templates that a few of their biggest customers had developed, and now provide them as the core of the product. Unfortunately, some of those templates were "developed" by people whose expertise... lay in other fields, let's say. In particular, there's a lot of re-inventing the wheel: home-brewed date pickers, static conversion factors saved as SQL columns (example: the vital signs table contains columns called "lb_to_kg", "in_to_cm", etc.) - it's a nightmare.

    I discovered a bug: if a doctor were a little behind on charting, and tried to enter data for the last couple of days of the previous month on the first or second of the new month, the template would blow up and refuse to save data. It turned out that the custom date picker fields - there are four separate dates on the template, and each is separated into day, month and year fields - each tried to validate whether today is a leap year. AND the calculation wasn't even right! As a result - in every month except March - for a few days at the beginning of the month, the end of the previous month ceased to exist.

    I fixed it in our system, and reported the bug to the vendor; it was fixed in a widespread release about six months later.

    1. Killfalcon Silver badge

      Good on you for passing the fix back up.

      My lot recently put in a document classification thingy - mark documents 'confidential', shiny Windows and Office integration, that kind of thing - and I elbowed my way into the test group as I was pretty sure it'd break something I'd be expected to fix later. It came with some sample VBA code for making macros play nicely with it.

      Rather sensibly, they'd made the code check if the required Addin was present before trying to use it's functions. This meant you could update macros safely without waiting fro the full rollout.

      Also sensibly, they'd pushed the addin to everyone's desktops in an inactive state to simplify the roll-out.

      The code that checked if the addin was there didn't check if it was enabled, so on all those sensibly pre-deployed machines, updated code crashed.

      As mt_head did, I rewrote their VBA sample code to cope with this, sent it back to the grateful project team (who generally don't expect "I found a bug" emails to include a reproduction, let alone a fix). Always nice when the testing process works!

    2. imanidiot Silver badge
      Joke

      mt-head:

      "how they got as popular as they are is still something of a mystery to me."

      Prodigious use of kickbacks...probably

  7. the hatter

    Please tell me that after going live around 20/10/19NN, and failing on (0)1/11/19NN that Stan got out of there before 01/(0)1/19NN+1 and someone had to debug that without the heads-up.

  8. Anonymous Coward
    Anonymous Coward

    If Stan were half the developer he claimed to be, his unit tests and manual testing before handing the code off would have caught those "edge" cases.

    1. Anonymous Coward
      Anonymous Coward

      If Stan were half the developer he claimed to be, ...

      ... there would have been a different story in this week's "On Call" column?

    2. Killfalcon Silver badge

      In fairness, sometimes when developing code modules is that you won't have access to the modules your module feeds in. If your manual tests result in a date being output where a date is expected, you won't necessarily know that the date format won't be correctly handled somewhere else.

      It's even worse if you don't have access to modules that feed yours, and it turns out that your expected input format isn't what you were told...

      1. tiggity Silver badge

        Lots of third party stuff does not even accept a date

        e.g. credit card APIs, just want year and month (most of these are 2 digit only and 0 prefixed if appropriate)

        .. Don't get me started on gotcha APIs that have month in format where January = 0, Feb = 1, etc. ... without it being clearly documented!!!

  9. Doctor Syntax Silver badge

    Wasn't there a version of Sun's OS in the late '80s that fell over the first time it got to a leap year?

    About the same time I'd inherited an application written by one of the company's directors. He was a COBOL programmer by trade who'd adapted to C by way of a number of macros that tried to introduce some COBOL idioms but that's by the way here.

    One of the functions was only intended to run on a specific day of the week - Monday or Friday, I can't remember which. This fell over at the start of the new year. There was a page and a half of code which I couldn't understand to work out the day of week to check it was running on the right day. There was probably a relationship between my not understanding it and it not working.

    The database in use was Informix which has a function for returning today's date in its internal date format: integer with 1 corresponding to the first of January, 1900. So run cal 1900 to determine what day of the week that was (Monday), calculate today's date mod 7and check for whatever result would be correct in the context of the program's requirement and job done. I never did work out what the page and a half of code actually did; I just deleted it.

  10. Anonymous Coward
    Anonymous Coward

    Data format parsing

    This reminds me of how terrible and over-fussy the state of input parsing is, still: I don't really understand why. As an example I sometimes buy things using this new-fangled internet thingy, which requires me to enter my credit card number on occasion. These appear, on the card, as four groups of four digits. And it's a lot easier to type them in like that, because it's a bunch easier for a human to check that four groups of four digits are right (do they all contain four digits, for instance) than a single group of 16. But a significant number of forms won't take the number like that: they want one big string. It just is not that hard to write something which takes various standard formats and canonicalises them.

    The most frightening thing is worrying about all the other things that these interfaces must be not doing that they should be doing: what are the chances that something which isn't up to handling card numbers in the format they're written on the card is checking return codes carefully?

    1. Killfalcon Silver badge

      Re: Data format parsing

      Usually when they won't accept spaces, it's because they've fixed the textbox at 16 characters wide... to prevent people putting in numbers of the wrong length.

      1. Doctor Syntax Silver badge

        Re: Data format parsing

        "Usually when they won't accept spaces, it's because they've fixed the textbox at 16 characters wide... to prevent people putting in numbers of the wrong length."

        The length check should, of course, take place on the canonicalized version.

    2. Anonymous Coward
      Anonymous Coward

      Re: Data format parsing

      "These appear, on the card, as four groups of four digits. And it's a lot easier to type them in like that, [...]"

      I remember one form that said "Enter the number exactly as it is written on your card". Great - someone had finally realised the sensible way to do it.

      Unfortunately their input validation process then turned out to want only numbers without the spaces.

    3. Phil O'Sophical Silver badge

      Re: Data format parsing

      These appear, on the card, as four groups of four digits.

      Not if it's an AmEx card.

      It's like US-based websites that ask for a phone number and then try to force it into the 1 (123) 456-7890 format, or require a State for all addresses. Best not to make assumptions about formats.

      1. Korev Silver badge

        Re: Data format parsing

        Starting with a 1 is better than most places seem to manage in the USA, I normally see (123) 456-7890.

      2. Doctor Syntax Silver badge

        Re: Data format parsing

        "Best not to make assumptions about formats."

        Or about anything else unless it can be avoided. Assume that every address includes a street number? No they don't. Assume "City" is a meaningful field name (including in historic addresses)? No it isn't. etc. etc.

      3. Barry Rueger

        Re: Data format parsing

        or require a State for all addresses.

        "What's yer zip code Honey?"

    4. Bill Gray

      Re: Data format parsing

      I write software for astronomers. The range of formats we have to deal with is astonishing, including negative years, times given in decimal days or hours or minutes or in Julian Day or Modified Julian Day or years/days since beginning of the year. I eventually decided that rather than train the users, I needed a library function that could parse just about anything humans threw at it :

      https://projectpluto.com/update8d.htm#time_entry

      I have the advantage here that astronomers (usually) stick to year/month/day order. I have the disadvantage that astronomers may be interested in what the sky looked like in, say, 9 AD, so a date such as 9/7/5 could be the fifth of July in 9 AD, or the seventh of September in 5 AD... which is why I urge people to use three-letter month abbreviations and four-digit years : 0009 Sep 5. Put that in any order, and it'll make sense.

      I am in the position of both writing the software and having to document it and support users. So an extra few hours of effort adapting code to users pays off in less time spent explaining what I did. In my first job, I only wrote code and it was some other schmuck's job to support it; I must confess that this made me much more casual about usability. Dealing with angry customers wasn't my department.

      1. Charles 9

        Re: Data format parsing

        Until you come across someone who doesn't understand the name of September or anything remotely close. Murphy strikes again...

      2. kain preacher

        Re: Data format parsing

        There is a youtube video on what a nightmare things like time zone and date formats are.

    5. Stevie

      Re: Data format parsing

      Hah! Try using some of the smaller UK business web sites to order stuff for the USA or Canada.

      Phone numbers that are mandatory but only acceptable in UK format, Addresses that must include a post code that has had one of those new-fangled "regular expressions" built to make sure that it only works in the UK or, if you are lucky, Canada.

      And address text boxes that insist that a county be part of the address that will go on the label when whatever it is is posted.

      1. Charles 9

        Re: Data format parsing

        "And address text boxes that insist that a county be part of the address that will go on the label when whatever it is is posted."

        Which could be tough for a state like Virginia. See, since 1871, under the Constitution of Virginia, there is an explicit urban/rural divide. You're EITHER in a city OR a county: never both. So it's hard to put a county if you live in the City of Richmond, as Richmond officially does not belong to any county (and good luck picking a nearby county: there are 13 of them in the Richmond Metropolitan Area...AND three lesser cities).

      2. TomPhan

        Re: Data format parsing

        Even the first part of my address breaks some forms, which don't expect a house number to have 5 digits.

      3. Terry 6 Silver badge

        Re: Data format parsing

        There must surely be a special place in Hell for designers who place mandatory fields or with mandatory formats where they are not needed, or appropriate, but can't be circumvented (If only by typing 000000000).

        I recently did a survey (kind of me) for a local organisation. I spent several minutes filling in my views etc. Got to the last page and near the end was a question with no visible place to enter an answer. It wasn't a terribly significant question. There were dozens of more important ones that preceded it. But because I couldn't complete that one the whole thing refused to move on. So they never got their info. In the past I've fallen foul of postcode fields that wouldn't accept single letter district codes (N2 M8) or insisted, as noted, on a county - which doesn't work very well in London. I'm sure many readers have will have had a letter addressed to Mr. Suchhand Such, something St. London, London because the person supplying the address has had to put London for both City and county (as if county was that useful when you have a postcode and town) . And I'm sure some people have just given up and said "sod it"

        1. G.Y.

          not always 0000... Re: Data format parsing

          I once had to add someone to a US health insurance program, who did not (yet) have a social security number. 0000.. was no go. Playing with the last digit was no go. I then noticed a tax form that had a grey 222222... where the SSN has to go. I typed that in -- bingo!

        2. Martin an gof Silver badge

          Re: Data format parsing

          I'm sure many readers have will have had a letter addressed to Mr. Suchhand Such, something St. London, London because the person supplying the address has had to put London for both City and county

          Many years ago I filled in a form and put the town as "Caerphilly" and the county as "Caerffili" (obviously, one being the English, one being the Welsh spelling). In this case, it is valid to put both down since the town of Caerphilly lies within the County Borough Council of Caerphilly, and either spelling is valid for either name.

          Presumably at some point this was subsumed into one of those postcode databases because to this day I find that some sites auto fill "Caerphilly / Caerffili" when I've entered the postcode.

          I'm assuming here, of course, that I'm the only one daft enough to do such a thing :-)

          Others auto fill "Caerphilly / Mid Glamorgan" which is annoying, as Mid Glam ceased to exist back in 1997 IIRC.

          M.

    6. cream wobbly

      Re: Data format parsing

      Yeah, this is a bugbear of mine, too: credit card numbers, dates, and phone numbers without any delimiters. Just let me enter them, and run my input through your implementation's version of "tr -dc [:digit:]".

    7. J.G.Harston Silver badge

      Re: Data format parsing

      Ditto phone numbers. 01177722220000 is impossible for a human to parse, 0117 922 2000 is. I encountered this exactly yesterday in hospital when trying to confirm my emergency contact number with a triple-one in the middle printed on my forms with no formatting was correct.

    8. G.Y.

      credit-card Re: Data format parsing

      Accepting that credit-card number (4 groups of 4 digits) was something Fortran _1_ could do, back in neolithic times.

    9. Charles 9

      Re: Data format parsing

      "It just is not that hard to write something which takes various standard formats and canonicalises them."

      But then it provides more room for "Who, me?" user errors. Limiting the field to exactly 16 characters tends to limit the scope of user error, especially the types the user will vehemently deny. It's rather a "pick your poison" situation since you can get hit either way.

      1. Anonymous Coward
        Anonymous Coward

        Re: Data format parsing

        Another brain-dead website: TV licensing. is the property your: Home Address, Business Address, or Student Address? No. None of those. It's an empty flat, currently with builders in putting in a new kitchen. Where's the option for "none" so I can get to page two and tell you *what* address is empty and has no TV in it?

        Sigh. Do I wait for business hours to telephone them, or just keep binning the damn letters?

  11. Richard 31
    Paris Hilton

    Does this imply that they manged to get a spec, build, test, go through UAT etc all from 10-31st of one month?

    Almost willing to call bullshit on that basis alone.

  12. Wanting more

    Ah yes...

    23 years ago when I was first starting out as a programmer I wrote an extract to populate the mainframe from the new shiny system that we were developing. I came in one morning to find that that weekend's mainframe processing had all errored and it was all because of my extract had fed bad data to the system (it was the products database that everything else depended on).

    Fortunately after 20 minutes of investigation it turned out that I had followed the specification precisely and it wasn't my fault at all. The designer who had wrote the spec and was of supposed to have done the testing got the blame instead. I had no knowledge of the old mainframe systems and there was no way I could of spotted the potential problem.

    1. imanidiot Silver badge
      Headmaster

      Re: Ah yes...

      Could HAVE...

      (or could've if you insist on contracting)

      1. Steve Aubrey
        Joke

        Re: Ah yes...

        No contracting - he was a direct hire.

  13. iLurker

    Kiddie error

    Sadly most coders have never heard of Julian day numbers, and the simple formulae to translate between them and string format ie DD/MM/YYYY (or whatever your localisation is).

    Leading zeros and such should never have been an issue.

  14. Colin Bull 1
    Angel

    Topical

    Coincidently I have just had 2 lots of insurance documentation from Sainsburys Bank date 2 minutes apart with expiry date quoted in different places as Midnight, 11.59 and 23.59.

    Consistent ? - consistently crap.

    1. Norman Nescio Silver badge

      Re: Topical

      It's worth knowing the difference between midnight, 12 a.m, 12 p.m., 00:00, and 24:00, especially when trying to work out when an insurance policy begins, or ends, coverage.

      NPL:Is midnight 12 a.m. or 12 p.m.? (FAQ - Time)

  15. Anonymous South African Coward Bronze badge

    Little Bobby Tables.

  16. Aladdin Sane

    Worked fine in dev

    Ops problem now

  17. derfer
    Joke

    That's why I always write the brief myself as well - tell the users what they need and give them that!

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like