Entry 07
When the spreadsheet and the app were both wrong
August was the month the app took over from the old system for real. Every comparison found mistakes on both sides, and the dangerous ones looked perfectly normal. How to run old and new side by side without fooling yourself.
Our new payroll would have paid no night-out money on 135 of 136 trips.
Nothing crashed. No error appeared. A field that should have started empty started at zero, and zero is a perfectly valid number, so the app added it up without complaint. We only caught it because we ran payroll in the old spreadsheet at the same time and compared.
The spreadsheet, it turned out, was wrong as well.
The month of side-by-side
By August the office used the app every day, but the old dispatch system and the Excel workbooks still ran beside it. Before switching them off I had to show the app gave the right answers. Every comparison that month found errors, and never all on one side.
On 18 August I pulled eighteen days of loads from both the old system and the app. Claude matched 116 of 125 rows and built me a spreadsheet of every rate that differed, with an empty column headed “Corrected rate”. I filled it in, and Claude pushed my corrections back into the bookings and invoices. The gap between the two systems came down to about 0.3%.
The bugs that comparison surfaced were the real prize:
- When two rates fitted a load equally well, the app picked whichever name came first in the alphabet.
- A bakkie (a light pickup) booked without a destination got invoiced at the long-haul rate for a 27-ton truck.
- Invoice pricing never checked the vehicle type at all.
From 19 August every load was booked in the app first, and the paper diary started using the app’s load numbers instead of its own.
Payroll week
At the end of August payroll moved into the app, with the old Excel kilometre sheet running alongside. Three problems, two systems:
- The app: the zero-instead-of-empty field that would have wiped night-out pay on 135 of 136 trips.
- The spreadsheet: dozens of formulas pointing at cells that no longer held anything. They had been hiding the assistants’ night-out money for who knows how long.
- Both: the night-out rate followed the truck instead of the trip, so a local run on a truck that normally crosses the border got paid as a cross-border run.
We settled it by writing the rules down in plain words before changing a single number: who earns per kilometre and who earns per day, which trip belongs to which pay month, which source wins when two disagree. Once the rules existed on paper, the code had something to be right about.
The date nobody read
On 28 August I loaded the next month’s rate increase into the app with an effective date in September. The next morning I noticed that bookings made before then were already priced at the new rates. Rates had an effective date in the app, and nothing in the app had ever read it.
Nothing had reached a client. We reversed it, corrected the affected bookings and draft invoices, and the next day rate lookups started respecting the date.
The same week I found a renegotiated rate that was right in the app and missing from the rate workbook. The workbook fed the client letters, so a stale rate would have gone out in writing. I told Claude: “I don’t need the workbook anymore, we can just work in app.” The rate workbook retired that day.
The trip sheet that would not print
One more from August, because the lesson saved us more than once afterwards. On 17 August a trip sheet printed in the wrong orientation. Claude tried three fixes, each one inside the shared code that draws every PDF the app makes. Each attempt moved something else: diesel orders shifted, the driver pack changed, and the trip sheet still printed wrong. I wrote back: “just use the driver pack tripsheet format… isolate just the tripsheet page”.
Claude undid all three changes and went looking for what was really happening. The browser’s popup blocker had been stopping the normal print window, so the app fell back to a print path that only knew portrait. A different way of opening the print window fixed it without touching the shared code. Standing rule since: never change shared code to suit one document, and find out which code actually ran before fixing anything.
Build it yourself: run old and new side by side
Pick a short window and export both. Two or three weeks of real data from the old system and the new one, into one spreadsheet.
Match on a key that both share. Load number, invoice number, date plus truck. Ask the AI to list three groups: matched and equal, matched but different, and found on one side only.
Give yourself a correction column. For every difference, you (or whoever knows) fills in the right answer. The AI applies the corrections and, more importantly, looks for the bug that caused each one.
Write the rules before you fix the numbers. If two systems disagree about pay or price, the disagreement is usually a rule nobody wrote down. Write it in three sentences, agree it, then fix the data to match the rule.
Make zero suspicious. Zero night-outs, zero rate, zero litres: ask for a report of every zero that went into a payment or an invoice this month. A zero you expected is fine; a zero you did not expect is a bug.
Fear plausible numbers more than broken ones. A load that invoices at zero gets noticed straight away. A wrong number that looks reasonable goes out on the invoice. Spot-check a handful of normal-looking results against the source every week during the changeover.
Give prices an effective date, and test it. Every rate should carry the date it starts (and the date it ends). Then test the obvious case: book a load dated before the change and check it gets the old price.
What August taught me
Run old and new side by side and expect both to be wrong. Fear the numbers that look normal more than the ones that look broken. And when two systems disagree, settle the rule in words first.
Next: bugs that never complain. A collection of things that said “OK” and did nothing.
Written from my build notes. I keep a running memory of every session with the AI, and each entry is drafted from those notes with Claude's help, then checked and edited by me.
Get the next entry by email
One short email when an entry goes live, Tuesday and Friday. Nothing else, and one click to stop.
Your address is used for these emails only. It is not shared or sold.