logoalt Hacker News

nemothekidtoday at 12:46 AM3 repliesview on HN

This is something I've been thinking about as I start to adopt more agent-first coding.

There is a real advantage to having good code especially when using agents. "Good Code" makes iteration faster, the agent is unlikely to make mistakes and will continue to produce extensible code that can easily be debugged (by both you and the agent).

A couple months ago I refactored a module that had gotten unweildly, and I tried to test if Claude could add new features on the old code. Opus 4.5 just could not add the feature in the legacy module (which was a monster function that just got feature-crept), but was able to completely one shot it after the refactor.

So there is clear value in having "clean code", but I'm not sure how valuable it is. If even AGI cannot handle tech debt, then there's value is at least building scaffolding (or atleast prompting the scaffolding first). On the other hand there may be a future where the human doesn't concern himself with "clean code" at all: if the value of "clean code" only saves 5 minutes to a sufficiently advanced agent, the scaffolding work is usefuless.

My reference is assembly - I'm in my early 30s and I have never once cared about "clean" assembly. I have cared about the ASM of specific hot functions I have had to optimize, but I've never learned what is proper architecture for assembly programs.


Replies

amitprasadtoday at 12:56 AM

Right: Having "Good Code" is an investment into future velocity.

IMO we shouldn't strive to make an entire codebase pristine, but building anything on shaky foundations is a recipe for disaster.

Perhaps the frontier models of 2026H2 may be good enough to start compacting and cleaning up entire codebases, but with the trajectory of how frontier labs suggest workflows for coding agents, combined with increasing context window capabilities, I don't see this being a priority or a design goal.

show 1 reply
aurareturntoday at 7:28 AM

I don’t worry about clean code anymore because I expect the model to read it in the future, not me personally.

IhateAI_3today at 12:58 AM

[flagged]

show 2 replies