programmingby Oskar · 476 words · 344 views
R.M., Aug 2011
A comment above a block of arithmetic nobody understood, signed by someone nobody remembered. I keep a list of people I've never met who saved me. It's getting long.
The comment was dated 2011 and signed with initials nobody at the company recognised.
Anya found it at half past four on a Thursday, three days into a bug that had eaten the week. Orders from one particular supplier were being rounded wrong; not by much, by a cent here and there, but it had added up over a quarter to a number that finance had noticed, and finance noticing things was how weeks got eaten.
She'd been through the pricing module twice. She'd written tests. The tests passed. The bug persisted, in the way of bugs that are not where you're looking.
Then she followed a call she'd skipped over twenty times, a helper with a boring name in a file nobody had touched in years, and there it was, above a block of arithmetic that made no obvious sense:
// DO NOT "FIX" THIS. Supplier 0447 sends prices in tenths of a cent but their invoices round half-up, not half-even. If you use the normal rounding here you will be off by one cent on roughly 4% of lines and finance WILL notice. I have been through this twice. Ask them for the spec doc, it exists, they will say it doesn't. - R.M., Aug 2011
Anya read it twice. Then she opened git blame, and then git log, and then the company directory, and found nothing. R.M. had left before the directory existed. Whoever they were, they'd fought this exact fight fourteen years ago, won it, and written a note to the future in the only place they could be sure the future would look.
And somebody, eighteen months ago, in a big "modernisation" commit that touched two hundred files, had replaced the strange arithmetic with a call to the standard rounding function. The comment was still there. The code it protected was gone. The commit message said "cleanup."
She sat back. She felt, for a moment, the very specific loneliness of understanding something that only one other person had ever understood, and that person had probably retired.
She fixed it. She put the old arithmetic back. She kept the comment and added a line under it: "Confirmed still true, A.K., this year. Test added: test_supplier_0447_rounding. Please read the comment above before touching this." Then she wrote the test, which she should not have had to write, and which R.M. had presumably not written because in 2011 this codebase hadn't had tests.
Her lead reviewed it that evening. "Wild," he wrote in the PR. "Who's R.M.?"
"No idea."
"Should we find out?"
She thought about it. "I think they'd rather we just read the comment."
He approved it. Finance got their cent back, several thousand times over. Anya added R.M. to the list she kept, privately, in a text file, of people she'd never met who'd saved her. It was getting quite long.
How hot is it?
Not rated yet
#legacy-code#git-blame#bugs#fiction
Themes: bugs in code · mysterious developer · code comment · programming stories · software development · tech fiction · coder stories · legacy system · programmer life · tech stories
Comments
Loading comments…