Live data from Hacker News

The silent death of good code

amit.prasad.me

21–30 of 105 posts

Re: The silent death of good code

#21
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.

Re: The silent death of good code

#22

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.

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”

Re: The silent death of good code

#23
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.

Re: The silent death of good code

#24
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.

Re: The silent death of good code

#25

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 trie…

[flagged]

Re: The silent death of good code

#26
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).

Re: The silent death of good code

#27
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.

Re: The silent death of good code

#29
post #2

The worst part of vibe coding, and developers as managers of "agents" AI is at best a good intern or a new junior developer. We're locking in mediocrity and continuing enshittification. "Good enough" is codified as good enough, and nothing will be good or excellent. Non-determinism, and some amount of inaccuracy on the margins continually, no matter the industry or task at hand including finance, just so we can avoid…

We’re not locking in anything, “at best a good intern or new junior developer” was maybe true at like sonnet 4 and earlier. Code is not codified it’s living. Models of tomorrow will correct the model outputs of today. At some point alarmingly soon, no one will read code just like nobody reads the assembly output of a C compiler. Non determinism and inaccuracy are also very real features of human programmers.

However if the 'non determinism and inaccuracy' of LLMs is more pathogenic than that of humans, then we have a problem. Pathogenesis is inherently a system level effect, so it may take a little time (and money!) to become evident.

Re: The silent death of good code

#30

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.

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.

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.

Post reply on HN