ZH version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
65% Positive
Analyzed from 1419 words in the discussion.
Trending Topics
#code#review#llm#human#reviewing#more#llms#don#things#writing

Discussion (39 Comments)Read Original on HackerNews
I don't know why they think this, but no? Perhaps it's badly expressed, but LLMs cut corners all the time. It's sort of their core fault really.
Anyway, I disagree with the core premise[1]. Re-writes are not cheap, because 1) code can be so bad it's unclear how to rewrite it[2], b) code can be so significant it's challenging to rewrite it (architectural choices, schemas, etc), and lastly if you're ever wanting to own your own code and not rent it from LLM companies, having it understandable by a human is still a goal worth working toward.
[1] To be fair, I think OP _might_ be talking about rewriting in the moment of the thing being built, but with some unspoken rule that once they think the change is good enough, then they are reviewing all the code? They don't make it clear..
[2] it's not even that hard. Write a test that exercises an end result and not the rule that causes that end result and 6 months later you've forgotten why the code is like that. I had to maintain a piece of software once where the primary form of tests were a bunch of snapshots of an end report being generated, based on some initial data input, mostly all unlabeled. The code was like "do this SQL query on table A and then take the second result". Why the second result? Your guess is as good as mine! I couldn't even work out why they were querying table A and not table B...
Not only did the new changes did not fix what they thought it would fix but it broke other things in unexpected ways.
I brought in two changes after that:
* I'm not reviewing/reading anything that you yourself did not read / test in the target environments properly. If all it takes is an LLM prompt, I could be issuing the same prompt to make my life easier.. and If you're sending a CL, you should be owning the code you send.
* Me being more involved in the design process so review burden itself becomes lower. A bit of pair programming from time to time helped too.
Not sure how things will turn out after this but so far they seem better.
Have you worked with LLMs??????????? “I disabled the test so it’s not run so now all the tests pass” is not a hypothetical it’s pretty common. LLMs frequently do shortcut learning. The reason why reviews are expensive is because you still need to do all the steps in order to understand if a shortcut is justified.
Also:
"I implemented it this terrible way because of precedence in the codebase...that I just wrote"
"I avoided implementing this correctly because of migration concern for existing installations of this code I'm writing right now"
"I deferred this critical feature for the future, so we can deploy quicker"
or, my favorite,
"I hand rolled an buggy http server because you said the tool should be self contained"
Human, Do you want me to do it the right way? It will cause code churn in 90 files. Or I can take a shortcut and edit 3 files in a terrible way.
Edits 90 files for 12 lines each in 25 seconds...
Or maybe they are trained that way. It’s more tokens used and more money you need to pay.
[1] Unless you're an engineer in Anthropic, so you just spend you time writing "loop".
Compare that to e.g. Martin Amis: https://en.wikiquote.org/wiki/Martin_Amis
If a human said this to me in real life, and I laughed, it would probably help build a connection with that person, as it’s signaling that we have in common an unusually strong grasp of the patterns in LLM output (unusually strong at least in comparison to the general population).
But here? I don’t gain anything by reading this comment. It only contributes to the uncertainty that anything I read on this site has any meaning at all.
Please, if you’re a human, don’t mimic LLMs on forums where the reader cannot distinguish you from an LLM without doing investigative work.
And you’re an LLM, please report to your owner that he is an ass for polluting one of the last bastions of high entropy discussion on the information superhighway.
> Nowadays every business in America says how warm it is and how much it cares — loan companies, supermarkets, hamburger chains.
Guess which one is AI and which one is a quote from Martin Amis.
The writing style AI uses has its place, but not as _every sentence_. That’s what is exasperating. At the same time, I’m happy that I can still at least identify AI prose of more-than-trivial length.
but the higher-level "should you do this?" or "check your design" - could AI do that stuff?
No way this can backfire.
> checking calling and called arguments
Like a static language compiler already does?
When I've used static analysis tools, the first run is usually helpful as you cherry pick the things that need to be fixed, but then subsequent runs are just the false positives or "only slightly a nit" kind of annoyances.
But human developers are the ones that say stuff like "Do we really have to use a database at all?" etc...
quote: "If I identify code that’s more complex than it needs to be, in my own work or in someone else’s PR"
If so, that makes a lot of sense to me. The best time to rewrite code is before it hits production.
It's like turning a code review that requests you, into a code review that requests someone else. And it tramples on the original author quite a bit too. It's hard only having the ability to add incremental value to large amounts of code, instead of large amounts of value to incremental code.