Does Code Quality Even Matter Any More?
If AI can generate code for us, does it even matter whether it is of high quality? The debate on code quality versus speed has entered a new dimension. If (re)generating code is near-instantaneous, so the argument, why bother telling the AI to generate "clean" code?
Let's be clear: Writing code is not a beauty contest. If the right thing, right now, for the business is to write ugly code, that's the right call. But let's remind ourselves of what the whole point of code quality is:
Good code is code that's easy to understand and easy to change for unknown future needs.
I believe this definition holds up in the age of AI, for a few reasons.
First, code generation is only near instantaneous at the very beginning. Any software product worth any time and effort will have been painstakingly assembled over multiple sessions, even if heavy AI use was involved. It is impossible to regenerate from scratch, in a single prompt, what took a hundred prompts or more to build (and even if it was, it certainly wouldn't be cheap.)
Second, as any dedicated vibe coder can confirm: The longer you work on a project the harder it gets to do anything. Add a new feature? Snap, this old feature just broke. Fix a bug? Here're two more! The very definition of bad code is code where this is a frequent occurrence. Whether it's a human or an AI attempting the work, code can be easy or hard to work with.
You can see this when you pay attention to Claude Code's tool use: Ask for a change to an app, and it often kicks off some exploration: "Let me understand how this feature currently works." Would be nice if Claude could get to that understanding quickly, and that's exactly where code quality comes in. And if it makes a localized change, it would be nice if that change didn't have all sorts of crazy ripple-effects that it then a) needs to recognize and b) contain.
Of course, you could now argue that code quality as perceived by an AI looks different from code quality as perceived by a human, but I haven't seen a single example of that yet. What, do we expect Claude to do better with overly convoluted and nested functions? Will Codex thrive in spaghetti code with cryptically named modules and variables? Nope.
What's good for us is good for them, and as always, if you want to go fast, with or without AI, you need to go smooth, and that means to care about quality.
