• Hanzito (unregistered)

    If that's Ruby, is nil causing troubles in a language that doesn't even dereference nil pointers? Amazing.

  • (nodebb)

    So was it sabotage?

  • (nodebb)

    Sean reached out to his former co-worker to politely thank them for an early Christmas present.

    I hear a coded reference to "called the said cow-orker every kind of bad name imaginable." And in the most impolite way possible.

  • (nodebb)

    I've often had to patch Microsoft SRSS reports with these kinds of date bugs in them.

    Usually in January when a report lazily tries to calculate month numbers and ends up trying to build a date using month 0 instead of month 12 of last year.

    I'm always surprised at just how badly people can fail to understand dates by treating their components as numbers.

    And I'm somewhat in awe of how much standard date handling libraries do, and how well they do it.

  • no (unregistered)

    at least billing blew up on 1 december when more people were likely to be working, rather than on 1 january when many are either on leave or hungover, and which is also a public holiday in many places (:

  • (nodebb)

    Was this new code? If this code has been around for at least a year, this wouldn't be the first occurrence of the problem.

  • Ex-Java Dev (unregistered) in reply to Barry Margolin

    I imagine it's 'new' in the sense that 'it was done in March, then forgotten about until now'.

  • Hmmmm 🤨 (unregistered)

    Need more code to understand what's going on here. This seems like an attempt to indirectly patch a bad state caused by some other bad code somewhere that isn't understood. Also, I agree that if they used some kind of version control, one could easily see when it was introduced and maybe even read the logged comments. Of course, commented code would help tremendously too.

  • scragar (unregistered) in reply to philipstorry

    A lot of common datetime libraries treat month 0 or day 0 as the 12/last day of the previous year when parsing because this mistake is so common and it'd just easier to add an edge case for invalid values than get bad developers to understand their problem space.

  • (nodebb)

    As to any customer whose bill was cancelled by the bug at any time in history , the result would be they (probably) didn't send you any money that month and therefore would have an outstanding balance when next month rolls around.

    Decent bet the main bill generating code does something morally equivalent to

    foreach (Customer in Customers where Customer.PriorBalance <> 0 or Customer.CurrentTransactions.Count > 0)
    {
        // create a bill
    }
    

    With the result that any damaged bills are self-healed a month later.

  • 516052 (unregistered) in reply to WTFGuy

    Hopefully not.

    I don't know about you. But if I got no bill one month and than next month got a double bill with zero explanation I would be furious. This is the sort of situation that requires a letter or at least email with an apology and explanation and not just a silent doubling of the next bill.

Leave a comment on “Next Month”

Log In or post as a guest

Replying to comment #706170:

« Return to Article