Conventional wisdom holds that AI-enhanced development raises maintenance costs. You know… with glued-on copy-paste code that nobody understands and such. And I’ve seen that it can be so.
Let’s start by noting that I have seen my share of hard-to-maintain systems even before the current LLM era. Writing copy-paste code without documentation, with a mixed architecture and lots of bugs, is not just privilege of AI. But AI hands you a technical-debt credit card with a large limit, and no one prevents you from making bad decisions. You need to take responsibility for your own spending and keep the debt under control.
Your responsibilities as the boss of AI
- If you don’t understand the AI’s code, how can anyone else? Order the AI to make it understandable and consistent with the rest of the project.
- If you see double while looking at the code, you may not just need a new prescription for your glasses. Ask AI to remove duplication and modularize common parts.
- If your scrolling finger develops a cramp, it may be time to hand the AI a splitting ax.
- Do you enjoy deciphering one-liner regexes? Make sure all the cryptic functionality is documented, and demand documentation for things that truly need it.
- If you don’t enjoy watching the world burn around you, make sure test coverage stays good and includes the new functionality.
- Put on your best evil-twin costume (the one with the metaphorical goatee) and think for a moment about how someone could break or exploit the code. Shame the AI mercilessly for such oversights.
- Take a moment to think about the architecture. Some architectural debt can make your code look like the Tower of Pisa. But at the very least, keep it from getting worse so it doesn’t fall over.
You are the only guardrail preventing crippling technical debt. Stay vigilant!