Hacker News new | ask | show | jobs
by firefoxd 959 days ago
I giggled at the end. Just yesterday, we solved an issue that plagued the company for 3 years. For us it was the letter 'A'.

Someone had been doing manual fixes inserting and removing data for the past 3 years. It became part of his job. He added a recurring event in his calendar just to do that regular clean up. Millions of customers depended on this one individual making sure they had the correct data plan on their phone line.

You can imagine the chaos when he forgets or goes on PTO.

Turns out: if $line->status == STATUS_ACTIVE

one was 'Active' the other was 'active'. No dogs were harmed, but incalculable money was lost over the years.

3 comments

If this was a law case, the joke would have been:

'What have you done? You solved the case that put our entire family through law school!'

That poor soul is no longer indispensable. I am only half joking. Software is about making things more efficient, but I like to look at the human motivations.

A tricky one that I’ve seen cause harm is white space or otherwise invisible characters (eg line breaks).

Super frustratingly, Macs populating HL7 fields caused intense pain. It turns out that the character ’ when typed on a Mac keyboard is not compatible with all versions of HL7, or perhaps wasn’t compatible with what the HL7 was passed off to. It’s a distant memory now but it was words like o’clock versus o′clock, or something like that which broke radiology report distribution.

It went on for years before being caught.

Edit: HN is displaying the ’ differently to how it looks when I type it, but it’s still the same character. The fact that we couldn’t see the difference when debugging was half the problem, so this is quite funny.

Encoding is hard. Recently had a problem where some proxy/load balancer (I think) in Go would crash, as it couldn't handle æøå in some headers which was returned from some service doing ip lookups before passing on the request. Which of course hit our workers in the city of Tønsberg.

Another example I remember from earlier days is the BOM in xml files. When it was wrong things could crash in all kind of weird ways, and impossible to see.

So somehow in some parts of the code STATUS_ACTIVE is defined wrong?

I guess there is always a risk that some "helpful" contributor will fix the typo in your definition of HttpHeader::REFERRER as "referer" to make it "referrer" instead, thus completely breaking all the software because nope, that typo is enshrined in the HTTP standard, it's Phillip Hallam-Baker's fault while he was at CERN.

> So somehow in some parts of the code STATUS_ACTIVE is defined wrong?

I would guess that some other part of the app doesn't even use the constant at all, and just hardcodes "Active" as a string on its own. Maybe taking the value of a dropdown from the UI and never mapping that back to the actual constant.