At about one in the morning I worked out that a chunk of a vet clinic's records hadn't made it across. They were going live on the new system at nine.

I was a junior at a veterinary software company called RX Works. Data conversion was my job: take a clinic's old system and carry everything in it over to ours. I'd run this one and gone home. Then, somewhere after midnight, the numbers stopped adding up.

I told my girlfriend, "I've got to go, I messed up this migration," and drove from the south side of Brisbane to the north side. To the boss's house.

Greg Robinson had built the product at his kitchen table. He laughed a lot, and I was a bit intimidated by him, mostly because I thought he was the coolest person I'd met in tech. He was also, luckily for me, always online. He sat me down with my laptop and talked me through it.

What I'd done

The mistake was small and boring. I'd joined tables together in a way that quietly drops any record without a match on the other side. A staff member missing over here, so a row gone over there. Nothing crashed. Nothing warned me. The old data had a few strange things in it too, and my code stepped straight over them without a word.

Have a go. Drive the load across, then count both ends.

What it actually taught me

I could tell you the lesson is "watch your joins". It isn't.

The join was one hole. The real problem was that nothing was checking the whole thing: what went in against what came out. A migration isn't a pile of scripts. It's somebody's entire business being carried across a road, and you count everything on both sides.

Greg helped me rerun it, and we got everything in. The clinic went live.

It was his software and his customer, so he had every reason to want that go-live to work. He could have torn strips off me. He didn't. He sat down next to a junior at one in the morning and helped.

Every migration I've designed since has had its checks built in from the start, so the system tells me at one in the afternoon instead of one in the morning.

If you move data for a living

Don't ask "did it run?" Ask "is it all there?" Then make the system answer, so you don't have to drive across town to find out.

Greg, if you ever read this: thank you. And sorry about the hour.