Developer’s code worked, but not in the right century
The user you really don’t want to mess with is a vigilant loyalty points herder
Who, me? Why hello there Monday! And hello, therefore, to a new instalment of “Who, me?”, The Register’s column in which readers confess to their c*ckups.
This week meet “Lars” who told us he once worked for “a large outsourcing company” that assigned him to do some work on a major supermarket chain’s loyalty card program.
One of the tasks Lars was asked to perform was “to write a job to extract 1000 random customers and top up their points balance by 1000 points.”
“This was on an IBM mainframe and involved writing a script to extract all customers to a file, remove staff, contractors, their relatives etc, extract the random 1000 and create a database load file consisting of account ID, number of points and the date to be applied.”
Nothing terrifying there, but when Lars ran the job and checked to see if the points had been credited to the lucky winners, nothing had happened.
Tech rookie put decimal point in wrong place, cost insurer zillionsREAD MORE
“So obviously I just ran the job again, as you do. I think I did it a few times before I gave up and asked a colleague for advice.”
The colleague quickly spotted the bug: the supermarket chain used its own date format. Lars didn’t know that, assumed the job had therefore failed, so figured no harm had been done.
“A few days later we started to get complaints from customers about their bonus points not showing on their statement,” Lars told us. “I looked in the load file and couldn’t see these customers there.”
That was bad because said customers’ records showed they qualified for the extra points.
“So we had a look in the database and found these customers with the extra points but only due to be added about 230 years in the future.”
The culprit? Remember that unique date format?
Lars date was in the wrong format for the present, but correctly described a time in the far future. “Unfortunately the systems did no validation on dates and just totalled up all points.”
Lars’ mistake wasn’t costly: he told us that “the bonus points were honoured for those customers who spotted them and quietly removed from those who hadn’t.”
What did you break by getting little details like dates wrong? Click here to share your story and we might just give it a run – with names changed to protect the guilty – in a future edition of Who, me? ®