With Time, All Software Goes South. AI-Written Software Gets There Faster
There is no better feeling than creating a brand new code repository. For a brief moment, you will have a nice, clean slate without bugs of any sorts, without hacky workarounds, with none of the sauceless spaghetti and half-baked features you never managed to fully write and maintain, but which eventually turn your codebase into a technical debt obstacle course.
But that joyous feeling does not last too long. Bit by bit, and sometimes by leaps and bounds, that nice, clean codebase will start to go south, acquiring some, if not all, of the dreadful issues every developer fears.
This kind of deterioration is inevitable. No matter what you do, no matter how careful you or your team are, the growing complexity will take its toll. Yes, the more careful and experienced you are, the slower the decline, but anyone claiming they have a perfect codebase is either delusional or has never worked with large-scale systems in production.
At some point, small bugs and issues accumulate, the architecture starts to fold under new requirements, and adding new features without major refactoring becomes almost impossible.
Of course, not all software is made equal, and how bad the situation becomes will largely depend on how much knowledge, care, and time was invested into developing that software in the first place. How many good practices were followed, how good the foundations are, and how many times someone took a shortcut.
The double-edged sword of AI
We are firmly in the era of AI. AI brought a massive shift in developers' workflows, and it is not something that can be easily ignored even if we want to.
With AI help, finding information has never been easier. What used to take hours of relentless searching and reading across countless Stack Overflow answers or documentation pages, you can now find in a matter of minutes.
Agentic workflows, where AI is the one writing and committing the code, are becoming a norm. Working with AI is pushing developers to define specifications before writing the code, reinventing the entire software development process from the first principles. Who said everything AI brings is bad? 🙂
Developers who have never written a single test in their life, are now running thousands of tests AI has written for their codebases.
We are no longer stuck in front of an empty screen, unable to progress or unsure where to even start.
Finishing all those side projects started years ago, of which some were not much more than a vague idea in your head, is no longer merely a bad case of wishful thinking.
We are moving faster than ever. But we must ask ourselves: Are we actually getting somewhere meaningful? Or are we just getting lost in the sparkling jungle of AI slop?
Maybe you can find information in a matter of minutes, but finding correct and trustworthy information has never been harder. Is that great article you just read a product of someone's deep knowledge and understanding of the subject matter, or is it just plausible-sounding, hallucinated garbage?
If you are lucky, that code the AI wrote might actually work, but will it work efficiently? Does it have good performance and a small footprint, or does it work like someone used bubble sort to arrange millions of items, and gobble up memory like there is no tomorrow? Does it have any security issues?
Will you wake up in the morning with tens of thousands of dollars in unexpected AWS and similar bills? Is it well-structured code, easy to read, understand, and maintain? Will you be able to easily add new features in the future? Or is it a refactoring nightmare nobody will be able to touch without starting all over again?
What about all those tests you now have? Are they properly exercising your code and covering the most important code paths? Or are they just lulling you into a false sense of security?
The great ideas born from those dull moments in front of an empty screen might never materialize while you are cheerfully chatting with your favorite AI or watching agents churn.
The amounts of various content AI is capable of producing—code, tests, documentation—is massive. It is far beyond our ability to properly supervise and keep under our control.
The faster we progress, the more we produce using AI, the faster we are acquiring a huge technical debt which eventually we won't be able to handle. And when the AI-generated software actually goes south, crashing and burning, and when the AI won't be able to make a full rewrite in a matter of days, then all the advantages gained by faster production will evaporate into thin air.
No matter whether we like it or not, AI is just a tool and we should use it as such. It is not a panacea, a magical solution to all our problems. And while it can help us in solving a lot of problems, it also creates a whole new range of problems on its own, and we need to know how to efficiently avoid those.
One of the issues is also in its rather addictive nature. Once you start using it in an agentic way, it is very easy to lose control while deceiving yourself that you are still fully behind the wheel.
And it can make you easily lose perspective, making you think that you no longer need to read and inspect AI-generated code, because you have AI-generated tests which are guaranteeing the code works. Right???
"If it compiles, ship it" was meant to be a cautionary tale, not an operation manual. And tests can never prove the absence of bugs and issues, they can only detect their presence.
Yes, AI models have made a huge progress since their introduction, but underneath all that progress, we are still talking about statistically driven token generators with non-deterministic output. So no matter how many times it gives you a correct and desired output, at random times it will just blurt out complete garbage, disobey given instructions, or similar.
And layers upon layers of agents verifying each other's work can only take you so far.
The first step into the right direction is acknowledging that AI has its limits, and that no matter how you use it and for what purpose (unless you are just having fun), you cannot trust its output and that you need to properly inspect everything it does.
I know that inspecting huge amounts of AI output slows down the progress and after a while it becomes really tiresome. But this really needs to be done, or you are relying on sheer luck to avoid issues with potentially disastrous consequences.
The problem is not in using AI, but how you are using it. Are you just feeling lucky or are you approaching AI with the patience and care it requires? There is a huge difference between the two.
I am not just another AI hater or sceptic, or whatever you want to call me. I have been very closely involved with AI from the very beginning, following its progress, learning about what it can and cannot do, inspecting tens of thousands of Stack Overflow answers (being a Stack Overflow moderator is a blessing and a curse), and reading huge amounts of AI-generated code and tests produced with or without agentic workflows.
While the quality of output has significantly improved, the same problems repeat, just at a slightly different pace. And this incredible progress is what worries me the most. When AI outputs were consistently flaky, closely overseeing what AI does was the only viable choice. If you haven't done that, it would crash and burn soon enough.
Nowadays, fairly complex applications can be written with very little or no human oversight. Such a black-box approach to software development may be fine for throwaway tools or small, internally used utilities, or personal fun projects. But for any public facing applications—even games, as they can have security implications—a lack of supervision borders on negligence.
I don't know about you, but I am not keen on having unsupervised AI-generated code running the nearby nuclear plant or controlling the airplanes flying over my head. You cannot automate your way out of responsibility. And yet this is the cliff the whole software industry is heading to with remarkable speed.
Yes, people make mistakes, too. But people are also held accountable for their actions or lack of them. We have established workflows and practices which make sure that mistakes are caught early in the process. And even with all that care, fatal mistakes still happen, but when they do, it is commonly because someone in the chain didn't follow the rules.
Now, instead of people who had to prove their competence before being allowed to work on a job which requires a particular skillset, we are introducing slop machines, not as another layer of security—helping us analyze the code and find potential issues, or helping us do our job faster while still retaining full control—but as a replacement for almost everyone in the software development process: acting as judge, jury, and executioner.
What could possibly go wrong?
Using AI is not a problem on its own, but how you use it makes a world of difference. Keep in mind that even frontier models are not infallible, and they are fully capable making a mess, just at a lower rate.
The most important advice for any AI usage is "Don't blindly trust, verify". That is the only way you can avoid trouble.
Research and brainstorming
That information you found in a matter of minutes. It might be good, but it might just as easily be bad. If it is straight up garbage, you can easily dismiss it, but many times you won't be able to tell. This is not just a newbie's problem. Even if you do have the knowledge and expertise in the subject, you might still have trouble properly assessing received information.
Absolutely the first rule when using any AI-provided information is going to the original, trustworthy source and verifying it, although finding a trustworthy sources at this day and age is as easy as finding a needle in a haystack. Do not trust AI summaries. Do not trust the words it writes. AI will literally tell you "documentation says command X does Y" followed by an excerpt from the docs, and then when you go and read the actual documentation, you will find that it says "command X does not do Y" or "command X does Z".
Only if you are looking for non-destructive actions you can easily test, can you afford not to verify the information. For everything else, go to the original source and make sure it is trustworthy. The Internet is already flooded with all kinds of AI-written slop, so a lot of the time you will just land up on some AI-generated article with bad information, and you don't want to blindly trust those either.
Verifying significantly slows down the process, so it is inevitable that you won't be able to fully verify each and every thing. You will have to triage, and your own experience and knowledge can help skip verification for the bits and pieces you know are correct, or for things you just needed to be reminded of.
When doing anything new, you will have to be more thorough, but the whole verification process will also help you in acquiring new skills faster. Learning requires reading and repetition, it requires that you dig into the matter a bit deeper. Unless you have an emergency situation where you need a fast fix, spending some time on learning will handsomely pay off in the future.
Again, be very careful with potentially destructive operations and be wary even of those that don't look destructive at first glance, as they might have unexpected side-effects.
AI slop spreads like a cancer over all media used for sharing knowledge, and books are not exempt. Be careful when buying technical books (and not just technical ones). Fully AI-generated books published by people who have absolutely zero knowledge in the subject have already started to appear on Amazon and similar shops. You can easily spot such, otherwise unknown publishers, if they have books on a wide variety of topics. And even though Delphi is not as popular as some other languages, such fake Delphi books have already been spotted in the wild.
AI can be extremely useful not only for finding information, but also for brainstorming and polishing ideas and architecture. And for solving one of the hardest development tasks: naming things.
But this is also the area where AI can do a lot of damage if you just follow its advice without thinking on your own. It has a tendency to over-engineer things and make them more complex than necessary. And over-engineering does not always mean the architecture is flexible for further expansions. Sometimes it just means it is harder to implement, use and maintain, and sometimes AI can even give you absolutely horrible advice.
If you are not sure, ask in several separate sessions, with slight variations of what you are trying to accomplish. If there are some options which are absolutely inadequate for your use case, explicitly mention that. This will give you more variants and potential approaches, and it can make it easier to make further decisions on your part.
Most of the time, AI will be amplifier of your own capabilities. If you have enough knowledge to ask proper questions and give adequate guidance, you can get great results. Otherwise, it will all depend on how common the problem you are solving is, and whether the AI has been trained on a substantial amount of good solutions on the topic.
Anyway, even when you do the design or write code all by yourself, running that through an AI for analysis can give you helpful hints and bring your attention to some aspects and issues you might have missed.
Again, take every response and analysis with a grain of salt, because AI can also stubbornly insist it is right even when it is completely wrong. Almost like humans do! 😉
Writing documentation and translations
When using AI to write your own specifications, documentation, articles or similar, you should absolutely read the output and make sure everything stated is correct. Even when you are merely translating, fixing grammar, formatting and similar, AI can change the meaning of what is written in the original.
You definitely don't want your "Remote" option for a work environment to become "Remote control" when translated to German, like it did in Stack Overflow's annual 2026 developer survey.
Of course, not everyone can afford professional translators, and AI really shines when it comes to tasks like that, but the least you can do for languages where you cannot verify the output because you don't speak them, is to translate the translation back to the original language (use a new session or some other kind of translation tool to avoid context pollution), to see whether there are some glaring mistakes.
Writing code and tests
When writing code, time is always of the essence. It takes a significant amount of time to convert the design blueprints into well-written, functional code. If you skipped the designing part, it will take you even more time.
And this is where AI really shines. What can take us days, weeks or even months, AI can write in minutes and hours. However, this is also the part where you can most easily lose complete control over your project.
The amount of code AI can produce in a small timeframe is so huge that no human can possibly cope with it. Reading, understanding, and properly overseeing AI-generated code takes huge amounts of time. Depending on the code, sometimes as much as it takes to writing it, if you really read the code properly and not just superficially skim over it.
Spending that much time on such close supervision seems almost wasteful, and it is likely the reason why plenty of AI-generated code, especially when produced by agentic coding, is never properly inspected.
Like I previously mentioned, every single line of code becomes technical debt sooner or later, and you always want to have the best possible code written at any time, because such code will rot way more slowly.
That is why code written by experienced and more knowledgeable developers often ages better. All those years of experience and gained knowledge means their code will be of higher quality, with less bugs and other potential issues. It will be easier to maintain in the long run.
While the quality of AI-generated code has significantly increased and agentic coding solves the problems of hallucinations and uncompilable code, it is also hard to find AI-generated code which does not have any flaws. And all those flaws will, without any doubt, cause code rot.
Yes, experienced developers can also make mistakes and write crappy code, and sometimes the approaching deadlines will mean something will be patched up quickly just to get a working product. However, manually writing code also means that you will often jump around existing code, reading and inspecting it. Such activities also catch plenty of bugs and mistakes.
While manually writing code, developers can also notice when something does not feel right, when some part of the architecture is laid out wrong and is hard to use. Spotting such issues early on means you can go back to the drawing board, change your approach, and make better choices before you have written plenty of code which will be hard to extend and maintain in the future.
By manually writing code, you are not only writing new code, you are constantly reevaluating the existing one. AI does not do that, unless you explicitly instruct it to revisit some code. And doing that also incurs additional costs. Not in time, but in tokens.
Similarly to human-written code, some flaws in AI-generated code can be easily fixed. But if you are not really inspecting AI output and overall structure, then as you go and make necessary corrections, you can easily end up with a huge mess. A mess you won't be able to easily refactor and fix.
Skills, AI memory, and similar can improve AI output over time, but that still does not mean they free you from the responsibility of inspecting AI-generated code. At random times, AI will fail to follow those instructions.
Refactoring large amounts of code is always a problem, even when you wrote that code and you can remember the reasoning behind some choices. Refactoring other people's code is always harder, because having a deep understanding of large amounts of code is not easy and takes time. But for human-written code you can often find some logic behind it.
In AI-generated code which never had any proper oversight, there will be no logical explanation for some choices, you won't be able to look at some complex parts, say "OK, I will trust the author on this one", and focus on doing other thigs first. With AI-generated code, you cannot do that.
It is very likely that using AI to do the rewrite from scratch would be cheaper than refactoring such AI-generated code with AI.
The bottom line is: If you let AI write the code, you need to be involved as much as possible, and you need to frequently read generated code. The more thoroughly you can, the better. There will always be code which can be easily inspected just by quickly skimming over it, but more complex logic will require more careful examination.
Some code you can easily test for correctness. But not everything is easily testable. One of the prime examples is multithreaded code. AI does not know a thing about multithreading. It will just mimic the known patterns, and while it can produce fully thread-safe and correct code, this will be only by chance, and you won't be able to properly verify such code even with tests. The best you can hope for is for a fast failure, so that you can be certain it does not work properly.
And while automated testing can reduce the amount of issues, you cannot depend solely on automated tests to verify code correctness. Especially if the tests are also AI-generated. Similarly to code, you will have to inspect and evaluate tests to make sure you have the most important test cases covered and that the AI did not simply hardcode passing tests.
In general, once you have defined testing scenarios (AI can do that part, too, but it will also often half-arse those), writing tests is a simpler, more mundane task which we can more easily leave to AI. Even if there are some flaws, or less perfect code in tests, or even missing test cases, tests are also more easily fixable so you don't have to be that diligent in inspecting AI-generated tests as you need to be with the production code.
Surviving the AI era
The best one can do to successfully avoid most AI-related problems is to stay closely involved with anything the AI does, and be the guiding and decision-making force.
Unsupervised AI is fine for generating some throwaway tools and locally used utilities, or anything small enough and not critical. Things which can be fully rewritten by AI within a day. But there is a world of difference when doing that in production.
And unfortunately, it looks like working faster regardless of potential consequences is the preferred option for far too many developers and companies.
We should use AI to work faster, but we should only go so fast and not faster than we can manage. We should not let AI take away our ability to think and work, our ability to learn and to improve.
Not just for our own sake, but also for the generations that will come. Like Stefan Glienke recently said to me: We don't want to become one of those Star Trek civilizations where the population is close to extinction because they don't know how to fix their ancestors' tech that stops working.
Comments
Post a Comment