Courage
It only took 25 years to figure it out!
When I first learned about Extreme Programming (XP) in 2000, the values of Communication, Feedback and Simplicity were easy to grasp and easy to explain to others. The fourth value of Courage, though, wasn’t as clear. Explaining it was pretty much, “Uh, yeah, don’t stray for the other values!”
In my recent article, My LLM Workflow, I mentioned how my approach to using AI while building software had evolved over 18 months to become what looks very much like pair programming with a virtual partner who types much faster than me. In essence, the way I work is heavily informed by my experience with XP, which really shouldn’t be a surprise.
When I took a step back and looked at the group I’m working with at CueScript, I noticed something that I hadn’t really seen before. As I stated in the article, the code was a jungle of legacy code that had exactly zero automated tests when I started. Changing anything was a recipe for unintended consequences due to the tight coupling and low cohesion that existed.
To avoid this, I started by using the LLM, Claude Code, to help handle all the dependencies and create the test doubles (mocks, fakes, spies and stubs) I needed in order to isolate code so that it could be more easily tested. This proved surprisingly effective, and I soon had the LLM generating the tests themselves using my guidelines of testing behaviour vs. implementation details.
The other developers quickly started doing the same and within a few months we celebrated having 1000 test cases in place. We knew even then that 1000 was woefully inadequate for a 125K SLOC application, but it was still a good start. We continued to add tests as we added and changed functionality, including a few dozen end-to-end tests.
Just after the 6 month point, I noticed something that hadn’t existed before with the team - momentum. It was right after the lead developer had replaced an entire legacy module with a new, rewritten version, complete with extensive tests. I asked in standup if he could have pulled that off at all, let alone in about a week, before we started adding tests with the assistance of AI. His answer was, “Absolutely not!”
Since that time we’ve released three beta versions to customers and are now pushing to complete the GA release. We have, as of this writing, over 7,300 unit tests and 46 end-to-end tests. We are able to work predictably and are willing to take on any of the legacy code that still exists, something that couldn’t be said a year ago.
As a team, we have, as Kent Beck wrote in Extreme Programming Explained, courage.
Being able to automate testing has enabled that courage, and LLMs have enabled and accelerated automated testing where it would have tedious, painful and slow (and likely to be dropped altogether) if it were done manually. I’m optimistic that this approach can be use by others in similar legacy code situations where rewriting the software isn’t an option. They too can enjoy the feeling of momentum, of having the courage to make changes.
That, after all, is what enables us to embrace change!

