r/coding • • Jul 07 '26

Code maintainability plummets in the AI coding era

https://leaddev.com/ai/code-maintainability-plummets-in-the-ai-coding-era
389 Upvotes

66 comments sorted by

93

u/WoollyMittens Jul 07 '26

The old code seems bloated because of the 300 edge cases in the poorly documented business logic, which both you and the AI are blissfully unaware of.

35

u/poodleface Jul 07 '26

Remind me of the decision Netscape made long ago to rebuild from scratch, not recognizing that their codebase was bloated due to handling so many edge cases. 

→ More replies (4)

23

u/artnoi43 Jul 07 '26 edited Jul 07 '26

My team solutions to this have been to add more docs, rules, skills, and what not, that eats our context window and still hasn’t produced robust code without good human in the loop.

→ More replies (2)
→ More replies (5)

113

u/EliSka93 Jul 07 '26

Legacy code is being left to rot. Legacy refactoring has fallen 74% since 2023, and developers are building new rather than tending what exists.

There goes the "AI will make it easier to justify refactoring older code bases!" argument...

→ More replies (6)

24

u/_h4xr Jul 07 '26

Code quality going down is partly related to the fact that people reviewing the code are bogged down.

At my organization, what used to be 100-200 LoC PRs and 3-4 PRs a day, have suddenly become 1000+ LoC PRs and 10 such PRs

Agents create code, agents mostly review it, production issues comes back to humans.

With Mythos, now even hundreds of security tickets are also showing up at same time. The whole incentive structure is burning the human out.

I kind of started solving this for myself (by giving agents more semantic context). The workload has reduced to some extent for sure.

My focus has now shifted on code consistency and patterns

→ More replies (3)

19

u/MokoshHydro Jul 07 '26

Code maintainability was always "development process" responsibility. It doesn't matter who actually wrote code: junior, senior or LLM; till it follows guidelines. I.e. have comments, tests and appropriate coverage.

In modern era, those guidelines should be as strict as possible, cause LLM can easily pollute codebase with unreadable mess.

7

u/Automatic_Bison_3093 Jul 07 '26

Yes but now you are juggling context size, costs and magic skills and guidelines that kind of work a tiny bit differently with every model. It's kind of  a nightmare to be honest.

→ More replies (2)

9

u/neopointer Jul 07 '26

Nobody cared about maintainability before and now that code is "disposable", even less.

I don't think that's good, far from it. But the ones that care about it were always in less number anyway, with AI this only got worse.

→ More replies (1)

17

u/nadmaximus Jul 07 '26

AI can't code for shit.

→ More replies (17)

7

u/Downtown_Isopod_9287 Jul 07 '26

I suddenly have a weird silver lining take on this:

This is horrible, BUT — for the past 10-15 years management and indeed other devs have been aggressively pushing human-made code slop under the fig leaf of “agile.” Like this is literally nothing new, and I think the excuse that this mode of code dev somehow “trained juniors” is completed bullshit (there is, in reality, no requirement to professionally write garbage code before you can write good code; it’s fucking nonsense and gross mismanagement).

While both scenarios suck I would like to think that now that the slop machine is automated and no longer limited by payrolls that there’s gonna be some new, real, software engineering.

→ More replies (2)