← Blog

Spaghetti belongs outside the code

I've been experimenting with Claude Code. The best sessions feel close to the best pair-programming I've done — which, oddly, was in Java. Not my preferred language, but the language of some of my favourite pair-programming partners, so the association stuck.

The test case was a Canadian tax estimator. The whole thing could have been written in a handful of files, sprinkled with if-statements. For basic functionality covering just Ontario and Quebec, that's fine — if that's all you ever intend it to do.

But adding more provinces means more if-statements. Adding province-specific rules means yet more of them. Instead, an additional province is now one rates file, plus a new function only if the province genuinely needs one. Nothing else changes. The UI and the data sources could be swapped out entirely and the core would stay intact.

The point was never the tax math. It was pair-programming with an LLM the way you'd pair with a person who shares your goal: a clean, well-tested core that's genuinely easy to extend later. That takes the same thing it takes with a human partner — saying what you're optimising for, and pushing back when the quick version isn't the one you want.

AI can help you produce spaghetti-like code, or something you can maintain and grow. That's a choice you make, not one the tool makes for you.

I like spaghetti, but I prefer it outside my code.

It's not tax advice. Poke around, break it, and tell me what you'd do differently — the repository is here.


Reach out if you'd want to talk about any of this.