The Adjustment Line Finance Added Every Month

by Serguey Shinder

She was showing me something else entirely when I saw it. A spreadsheet of monthly sales figures, our report pasted into the left-hand columns, and then a row near the bottom labelled system variance with a number typed into it by hand. I asked what that was. She said, in the tone of someone describing the weather, that the report always came out a bit short and she put the difference in.

She had been doing that every month for a year.

The number was not random. It was the last day of the month. Our query asked for transactions where the date was greater than or equal to the first and less than or equal to the last, and the dates in that table carried a time. The final day therefore ended at midnight, which is to say it had barely begun. Everything sold on the thirty-first was outside the range, apart from anything that happened in the first instant of it, which was nothing.

Three per cent of a month, roughly. Enough that she noticed when she checked our figure against the payment provider's total. Not enough to look like a fault. On a quiet month it looked like rounding, and on a busy month it looked like a bad day.

I want to be precise about why this survived a year, because it was not incompetence on anybody's part. The query never failed. It never produced an error, an empty result or an absurd number. It produced a plausible figure, which is the most durable kind of wrong output there is. And the one person in the building who could see it had a fix that took ninety seconds, whereas telling us would have meant a conversation, a ticket, and a wait of unknown length for a number she already knew how to work out herself.

The code fix is the smallest part of this. Every range in that system is half open now. Greater than or equal to the start, strictly less than the start of the next period. It reads slightly worse and it removes an entire class of question about whether the end is included and what happens on the day the clocks change.

The habit I took from it is the part I would keep. Once a quarter I ask the people who receive our output to show me the file they actually use, not the one we send. The manual columns beside a system's numbers are a map of everywhere that system is quietly wrong, drawn by the only people in a position to see it, and nobody will ever bring you that map unprompted.

A workaround is a defect report that was never filed. It is also proof that somebody decided telling us was more expensive than coping, which is worth knowing on its own.

– Serguey Asael Shinder

Leave a Reply