I've yet to work at a place that bothered with much refactoring over adding the thirtieth conditional to new feature....
AI Agents and the Refactoring That Never Happens
11–20 of 76 posts
Re: AI Agents and the Refactoring That Never Happens
#12Your discipline only pays off if you already understand your code and/or established clear baseline for your standards before launching into a feature development mania. And it needs to be enforced every turn, or the firehose of code generation knocks the front door down easily.
Re: AI Agents and the Refactoring That Never Happens
#13I've found that access to coding agents has helped me be far less tolerant of bad code patterns that can be refactored. Refactoring used to have a very real cost - it was substantial amounts of time that would have to be carved away from working on new features. Now I can spot a potential refactor, fire off a prompt in an asynchronous coding agent (or on a worktree or whatever), then come back 20 minutes later and ei…
And for me, it has created a giant pile of unmaintainable code from my coworkers because of stupid management people that think they can code. Refactoring was never a substantial amounts of time for me before llms. Before I could spot a potential refactor and refactor it in 20 minutes and less. Never abandon it. Just constant improvement to the point the previous tech startup that I was working for just drive from it…
Re: AI Agents and the Refactoring That Never Happens
#14Re: AI Agents and the Refactoring That Never Happens
#15I've found that access to coding agents has helped me be far less tolerant of bad code patterns that can be refactored. Refactoring used to have a very real cost - it was substantial amounts of time that would have to be carved away from working on new features. Now I can spot a potential refactor, fire off a prompt in an asynchronous coding agent (or on a worktree or whatever), then come back 20 minutes later and ei…
And for me, it has created a giant pile of unmaintainable code from my coworkers because of stupid management people that think they can code. Refactoring was never a substantial amounts of time for me before llms. Before I could spot a potential refactor and refactor it in 20 minutes and less. Never abandon it. Just constant improvement to the point the previous tech startup that I was working for just drive from it…
In the only scenario where that could actually be true you wouldn't have coworkers creating unmaintainable code with LLMs now.
Re: AI Agents and the Refactoring That Never Happens
#16I've always _wanted_ my code to be clean and easy to follow but life, deadlines, shifting-priorities, etc have stood in the way of that. Now I can finally realize my personal nirvana.
That said, I've had to steer models away from too-heavy of abstraction or similar because it made the code too hard to follow.
Re: AI Agents and the Refactoring That Never Happens
#17> Here’s the problem. AI agents are not bound by human context limits in the same way. An agent can read the tangled function, trace every caller, and make sense of the mess that would have stopped a human cold. It can add the next branch correctly, and the one after that, working confidently inside code that no human on the team fully understands anymore. They're not bound by the same limits but they're still bound…
Sorry, just thinking about it is reviving my frustration…
Re: AI Agents and the Refactoring That Never Happens
#18Often times it's not even that the code is bad but rather that it's overengineered. I see it happen so much that I'm tempted to actually go the other way on a toy project. Like what would Claude or Codex come up with if I told it I wanted an enterprise grade, globally scalable, compliant and auditable tic-tac-toe game.
Re: AI Agents and the Refactoring That Never Happens
#19I've found that access to coding agents has helped me be far less tolerant of bad code patterns that can be refactored. Refactoring used to have a very real cost - it was substantial amounts of time that would have to be carved away from working on new features. Now I can spot a potential refactor, fire off a prompt in an asynchronous coding agent (or on a worktree or whatever), then come back 20 minutes later and ei…
But it also doesn’t mean these things aren’t problems, they’re obviously huge problems.
Re: AI Agents and the Refactoring That Never Happens
#20Why wouldn't we do that? I think there's a point where this comes down to values instead of facts. If you want it to be human readable, that's fine and there are a bunch of therefores from that point. But if you don't necessarily want that for a particular codebase, why refactor if the LLMs can handle it?