Hacker News new | ask | show | jobs
by xienze 26 days ago
Tell me your thoughts on the quality of LLM-generated code. I've never understood this attitude where people are absolutely disgusted by the slightest whiff of AI prose but will happily slurp up AI-generated code by the bucketful and proudly proclaim that it's OK because it's better than the average developer can produce.
2 comments

The key difference is that code is not the end product, but writing is itself the product. (No one's doing "vibe-product-management" for example.) Tbh, I still think code can have a beauty and elegance to it (like a logical proof can, or like a mathematical theorem can), but there's a difference between the two and I'm way less forgiving of AI writing than I am of AI code, especially considering most code (by line count) is just boilerplate anyway.
> The key difference is that code is not the end product

I think this is open to debate. To me, the code has always been the goal, and the fact that writing it sometimes serves to produce a product is important to others (and what brings the paychecks in), but ultimately not something I've ever been excited about or interested in throughout my career. So I judge a developer based on the beauty and quality of the code he produces, just as I judge an LLM by the same sorts of things.

The fact that AI can one-shot a working CRUD app is not really that interesting to me. If it could make the code beautiful, concise, maintainable, extensible, minimal, performant, readable, and bug-free: a work of art and love that a craftsman would be proud of... that would impress me.

Imo, this is like saying "I judge a carpenter based on how straight they can cut a piece of plywood." Or like saying "I judge an artist on how accurately they can draw a circle by hand."

I mean that's certainly one way of looking at it, and both can be impressive technical feats. But most people judge carpenters and artists on their end products, their overall vision, their motifs, their philosophy, and so on. On the other hand, as a trained logician, I definitely see proofs (which, by the Curry–Howard isomorphism, are computer programs) have some degree of beauty-within-themselves, but that's quite hard to achieve. Not everyone is a Gödel, after all.

I also think programming languages, despite being Turing complete (which is frankly not saying much), are far too limiting to truly construct magnificent things with.

No, it's more like saying "I judge an artist on my terms regardless of how well they sell on the market".

> artists on their end products, their overall vision, their motifs, their philosophy, and so on

The main output of programmer's work is their understanding of the system they work with, the rest comes from that. Behind the code there's its author's intention, vision, their tastes, philosophy and experience that makes them tackle problems in specific ways. Code review is, aside of quality assurance, mostly about communication between people, convincing them to your ways of doing things (or getting convinced by others) and communicating needs. It's what keeps projects running and what makes people improve their skills.

You don't need to see magnificence in code to realize that there's more to it than just the syntax tree to compile.

> No, it's more like saying "I judge an artist on my terms regardless of how well they sell on the market".

I feel like I need to push back here, because some of the best programmers around: Carmack, Torvalds, Johnathan Blow, even folks that make programming languages like K&R, Rob Pike, etc. are judged on their respective end products, not on minutia found in code reviews. For example, if I asked you "why do you think Stroustrup is a good programmer?"—you wouldn't cite some obscure optimization he came up with, but would rather talk about his overall vision for C++, his ideas of evolving C, his staunch anti-GC takes over the years (and their justification), etc.

You're contradicting yourself. First you say that they're judged on the end product, then you mention things that are very clearly not end products but thoughts and visions behind them that only lead to end products.

Frankly, I have no real idea of how good Carmack, Torvalds or Blow are as programmers, I have never worked with them so I don't really have a way to tell (even though I do contribute to Linux and I've seen some of their code). They're likely past a certain above-average threshold, but they haven't got famous for their programming skills.

That said, if you think Torvalds isn't being judged on "minutia found in code reviews", I'm not sure your take is very serious in the first place - that's the main thing he was being judged on for decades now :)

What I'm trying to get at is more like: I judge a carpenter based on how beautiful, minimal, and functional he makes a chest of drawers, not based on how quickly he can go to market with particle board and glue."
I'm not sure if your question is serious, but I've been a developer for over a decade now.

I write code for a living mostly by hand. In the odd case where I need help I still use google like I always have. I spend more of my time in meetings or staring at the ceiling than writing code. This was also true a decade ago before LLMs. It was also true several decades ago when someone else's ass was in my seat.