If you’ve been in the software industry for any length of time, you’ve probably heard people talking about how bad the code is that AI is generating. That code is not maintainable. It needs to be a temple of clean code. What these machines are doing is sacrilege.
However, what people seem to forget is that in the last 30 or so years, the fruits of our labor are equally not very maintainable. It is often a bunch of spaghetti, coupled with design patterns applied almost by rote and comments that are usually not true. What we are doing by bashing AI is projecting our own lack of success onto something else. Rather than dealing with the real issues, we are performing a ritual to exorcise the evil.
Maintainability is contextual. The code written by humans that seems maintainable right now might be a ruinous archaeological find for the next generation. The original creators are gone, the variables made unintelligible and the business logic a tangle of kelp. And we've become so used to this sort of thing that it's just part of the normal functioning of software development. The 90s and early 2000s were a golden age of unmaintainable code: dense, almost write-only Perl scripts; C++ codebases full of manual memory management and undefined behavior; Java factories that spawned other factories. The legacy system that nobody wants to change. The module held up by word of mouth. The patch that became a permanent piece of the infrastructure. So an AI-generated piece of code that works but can't be changed isn't a special case. It's just the continuation of an old and ignoble tradition, a continuation of that tradition that we've had decades to explain away by calling it technical debt or pragmatic trade-offs.
And there's another, more psychological layer to all of this, because we have to admit that a lot of the AI-generated code, despite its apparent quality, may be no better than the median human-written code. In other words, the real day-to-day work of writing software isn't an art form of logical elegance but a down-to-earth reality of using bits of code from Stack Overflow, dealing with deadlines, and continually iterating until the code at least passes tests. The AI can't get arrogant or tired; it just reflects the patterns of the data it's been fed. In other words, when we blame an AI algorithm for the unmaintainable code, we're putting the blame on a mirror of our own history of efficient shortcuts, what with the irony of it being so exquisite. The difference is that a person can explain their code, and the model cannot.
Recently I looked at code I wrote back in 2019 and got terrified. I can't believe I wrote that. Duct tape here and there. Not proud of the code. The AI lets us put the blame elsewhere, which we like; it's a cleaner scapegoat. The technical debt comes due, but at least it's someone else's fault this time.
Top comments (0)