Tech Debt Creep
I forgot to wash the dishes the other night.
I woke up the next morning to a stinking mess with food plastered on the plate. It took me 3x longer to clean then it would have had I rinsed it off immediately.
Tech debt in codebases is very similar.
The short term āgainsā of implementing more features at the expense of cleaning up old tech debt compounds the debt.
LLMs and Coding Assistants cook when it comes to cranking out code. Seriously, Claude types like 10000x faster than I can. Unbounded in its creation, it also introduces tech debt faster than I ever could.
Just ask Microsoft, who after bragging that GenAI is now writing 20-30% of their code, also released an OS so riddled with bugs that it wasnāt usable.
Whatās the antidote?
Obviously not using GenAI and hand jamming code the āold schoolā way is the easiest way.
If you choose to use GenAI, Iāve found that instructing it to āuse test driven developmentā helps tremendously in stepping through the reasoning process.
Pausing the model before it writes the corresponding code to verify that corner cases, boundary conditions, and malformed inputs are included as part of the test cases goes along way to enforcing guardrails around the code the model writes. It also feels like the sane thing to do instead of going full YOLO and letting the model write ALL of the code.
Another pattern Iāve found to be extremely effective, especially for āpattern-codeā that youāre going to reuse over and over again, is to write the first instance with complete test cases then instruct GenAI to replicate the code for future instances. This pattern works incredibly well for things like REST API development where the endpoints all follow the same loose structure (GET, POST, PUT, DELETE). Rinse-and-repeat patterns are particularly good candidates for this technology.
GenAI is fantastic for getting from scratch to a functioning demo. If youāre not careful when trying to scale from a demo to a full blown product, youāll end up crippling the product with tiny bugs that amount to a whole lot of tech debt. With a little discipline itās straightforward to get the best of both worlds.