This is the story of a major system refactor completed in just one day. 54 files affected. Over 1000 lines of code changed. All tests passed first time. Pushed to live with zero defects. How did I do it? Let me explain my set-up.
I don’t code for a living anymore; I’m in a different phase of my career, but I keep my eye in with side projects. It helps with my day job.I learned to code back in the good/bad old days before the internet and stack exchange. Experimentation was my only option, and my computer was a self-built Compukit UK101 with 8k of RAM and BASIC.
I used to start banging out a new game in the morning and play it with friends the same day. I was quick back then. Now I’m rusty so things take longer, so how did I achieve the refactoring?
Groundwork.
This side project isn’t a hobby; it’s a real system designed to support a large user base. I work as a Strategic Advisor, so coding is limited to evenings or days off. When I work on the project, I pick something that I can complete in one sitting. Small features; minor tweaks; that kind of thing. This was significantly larger so I was taking a risk.
The change was to remove an entire concept from the data model to simplify the user experience. It wove its way through the code so it couldn’t be picked at one small bit at a time.
Luckily, the system is built with extensive automated tests that are performed prior to deployment. It’s also built to be maintainable. It’s “clean code” – a term often sneered at or misrepresented.
This is the groundwork that made the challenge achievable.
So, what AI agents did I marshall to get the job done? How many tokens did I burn?Not one. None.
What I did was successfully coordinate my fingers to make the necessary code changes. I also relied on my IDE to help me find dependencies so I could tie up the loose ends.
Within a few hours I had the code refactored. I pushed the go button on the test suite and went to get a coffee. Testing takes between 5 and 10 minutes on my laptop (it’s a bit of a beast) so it was done by the time I returned.All tests completed successfully. Better than I’d hoped for – maybe I’ve still got it? Next step, hit the commit button.
Everything I’d run locally now took place in the deployment environment. This is the “well it worked on my machine” moment. Green tick after green tick appeared until the last and most important one popped up.
Deployed to production.A quick live test showed all was well. But this isn’t a fluke. There hasn’t been a live bug or deployment issue on this system for a year.
So, what’s the lesson here? For me it’s that if you do things right from the start, things get easier with time. If you plough on regardless, in the name of speed, you build up snow drifts that’ll quickly kill your velocity stone dead.
You can do either of those things with or without AI. The tool isn’t the problem, nor is it the solution. If you’re doing it right you’ll do it right (and a bit quicker) with an LLM.
The opposite is also true.
