logoalt Hacker News

simonwtoday at 8:13 PM3 repliesview on HN

I'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 either accept it, poke it a bit, or abandon it. Costs me almost nothing.


Replies

rafaelRivtoday at 8:20 PM

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 itself (I am still paid a a few hours per months for it)

show 2 replies
boron1006today at 8:52 PM

Do you work with other, potentially unmotivated devs/managers a lot? I wonder how much of this is an incentive issue. I don’t think refactoring itself is as much of an issue than working with 2-3 other engineers that DGAF and a manager who is only looking at LOC to determine who to promote.

But it also doesn’t mean these things aren’t problems, they’re obviously huge problems.

teaearlgraycoldtoday at 8:23 PM

All sorts of efforts that used to be put off indefinitely can now be handled largely by LLMs. Yesterday I took a codebase (~50 source files) and spawned a sub-agent (GLM 5.3 Flash) for every single file. Each file was analyzed for test coverage issues, inconsistencies between comments and implementations, and all call sites against the implementation. Then issues were aggregated. I reviewed the list manually, had Opus and K3 review as well to prune the list, and then had a commit made for every minor issue found. 70 commits with maybe 30 minutes of manual work.

Not exactly a refactor, but high degrees of consistency are what I strive for in a codebase. LLMs get confused by inconsistencies, as do humans.

show 1 reply