Top
Best
New

Posted by amitprasad 2 hours ago

The silent death of Good Code(amit.prasad.me)
61 points | 69 comments
nemothekid 1 hour ago|
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.

amitprasad 1 hour ago||
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.

IhateAI_3 1 hour ago||
[flagged]
MattGaiser 1 hour ago|||
> Is there anything you really have to get done regardless of quality right this second?

A vast number of things. There are a vast number of things I will accept having done in even mediocre quality, as in the old pre-AI world, I would never get to them at all.

Every friend with a startup idea. Every repetitive form I have to fill out every month for compliance. Just tooling for my day to day life.

charcircuit 55 minutes ago|||
>Why would you adopt agent first coding?

Since most work on software projects is going to be done via coding, debugging, QA, etc AI agents you should prioritize finding ways to increase the velocity of these AI agents to maximize the velocity of the project.

>Are you that bad at it?

That is irrelevant.

>Is there anything you really have to get done regardless of quality right this second?

You are implying that AI agents have low quality work, but that is not the case. Being able to save time for an equivalent result is a good thing.

>Just write the code yourself, and stop training your replacement.

AI labs are the ones doing the training better AI.

bilinguliar 47 minutes ago||
> That is irrelevant.

Why?

charcircuit 32 minutes ago||
That commenter is try is trying to imply that AI agents are a form of crutch. Like if you are bad at programming you use an AI agent to program for you. In reality programmers of all skill levels are migrating to using AI agents for programming.
ollysb 31 minutes ago||
Good code has always been written with a reader in mind. The compiler understanding it was assumed. The real audience was other engineers. We optimized for readability because it made change easier and delivered business value faster.

That audience is changing. Increasingly, the primary reader is an agent, not a human. Good code now means code that lets agents make changes quickly and safely to create value.

Humans and agents have very different constraints. Humans have limited working memory and rely on abstraction to compress complexity. Agents are comfortable with hundreds of thousands of tokens and can brute-force pattern recognition and generation where humans cannot.

We are still at the start of this shift. Our languages and tools were designed for humans. The next phase is optimizing them for agents, and it likely will not be humans doing that optimization. LLMs themselves will design tools, representations, and workflows that suit agent cognition rather than human intuition.

Just as high-level languages bent machine code toward human needs, LLMs let us specify intent at a much higher level. From there, agents can shape the underlying systems to better serve their own strengths.

For now, engineers are still needed to provide rigor and clearly specify intent. As feedback loops shorten, we will see more imperfect systems refined through use rather than upfront design. The iteration looks less like careful planning and more like saying “I expected you to do ABC, not XYZ,” then correcting from there.

mattgreenrocks 1 hour ago||
IMO, you need to have the capacity to write Good Code to know what Good Enough Code is. It's highly contextual to a particular problem and season in a codebase's life. One example: ugly code that upholds an architecture that confers conceptual leverage on a problem. Most of the code can operate as if some gnarly problem is solved without having to grapple with it themselves. Think about the virtual memory subsystem of an OS.

The problem with this argument is many do not believe this sort of leverage is possible outside of a select few domains, so we're sort of condemned to stay at a low level of abstraction. We comfort ourselves by saying it is pragmatic.

LLMs target this because the vast, vast majority of code is not written like this, for better or for worse. (It's not a value judgment, it just is.) This is a continuation (couldn't resist) of the trend away from things like SICP. Even the SICP authors admitted programming had become more about experimentation and gluing together ready-made parts than building beautifully layered abstractions which enable programs to just fall out of easily.

I don't agree with the author, BTW. Good code is needed in certain things. It's just a lot of the industry really tries to beat it out of you. That's been the case for awhile. What's different now is that devs themselves are seemingly joining in (or at least, are being perceived to be).

love2read 54 minutes ago|
> IMO, you need to have the capacity to write Good Code to know what Good Enough Code is. I completely agree, and its one of the biggest problem of trying to talk about "how you use agents". A lot of the people that may use the same agents with the same workflow may see wildly different results depending on their ability to evaluate the end result.

> The problem with this argument is many do not believe this sort of leverage is possible outside of a select few domains, so we're sort of condemned to stay at a low level of abstraction.

I think theres a similar tangential problem to consider here: people don't think that they are the person to create the serious abstraction that saves every future developer X amount of time because its so easy to write the glue code every time. A world where every library or API was as well thought out as the virtual memory subsystem would be an overspecified but at the same time enable creations far beyond the ones seen today (imo).

> Even the SICP authors admitted programming had become more about experimentation and gluing together ready-made parts than building beautifully layered abstractions which enable programs to just fall out of easily.

ElatedOwl 1 hour ago||
I think good code is even more important now.

People talk about writing the code itself and being intimate with it and knowing how every nook and cranny works. This is gone. It’s more akin to on call where you’re trudging over code and understanding it as you go.

Good code is easy to understand in this scenario; you get a clear view of intent, and the right details are hidden from you to keep from overwhelming you with detail.

We’re going to spend a lot more time reading code than before, better make it a very good experience.

love2read 1 hour ago||
none of this even kind of addresses why the article implies that people stopped writing good code. why are we going to spend "a lot more reading code than before"? is this an ai generated comment?
ElatedOwl 58 minutes ago|||
The author effectively argues deep thinking is dead, that people are no longer going to take the time to understand the problem and solution space before they solve it.

I think that’s untrue, I think it’s /more/ important than before. I think you’re going to have significantly more leverage with these tools if you’re capable of thinking.

If you’re not, you’re just going to produce garbage extremely fast.

The use of these tools does not preclude you from being the potter at the clay wheel.

amitprasad 54 minutes ago||
Just because you or I may invest effort into deep-thinking, it does not mean that others will.

I'm not worried about this at Modal, but I am worried about this in the greater OSS community. How can I reasonably trust that the tools I'm using are built in a sound manner, when the barrier to producing good-looking bad code is so low

love2read 46 minutes ago||
> How can I reasonably trust that the tools I'm using are built in a sound manner, when the barrier to producing good-looking bad code is so low

Honest answer: You never could.

majormajor 58 minutes ago|||
Hm? The article is pretty clear about two claims, IMO: (1) good code has been rare for a long time because the job is a pragmatic one and not a philosophical one but that sometimes "good code" pays off down the line, and (2) possibly the "pays off down the line" will be less important in the future with AI coding tools.

And the comment by 'ElatedOwl is pretty directly responding to that second idea.

willtemperley 21 minutes ago||
LLMs also make refactoring for readability, simplicity and performance far easier.

Nothing has fundamentally changed! A good solution is a good solution.

I do worry that the mental health of developers will take a downturn if they’re forced into a brain rotting slop shovelling routine, however.

So yes readability and good concise code is still important.

anonymous908213 1 hour ago||
Good code was approximately never valued in enterprise. How many companies worth billions or even trillions have webpages that take 5+ seconds to load text, and use Electron for their desktop applications? In that regard, nothing has changed.

There is still a market for good code in the world, however. The uses of software are nearly infinite, and while certain big-name software gets a free pass on being shitty due to monopoly and network effects, other types of software will still find people who will pay for them if they are responsive, secure, not wildly buggy, and can add new features without a 6 month turnaround time because the codebase isn't a crime against humanity.

On another note, there have been at least four articles on the front page today about the death of coding. As there are every other day. I know I'm tired of reading them, but don't people get bored of writing them?

ryan_n 51 minutes ago||
> I know I'm tired of reading them, but don't people get bored of writing them?

I understand the sentiment here but it shouldn't be surprising that people are upset that their profession and livelihoods are being drastically changed due to advances in AI.

love2read 50 minutes ago|||
So funny when people point at electron as if it singlehandedly makes every program unusable.

Also, I would assume there are not many significant pages on $B/Trillion companies that take 5 seconds to load text that are used frequently.

> I know I'm tired of reading them, but don't people get bored of writing them?

People never get tired of reading or commenting on commentary on their hobbies.

anonymous908213 19 minutes ago||
New Reddit and Outlook.com are two off the top of my head. It is not uncommon to be looking at a spinner for several seconds. There are other websites that are not primarily for text but are still insane. Twitch.TV, an old favorite of mine, now routinely takes 10+ seconds despite having Amazon money behind it. Youtube routinely takes several seconds to load the page, which is still unacceptable even for a video website. These sites are maintained by FAANG-tier engineers being paid mid-high 6 figures or 7 figures, who I'm sure are mostly perfectly competent, and yet they are completely dysfunctional because enterprise environments inevitably create structural disincentives to producing good code.

I use Electron applications. They are usable, for some value of the word. I am certainly not happy about it, though. I loathe the fact that I have 32GB RAM and routinely run into memory issues on a near-daily basis that should literally never happen with the workloads I'm doing. With communication-based apps like Slack and Discord where your choice of software to use comes down entirely to where the people you're communicating are, you will use dogshit because there is no point to communicating to the void on a technically superior platform.

jckahn 1 hour ago|||
> I know I'm tired of reading them, but don't people get bored of writing them?

Look, it's either this or a dozen articles a day about Claude Code.

SSchick 1 hour ago||
Good code is extremely subjective, most bad code is built on a good code foundation. And most foundational software (think linux, ffmpeg, curl, v8, etc.) maintainers are pushing back.

Once AI/Agents actually master all tools we currently use (profilers, disassembly, debuggers) this may change but this won't be for a few years.

ChicagoDave 1 hour ago||
I love the sentiment, but 40 years in the business realm of software development has taught me “good code” is never a priority for management. It’s difficult to explain good unit testing, tech debt, or just going through proper solution selection with management.

So having used Claude Code since it came out I’ve decided the resulting code is overall just as good as what I’d see in regular programming scenarios.

FjordWarden 1 hour ago||
Let management argue there case, don't do it for them.
ChicagoDave 15 minutes ago||
I am management, but now also in front of delivery because I know how to construct software.
IhateAI_3 1 hour ago||
[flagged]
ChuckMcM 51 minutes ago||
I really reasonate with this post, I too appreciate "Good Code"(tm). In a discussion on another forum I had a person tell me that "Reading the code that coding agents produce is like reading the intermediate code that compilers produce, you don't do that because what you need to know is in the 'source.'"

I could certainly see the point they were trying to make, but pointed out that compilers produced code from abstract syntax trees, and the created abstract syntax trees by processing tokens that were defined by a grammar. Further, the same tokens in the same sequence would always produce the same abstract syntax tree. That is not the case with coding 'agents'. What they produce is, by definition, an approximation of a solution to the prompt as presented. I pointed out you could design a lot of things successfully just assuming that the value of 'pi' was 3. But when things had to fit together, they wouldn't.

We are entering a period where a phenomenal amount of machine code will be created that approximates the function desired. I happen to think it will be a time of many malfunctioning systems in interesting and sometimes dangerous ways.

geraneum 35 minutes ago|
> you could design a lot of things successfully just assuming that the value of 'pi' was 3. But when things had to fit together, they wouldn't.

Apt analogy. I’m gonna steal it!

ryan_n 1 hour ago||
I wish it was silent, we've been hearing about it non-stop for the past 4 years.

I agree it is sad though. I changed careers from one I was unhappy with into software development. Part of what drew me to software was that (at least sometimes) it feels like there is a beauty in writing what the author describes as great code. It makes you really feel like a 'master craftsman', even if that sounds a bit dramatic. That part of the profession seems to fading away the more agentic coding catches on. I still try to minimize use of any LLM's when doing personal projects so I can maintain that feeling.

theK 1 hour ago||
> Good Cirquits

Afaic, people designing circuits still do care about that.

> Good Assembly

The thing with the current state of coding is that we are not replacing "Coding Java" with something else. We are replacing it with "Coding Java via discussion". And that can be fine at times but it still is a game of diminishing returns. LLMs still make surprising mistakes, they too often forget specifics, make naive assumptions and happily follow along local minima. All of the above lead to inflated codebases in the long run which leads to bogged down projects and detached devs.

somesortofthing 56 minutes ago|
I've found that Good Code is actually actively detrimental to agent performance. I suspect agent-written code is very comprehensible to agents(for example, agents love to define single-use variables because it lets them document the code without adding comments, having to read whole files, or understand novel code patterns(complex pipeline statements, for example) but is a nightmare to read. You have to keep the meanings of all the small variables in your head, so your short term memory gets overloaded with small pieces of info. I tried making the agent refactor to reduce these, but noticed a substantial increase in how often it misunderstands what the code does.
love2read 52 minutes ago|
I think what you are finding is that people's definition of "Good Code" differs the same way two people's definition of "good food" differs.
More comments...