Top
Best
New

Posted by amitprasad 4 hours ago

The silent death of Good Code(amit.prasad.me)
61 points | 69 commentspage 2
sibeliuss 2 hours ago|
> This same colleague then invested time into understanding the kernel subsystem, the exact reasons why the original C program was written how it was, and rewrote the Rust translation himself. The difference was night and day; the code flowed naturally, explained itself and the underlying subsystems, and may genuinely be some of the nicest parts of the entire codebase.

This is the point that everybody needs to calm down and understand. LLMs are fantastic for POCs _which then get rewritten_. Meaning: the point is to rewrite it, by hand. Even if this is not as fast as shipping the POC and pretending everything is ok (don't do this!) it still drastically speeds up the software engineering pipeline and has the potential to increase Good Code overall.

A perfectly reasonable rule in software organizations is: For greenfield code, LLMs are strictly required for 1st-pass prototyping (also required!). And then: Hand writes (within reason) for production code. Your company will not lose their competitive edge following this guideline, and this includes your hard-earned skills.

jmspring 1 hour ago||
I'm not sure how this guideline makes sense. LLMs are great at dumb things I shouldn't have to type but can be well defined before they write something.

This statement, makes almost zero sense - A perfectly reasonable rule in software organizations is: For greenfield code, LLMs are strictly required for 1st-pass prototyping (also required!). And then: Hand writes (within reason) for production code. Your company will not lose their competitive edge following this guideline, and this includes your hard-earned skills.

"Give me a proxy, written in go, that can handle jwt authentication" isn't your traditional crud stuff, but Claude answers that quite well.

phyzome 2 hours ago||
That sounds nice in theory but how many managers are going to tolerate a rewrite when there is something "good enough" sitting in front of them? (They can't see the tech debt and the vulnerabilities, just that it Apparently Does The Thing.)
logicprog 2 hours ago||
This feels very odd to me, because I'm actually able to refactor and DRY and generally improve my code and tests and documentation much more with agents to help speed up the process than I ever would have before.

I also make sure to describe and break down problems when I ask an agent to implement them in such a way that they produce code that I think is elegant.

It seems to me like people think there's only two settings: either slaving away carefully on the craft of your code at a syntactic level, manually writing it, or shitting out first pass vide-coded slop without taking care to specify the problem or iterate on the code afterwards. But you can apply just as much care to what the agent produces, and in my experience, still see significant speedups, since refactoring and documentation and pulling out common abstractions and so on are something that agents can do extremely reliably and quickly, but otherwise require a lot of manual text editing and compile/test passes to do yourself.

As long as you don't get hung up on making the agent produce exactly character for character, the code you would have produced, but instead just have good standards for functionality and cleanliness and elegance of design.

love2read 2 hours ago||
> Either sleeping away carefully on the craft of your code manually writing it, or shitting out first pass vide-coded stuff without really taking care to specify the problem or iterate on the code afterwards.

I think the thing you are missing is that people are

> shitting out first pass vide-coded stuff without really taking care to specify the problem or iterate on the code afterwards

to assume that people will take a path other than the path of least resistance now when they never did before, such as copy-pasting directly from stackoverflow without understanding the implications of the code.

logicprog 2 hours ago||
But that's kind of my point — there's still a choice whether to care about the quality of your code and spend time refining it or not with agentic coding as with any other technology; people who took the time to write good code before can absolutely continue to do that, and people who didn't care about good code before will not care about good code now either. It was a choice that was not the path of least resistance before, and it is still a choice that is not the path of least resistance now.

Now, there is the very valid point that those that don't care about code quality can now churn it out at vastly accelerated rates, but that didn't really feel like what the original article was talking about. It felt like it was specifically trying to make the claim that a Gentic tools don't really afford the ability to refine or improve your code or strongly discourage it, such that you kind of can't care about good code anymore. And it's that that I wanted to push back on.

BobbyJo 2 hours ago||
There has always been a tension between "take the time to build something you know will work" and "prioritize speed over all else and hope you get lucky and it doesn't fall over too fast" in software. AI is making the difference in speed between the two schools of thought larger and larger, and it's almost certain to make the latter philosophy more financially attractive.
logicprog 2 hours ago||
Yeah, I can see that. But that didn't really feel like what the original article was arguing. It felt more that it was arguing that even people who care about good code, if they use agentic tools at all, can't produce good code, and it was the advantage in the velocity of agentic tools as a whole over the production of good code as a strictly separate category that was the problem?
Gehinnn 2 hours ago||
Opus is quite good at refactoring. Also, we can finally have all the helper functions/beautiful libraries/tests that we always wanted to have. There is no excuse anymore to approximate a parser with regular expressions. Or to not implement the adapter class which makes an ugly unchangeable interface beautiful.

I believe the right use of AI makes it possible to write more beautiful code than ever before.

amitprasad 2 hours ago|
I would be extremely happy to be proven wrong! I love using agents for exploratory prototypes as well as "rote" work, but have yet to see them really pay off when dealing with existing tech debt.

I find that the flaws of agentic workflows tend to be in the vein of "repeating past mistakes", looking at previous debt-riddled files and making an equivalently debt-riddled refactor, despite it looking better on the surface. A tunnel-vision problem of sorts

lclarkmichalek 2 hours ago||
Hilarious. The code being produced previously was crap - it was just your crap. Baseline agents produce something similar, but can at least be guided, durably, towards producing less crap code.
bilinguliar 2 hours ago|
Guided by the last generation of people with the know-how.
jckahn 2 hours ago||
I've come accept that producing code I'm truly proud of is now my hobby, not my career. The time it takes to write Good Code is unjustifiable in a business context and I can't make the case for it outside of personal projects.
FjordWarden 2 hours ago||
Man am I getting tired of these articles and we can do without this neurotic melancholic whining. Maybe it is the title of the article that triggered me, but it reminded me of hearing Douglas Murray read excerpts from "The Strange Death of Europe" in his self-aggrandising pompous tone.

The authors colleague needed a couple of tries to write a kernel extension and somehow this means something about programming. If it was not for LLMs I would not have gone back to low-level programming, this stuff is actually getting fun again. Lets check the assembly the compiler produced for the code the LLM produced.

amitprasad 2 hours ago||
To be clear, I am also having the most fun I've had when it comes to side-projects and even more exploratory things at work. I don't derive all my joy from "Good Code" -- that's silly! I would much rather ship tangible products and features and/or tackle things at home that I wouldn't otherwise.

On the other hand, the other responsibilities of being an engineer have become quite a bit less appealing.

oofbey 2 hours ago||
You know what nobody misses? Good assembly code. Those were the days.
senko 2 hours ago||
I run a company called Good Code and was quite worried for half a second!
bitwize 1 hour ago||
There's just no longer any value in good code, just like there's no value in Mel Kaye's beautiful hand-assembled programs:

https://users.cs.utah.edu/~elb/folklore/mel.html

But now, reading, understanding, and maintaining the software is the job of coding agents. You are free to do the interesting work: setting goals and directions for the agents, evaluating the finished product, communicating with stakeholders, etc. This has always been the hard and interesting part of systems design: solving real-world problems for people and businesses.

thenanyu 2 hours ago||
Agents can write good code. If you don't like the way that they write code, tell them to write it differently. Do that until you think the code is good.
amitprasad 2 hours ago||
There's an opportunity-cost here. I use agents to be more productive. As many have noted, "Good Code" doesn't rank highly compared to actually shipping a product.

The tragedy, for me, is that the bar has been lowered. What I consider to be "good enough" has gone down simply because I'm not the one writing the code itself, and feel less attachment to it, as it were.

zeeed 2 hours ago||
Doesn’t the question then become “is there still an objective advantage to good code”

If the answer is yes then it’s a tragedy - but one that presumably will pass once we collectively discover it. If not, then it’s just nostalgic.

amitprasad 2 hours ago||
It's hard to say. Perhaps LLMs of tomorrow will become capable enough to fix the mistakes of LLMs today. If so, great -- I'm worried about nothing.

If not, we could see that LLMs of tomorrow struggle to keep up with the bloat of today. The "interest on tech debt" is a huge unknown metric w.r.t. agents.

zeeed 2 hours ago|||
This. There’s no limitation to your prompting. If you feed rules and patterns for clean code to a bunch of agents they’ll happily work on that level.

Just right now no one cares enough yet. Give it a year or two.

I could conceive something evolving on a different abstraction layer - say, clean requirements and tests, written to standard, enhanced with “common sense”

love2read 2 hours ago|
the rise of "good enough" was the death of "good code"
bandrami 2 hours ago|
The phrase "worse is better" was coined almost 40 years ago
More comments...