Desloppifying a codebase takes much longer than writing it from scratch, and the economics of firing developers
There's a big discrepancy between the information I keep seeing online, and what I actually experience. Maybe it is a skill issue, I don't know.
I'm a professional developer (former tech lead, 20+ YoE), using the paid models on max settings, and I'm preparing to release some LLM-written code as opensource.
The reality of this type of code is that for anything remotely complex it's absolute garbage, and requires enormous amounts of time to correct because it's broken in multiple ways at every abstraction level. It's the matryoshka doll of spaghetti code. Whenever you put one issue away, a new WTF is revealed.
Could have easily finished the project in less than a week, but 3 weeks in, I'm still digging out anti-patterns and bugs, and I have to watch it like a hawk, otherwise it tends to reintroduce the same problems. It's tiring.
In contrast, I have mentored both junior and senior developers across my career, and I've never felt so necessarily involved in the way any of them have been writing code. This is what everyone says, right? That you can get rid of most of the team and only keep the team lead with a few subscriptions? I don't buy that.
Yeah, it can do lots of things and it can have good output for some applications, but if your business required a developer team before, odds are you have enough complexity that current LLM technology can't handle it, and improper use will only make things worse, not better.
On the money side, if you force a senior developer to generate LLM code beyond what's feasible (either with impossible deadlines or by mandating it), you have immediately reduced that developer's value considerably, because he/she will either become extremely slow, trying to fix the slop, or will be just another vibecoder, and you'll be paying a senior salary for what a non-developer can do.
My theory is that either most managers are unaware of these tradeoffs or that the market has decided that shipping trash is the way to go (which is plausible).
Anyway, I just felt I had to put this out there, because it feels like every voice of reason has flipped in the recent months, and I'm not sure why. Hope I won't have to justify this post in future job interviews.
Cheers!
16
u/lphartley 6h ago
Without a definition of 'remotely complex' this is a difficult discussion to have. What complexity are we talking about here?
How are you instructing the AI? Are you telling it to follow patterns, do reviews, perform (end to end) tests, refactor before merging, etc? I find it difficult to believe this will get you broken spaghetti code.
To be honest, it does really sound like a skill issue if you consistently get 'broken code'.
13
u/RemoDev 6h ago edited 6h ago
28 YO fullstack freelance dev here, I'd like to share some experiences too.
Let's start defining "complex", because it's a very "gray area" kind if definition in my opinion. So far I almost completely switched from hand-made code to 99% AI-written code and I keep being pleasantly surprised by the overall codebase quality. Sure, I don't let the LLM go wild, I set some guardrails and I babysit it when needed. But the end result is almost always way better than what I would write (and it takes 1/100th of the time.
I honestly wouldn't go back to the pre-AI era for any amount of money. 6-8 months ago I was a strong non-AI-slop advocate, I can't deny that. But today? No fucking way: the amount of saved time is beyond insane. My 8-10 working hours/day is often reduced to 1 hour of "real" work. Because the AI (Gemini, in my case) is absolutely phenomenal in terms of speed, ideas and yes, even the code is pretty good in my opinion. I don't even use Claude, which is great but I really don't feel the need of it. AI Studio (Hydrogen) is a monster already.
That's not really the case in most realities, in my opinion. The fact that you had a team before the AI era doesn't mean that a team was "required". More often than not, a team is(was) made of good people, mediocre people and just "bad" people/juniors who were babysitted and dragged along the way.
I'll give you a very recent experience.
One of my biggest clients (a very famous Italian cosmetics brand) asked me to have a look at their ecommerce website + CRM/invoices integration. It turns out the website is an absolute piece of trash, coded and updated by multiple people over 10+ years of life. The CRM is a proprietary/closed paid product with an insane monthly fee, missing QoL features, bugs and lots of useless features that make it heavy and slow.
The client gave me full access to the frontend (a JS/jQuery mess) + backend (Java) and all the available dashboards, so I could have a general idea of the entire system. After spending a little time studying it, I screenshotted most of the panels and saved them for Gemini (AI Studio). I then prepared a few prompts , submitted a rough "template" of what I wanted. I also uploaded all the screenshots.
Less than a hour later, AI Studio gave me an absolutely beautiful CRM/CMS with basically zero bugs on the first run. It created everything, icons included, across 21 different pages packed with features, numbers, controls, widgets, buttons, tables, reports, you name it. I checked the code and it was very close to what I would have done, but (a lot) better of course, because a human can't compete with an AI for obvious reasons. The entire project was responsive too (not required) and most of anything else it made it almost entirely WCAG 2.0 ready (accessibility). It still needs some fine-tuning to make it 100% compliant, but most of the job was done already.
Cherry on top: it also coded a chat system to be embedded on the website via js widget, so the client can replace its current tool (Tidio chat). Gemini coded a chat that lets the user and the operator send screenshots, send cart data, connect the user to its orders, suggest a product with price and thumbnail, send a discount coupon, etc. It's just insane. And it's multi-language ready too.
This entire thing would have cost me a very long time (multiple weeks/months with full-focus on this project only). And I am sure I would have had bugs and things to fix here and there, because I am far from being a genius. I am very good at what I do, but I am not "Gemini" good.
So, at the end of the day, this is how I see the AI: modern LLMs are becoming an invaluable tool which can produce an insanely amount of good code, much much much better that what an average team would have done over the past months/years. 100% hand-written code is going to disappear, there is no way to justify it anymore.
12
u/NotGoodSoftwareMaker 6h ago
Without knowing what youre talking about exactly its tough to say
Prior to AI, without fault every single company I ever worked at had developers with massive egos who stubbornly clung to ideas like “only they knew” or “their way is best” and then they justified it with a bunch of verbiage like “yagni” or “clean code”. Ive even had a guy try to convince me AI is trash because it cant write jquery.
However the moment you throw a basic idempotency or replication type problem at these types they crumble
So im going to say that you most likely lean towards the former, taking 3 weeks to refactor code which arguably solved the business case just smells like ego to me
195
u/MihaelK 6h ago edited 6h ago
That ship has sailed a long time ago.
If my manager wants me to ship trash, then trash I ship, and I get paid for it. I lost my passion for coding in the company where AI was getting shoved down our throats without any proper harnesses or quality control.
Now I find more passion in my personal projects where I can control how much AI I want to use and where and when myself.
52
u/Potatopika full-stack 6h ago
From my experience you usually need a very tight harness on the models you use to ship something decent although that takes a lot of work to create and maintain.
I would go with the theory that most managers and companies just decided that it's much easier to ship incredibly fast and everything kinda works so they just do it.
I think we still need to wait some time to see how this damages the industry
25
u/shoxwut 6h ago
For what it's worth, I'm currently taking jobs to de-sloppily websites that clients have either paid for or vibe-coded themselves. There are a lot of small companies who have fallen for the trap of believing they can build or maintain something themselves despite having absolutely zero knowledge of what Claude is actually doing.
For how long this lasts, I certainly couldn't say, but it's quite a fun job and change of pace if you enjoy problem solving.
7
u/im-a-guy-like-me 1h ago
I am currently building greenfield after an attempt at the deslop. I ended up convincing them that their vibecoded mess was actually their prototype and that we could now take all the lessons they (didnt) learn and build their actual product.
6
u/Esseratecades full-stack 2h ago
Unfortunately the absolute bare minimum setup needed to get quality code out of agents for anything complex requires extensive DevOps to deterministically constrain the agent and report on its results. Like, your team has to be great at doing a bunch of stuff that engineers and managers have been shrugging off for decades everywhere.
Really the kind of management that's looking for agents as a way to cut costs is the same kind of management that would not invest in any of the things that make agents safe or profitable.
12
u/audioen 6h ago edited 6h ago
I agree that LLMs do not write clean code. But I disagree on the impossibility of making them write clean code, and also on the time tables. I guess it really depends a great deal on the details -- and everyone's experience is a little different.
I do not experience LLMs making me slower. On the contrary, the absolutely insane velocity of producing tons of well-documented and fully tested code is a brand new experience to me. I have had to cut on testing and documentation all my life because keeping all that going is like triple the workload, so my approach was "I hope I make no mistakes". Which is embarrassing when they happen, but it was also the only practical way I ever got stuff done fast enough: as soon as one thing was done, I had to move on to the next thing, and the first draft of any feature was good enough for production.
When LLMs shit the bed, I'm telling it: "don't do this, fix that" and then put it into the coding guidelines also. And that way, the LLM knows to avoid the bad thing the next time. You shoot problems down one at a time, and eventually you find that out that after top 10-20 are no longer a problem, the rest is pretty okay.
So maybe you read this and think I'm a shit developer. It is a plausible reading. I have been able to deliver lots of what I think as fairly intricate stuff over my time. I'm glad to let LLM take the wheel and do stuff, because not only does it design the feature, it writes it, then tests it, documents it, and the way I've arranged our tooling also allows it to deploy it. It can do everything, and all I have to do is make sure that the basic approach is sound.
5
u/retro-mehl 6h ago
Shipping trash always was the way to go. At least in the minds of managers.
5
u/readeral 6h ago
I thoroughly agree. I’m 4 years into a project that I’ve largely been working on alone, and while it _seemed_ like year 3 brought a lot of iteration and quick wins, I felt freed up to think about architecture and UX, now I’m at the point of delivery (or should be…) I am painstakingly unpicking and refactoring some of those key wins that turned out to be overly complex and failed to leverage the platform I’m developing for. But more than that, I’m thoroughly blocked by some of those key things I had AI help me architect. AI might be fine with React projects or building libraries that mimic other libraries or already have full api surface areas defined, but full stack applications built on unpopular technologies? (In my case Salesforce) It’s a dog’s breakfast.
11
u/budd222 full-stack 3h ago
I have a feeling it's a bit of a skill issue. If you take the time to plan out the feature with the llm, set up skills, give guard rails, have it research your codebase for existing patterns, etc, it generally does just fine. I don't think you're taking enough time in the planning phase. I spent 3 days planning out a new and very complex feature with Claude. It touches so many different parts of the application. It did it almost flawlessly.
2
u/Pastetooth 6h ago
Most models don’t even write code best on max mode.
There is a reason the recommended mode is often lower and the model producers publish articles justifying their recommendations.
2
u/Lonely_Nectarine_742 4h ago
matryoshka spaghetti is cursed imagery
2
u/spikestoyou 2h ago
The runtime is the QA environment for AI. That is basically what I am seeing.
3
u/PerformanceThick2232 6h ago
There are 2 types of people, first with expertize and second with not. Only second push narrative that llm code is good and like that; and first are knowing code is shit.
2
u/Busy-Stand-3066 6h ago
when manager demands slop then we go slop
whenever I missing code by hands or carefully AI written code I go with personal project
2
u/TornadoFS 5h ago
The thing is to keep the quality standards of before-LLM work you need to use LLMs in a way that only give 1.5x speed up for most tasks*. Constantly checking output, going back on forth on different implementations, etc. Compared to full-on vibe coding which can give you 10-50x speedup at least for a while...
* LLMs provide a lot bigger speed ups in some tasks at much smaller quality cost like writing tests, or codebase searching, debugging, etc. Documentation to some extent too (but to keep it sane you still need to clean up a lot).
2
u/nuttertools 4h ago
The critical piece your evaluation is missing is revenue. For every 1 company dumping landmines in their basement there are 10 where shoveling shit is the optimum profitability model. The dynamic isn’t new, it’s just more visible with modern tooling.
Ultimately the entire question is one of management competence. The wrong balance of talent on a project allows disasters to get much worse before becoming apparent to out of touch management today than 10 years ago.
2
u/sleepy_roger 2h ago
This is a skill issue.
2
u/feketegy 4h ago
Whoever wrote more than 5 lines of code knows this.
This is not about AI being good or bad for software development.
1
u/graph-crawler 6h ago
It's a well known knowledge, big renovation is costly and takes longer vs building from scratch.
You need more token to diff, to plan, to remove, and to rewrite
1
u/Equivalent_Head_4803 30m ago
There’s always a tradeoff. You move fast and you get sloppier code. That’s always been the tradeoff. When AI was promised, we were basically told it would allow us to make things better but, as an industry, we’ve basically wielded it to increase output and not quality. That’s a major problem. The rate that companies were going was perfectly fine… maintain that rate of productivity but allow developers to increase quality and you’d have amazing software.
Yeah, I know why people think that can’t happen. It’s not just the CEOs and big bad boards. It’s every day developers too. Y’all are fucking lazy hacks with no concept of craft or pride in your output. Every industry has em.
•
u/CrashXVII front-end 28m ago
I think sadly lots of places will be ok with shipping trash. When it starts biting them, then the answer will be to spot fix it with more AI.
It’s too hard to untangle and point at the exact ways that AI botches it. Like reviewing AI PRs, it “works” and seems plausible. Can’t help but “feel” something is off but can’t point to anything except “the entire vibe of the PR”. But that’s not actionable feedback. The core issue is no one is working through and sitting with a ticket long enough to get a true grasp on the bigger picture. So we get all these small puzzle pieces that look right on their own but the whole app put together has all these tiny misalignments.
•
u/gHHqdm5a4UySnUFM 10m ago
I think it is possible to use AI to reign in the duplicate code and anti-patterns but right now there is no willingness to slow down and actually do it. Management wants fast and cheap, they want to see how many of us they can fire before they see a real production issue that can’t be solved by more slop.
1
u/carloselieser 4h ago
Couldn't have said it better myself
1
u/Ok-Snow-6553 2h ago
I feel this. AI can spit out a basic prototype pretty fast, but the code is usually so redundant and unreadable that I just lose all motivation to even look at it.
The worst part is fixing bugs. If you don't give it very strict boundaries in your prompt, it'll fix the one bug but completely break other working features in the process.
So honestly? I don't even read the code anymore. My workflow is just: let the AI generate it, run local tests to make sure nothing else broke, and only then do I dare to
git push.1
u/harperzoe7 4h ago
A rules file in the repo root might cut down the watching-like-a-hawk part. Things like "don't add a helper if one exists, don't catch and swallow errors, no new abstractions without asking" get read at the start of every session, so you stop re-explaining the same fixes. When it reintroduces a bug you already killed, add a line for that exact bug right then. Your 3 weeks of digging out anti-patterns is basically a list of what the rules should say.
I do this on my small JS tools, nothing like a library with new code paths, and the repeat mistakes dropped a lot once the file had real examples from my own diffs. It also helps to keep each task small enough that you can read the whole diff before it grows. Once a change touches ten files you stop really reviewing it.
For a library where every path is specific, I think the rules plus small tasks is the most you get. Past that it's you writing the core and letting it fill in the boring parts
0
u/Standard_Scarcity_74 3h ago
Another hopecore post. These realizations come late for many because they ship it as long as it runs. I see this happen all the time, so many have lost the passion or will to code because AI kept being shoved down their throats that shipping trash and figuring it out later became routinary.
0
u/godofleet 1h ago
simple solution / tl;dr: don't deslopyify, just accept that it's all slop and get better at mitigating / preventing the really sloppy stuff...
the true-true is that we've all always had slop in our codebases doesn't matter if a human or robot wrote it, what matters is how we deal with it.
It all boils down to planning well from the start and continuously maintaining and referencing that plan (a separate document outside of context windows that get compacted) - doing so avoids the issues at "every abstraction level" in my experience
If you start from the foundational stuff, have it review feasibility, precise/effective solutions, build reproducible samples/tests etc, and YOU chose how each layer will be built- Claude (at least that's most of my experience) can be really good at building large complex things while keeping the individual components sane and aligned with the plan.
As you build with it, at every commit (sometimes more often) have it review/compare the plan, active memory/context and product/feature progress... this largely mitigates any hallucinations/regressions. you can even prompt it to intelligently KISS and literally saying just that will often put it on a better track (but being precise and clear with it is almost always best if you're really looking to avoid slopiness)
if it does find stinky / off plan issues, plan and build the fixes closely with it to ensure it's not derailed... then repeat the review plan/context/product pattern.
because not only did the tools get WAY better in the 2026, we're using them differently (but i think more effectively) than before.
-2
u/abeuscher 2h ago
I'm so genuinely confused by these posts because I believe you - but as someone with a similar level of experience I am not bothered by the generated code in the slightest because the code is an artifact.
If there is a concern about security problems I understand that entirely. But if the issue is that you like some patterns and don't like others - why are you continuing to fight that battle?
I know lots of engineers are snarky assholes. I am really not, and I do not mean disrespect with my questions. I don't really get it.
I guess what I mean is - when are those anti-patterns going to be a problem? When is code that isn't up to spec going to be seen, and if it is, what specifically are the implications of it?
I think when I ask questions like this other seniors treat me like I am stupid or I must write terrible code. Well - people tell me I am smart for whatever that is worth I don't know I can self report on that I've been inside this brain for my life and so far I like it here. The code I wrote for many years passed review when that came up. It wasn't earth shattering stuff but it worked.
If AI and LLM's are in charge of code now - which seems to be the case in many shops and increasingly so - what is the consequence of "bad patterns", poorly written code, etc. if we are hands off of it at this point? To me it sounds like you are complaining about the way a compiler optimized your code in a way you don't like and you're in the weeds about it. But hey - I am guessing I am wrong or that your point is better than that because you seem smart and genuinely concerned about this.
So - what happens? I have cleaned out tech debt before. It seems to me that LLM assisted tech debt cleanup is blazing through the backlog in many places. It also seems to me that if the concern is specifically security related - we better be using LLM's because that is what we are racing against and in that area of the field they are clearly winning.
So - what happens if your job continues on like this in your mind? Does the product suffer? Does that affect the bottom line of the company? Do stakeholders become upset? Do shareholders lose money? What is the negative business consequence of this? Where does it lead that concerns you?
Would love an answer. I wish we were like at a bar or something so I could do a better job proving I am not trying to troll or whatever. I am outside of the workforce right now so your perspective is of value to me in this.
-2
u/sreekanth850 6h ago
People do what works for them. If LLM didn't worked for you just move on without one.
-1
u/bendem 3h ago
From my experience, LLM are only bad when they are missing harness, memory and context. We went with Claude code for harness with a custom container as a sandbox, Serena for memory (the symbolic tooling is a plus) and a bunch of organisational skills (patterns, local infrastructure, conventions, decision trees) and written specs in the project.
With that, it's generally a matter of encoding facts that the ai didn't yet know about. Or making business decisions during the brainstorming phase.
0
u/Ok_Woodpecker_9104 5h ago
the reintroducing part matches what i saw, the rules you give it at the start of a session fade as the session gets long and it drifts back to the patterns you told it to drop
what helped me was a hook that blocks the first file edit of every prompt until the rules get loaded again, so they are fresh right before it writes code and not only at the start
compaction is the other one, the summary gets the tail wrong more than you would think, i counted 4 out of 7 where the last edit was listed as not done, so it redos a fix you already made
0
u/Desperate-Sorbet-994 1h ago
The 'could have finished in less than a week' is the part I'd want to see evidence for. Estimates of work you didn't do are always cheap, the three weeks of actual cleanup is the only number you've got.
-5
u/livingFaithGame 6h ago
sounds like a user skill issue tbh.
if you're a bad PM, your team will produce shit work - doesn't matter if they are AI agents or humans - the results depend on the project leadership
-3
u/GoodishCoder 6h ago
I don't experience this issue at all when I give proper prompts and context up front. When I was on the AI COP 100% of the developers struggling to adopt the AI tools we were providing, were horrendous at prompting. They were all either giving too big of a problem instead of breaking the problem down and giving AI the pieces, or they were giving no context and just telling it to implement.
-1
u/Rusty_Raven_ 2h ago
Deslopping is a waste of time.
If you're using an LLM to write your code, then you don't need to edit or control the code - just control the LLM so that the code does the job. That's literally all you can do.
If you're using an LLM to help write your code, then absolutely edit the hell out of it.
If you want an LLM to write beautiful, well formatted, well organized, patterns-compliant code, then you might as well just write it yourself. It's faster, you maintain code style and quality, and it's more satisfying.
There is literally no upside to forcing an LLM to output the code you would have written yourself.
-1
u/tomByrer 2h ago
Using AI to automate testing...
Let's just say my friend who is a CTO at a Fortune 100 corp is getting ready to 'restructure' his 15 person testing team; took him 2 weeks to automate testing with 95% accuracy; said his bot took 2 hours to close more tickets than his 15 man team takes a week.
-5
u/HotDribblingDewDew 3h ago
Scratching my head. Sorry but this screams your experience clearly hasn't been worth the time you spent to get that and you aren't using the latest models very well if this is your conclusion.
-7
u/reactivearmor 4h ago
It is a skill issue, nothing more. This whole sub needs to drop the copium, I know it makes you feel better momentarily, but so does heroin
-2
u/boneskull 5h ago
25 YoE. My experience has been that if I either don’t pay attention to what an LLM plans to do (rushing), or don’t provide it enough detail, then I am regularly disappointed with the result.
I’m also careful to limit the scope of the instructions. I tend to avoid delegating high-level architectural decisions (though LLMs are good for discussion).
To succeed with LLMs, you need to know how to communicate—how to write—and recognize what’s important or unimportant.
I’m not making any claim about your communication skills, but it could be something to consider.
-2
u/CensorVictim 3h ago
you should give more detail about what you built and how you used the LLM. I've had great success with Opus 5.5 building things using well established, documented tools (e.g. a Symfony app) that inherently provide it with solid guardrails.
-2
u/anoncaatyee 3h ago
the economics break because cleanup has no visible finish line while a rewrite has a fake one. the pragmatic version: only desloppify the paths that change weekly, and let the stable ugly parts stay ugly. refactoring code nobody touches is paying real money for aesthetic satisfaction.
-2
u/Lyelinn 2h ago
> The reality of this type of code is that for anything remotely complex it's absolute garbage, and requires enormous amounts of time to correct because it's broken in multiple ways at every abstraction level
this just means that you have no idea how to use this tool and should rethink your approach. I'm pretty sure that Opus 5.5 writes better code than 90% of today's developers, fable would bring even higher by few percents
All these posts I've seen are like a template: all made by someone stuck in the past working on some absolute generic stuff like wordpress shop websites and never actually worked on something more complex than crud+basic business logic. Time to learn to let go and learn the new tools because they're hereto stay anyways and c-suite will force everyone to use it; and if you're a freelancer your competition will use it anyways
Just as a hint, FAANG, oAI, Ant, Gemini and all these labs are using ai to work on everything from their frontend to their inference engines
-2
u/DKhorkov 1h ago
guys, like my commet pls
-3
u/BanaenaeBread 2h ago
You lost me with saying a senior dev vibe coding is similar to any non dev. A senior dev can vibe code something secure and organized and good. A non dev vibe coding is a joke. Even a jr dev vibe coding is usually not a good idea.
-11
u/bevelledo 6h ago
I’m not gonna lie boss, this shit reads as created by AI. Does it matter for the content? No, but Its getting tiring to decipher and put weight/trust on information.
-5
u/lost_islander 4h ago
About 15 years ago I was interviewing a senior developer from one of the FAANG companies. We were a smaller development team and I was a fairly young CTO and I was excited about the prospect of recruiting someone to the team with his background. We had built a team culture around TDD, pair programming and code reviews. It was all about code quality and developing our team, so adding strong, experienced developers that could pair with our junior developers and pass along their best practices was critical.
But during the interview he said something that set me back. I was asking about design patterns or testing and he said something to the effect of, “that’s not something we focus on. With the size of our development team, it’s more important to ship code fast than for the code to be maintainable. We have enough developers that if we need to change it we can just rewrite it.”
With the current state of LLM models, that is more relevant today than it ever has been. You want your artisanal, hand-crafted code so that you can understand and reason about your code and what it does and how it works. But in 5 minutes, Opus can take a brand new code base, slop or not, and find precisely a flow that needs to change or a bug that needs to be fixed or an interface that needs to be added.
The software development world has changed. Spending weeks cleaning up code so that our feeble human brains can understand it is almost certainly a waste.
The sad reality is that the craft and skill that brought most of us to programming are gone. They are replaced by the ability to process information and build software faster than was ever possible before.
We can accept that and become a part of that change or we can fight it and become a subject of that change.
But the change has already happened and it’s not going back.
-3
u/marsd 4h ago
"Desloppifying" aka waiting to get laid off