Reviews have become expensive, rewrites have become cheap
Posted by arzh2 1 day ago
Comments
Comment by dmitrig01 1 day ago
Comment by netsharc 1 day ago
Compare that to e.g. Martin Amis: https://en.wikiquote.org/wiki/Martin_Amis
Comment by latentsea 1 day ago
Comment by jamesknelson 1 day ago
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.
Comment by verall 1 day ago
Comment by latentsea 1 day ago
Comment by ahartmetz 4 hours ago
Comment by hurtigioll 1 day ago
Comment by girvo 1 day ago
Comment by bartvk 1 day ago
Comment by defen 1 day ago
Comment by DiscourseFan 1 day ago
Comment by ShinyLeftPad 1 day ago
Comment by gobdovan 1 day ago
> 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.
Comment by rogerrogerr 1 day ago
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.
Comment by addingfriction 1 day ago
Comment by watwut 1 day ago
Comment by SCdF 1 day ago
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...
Comment by ben_w 1 day ago
I think this is a matter of perspective about what counts as "cutting corners".
I think they look like you describe only because they have limited competence; this is on the basis that when I asked one to make a fusion reactor simulator (to see if it could) by using open source plasma physics libraries which it had itself suggested at the start of this process (e.g. WarpX), it didn't take the "lazy" option of actually using those libraries, it tried to write its own plasma physics simulation from scratch "as a fallback if we can't install the libraries".
As it was not sufficiently competent, the resulting "simulator" was hilariously wildly unphysical.
Would have been much better if it had been lazy.
To your deeper point: I agree. In this case it made so much of a mess that there was no point trying to rescue it; as it was done from scratch, throwing it away and starting again was fine*, but if this had been pushing commits that got interleaved with real work on the main branch of an existing project it would have been a serious issue.
* or in my case, not even bothering to start again. Like I said, this was done to see if it could.
Comment by elefanto 1 day ago
Comment by ben_w 1 day ago
Can plan… just not well. Can code… just ok. Can do TDD… just most of the time.
Definitely none of these well enough to be a dark factory though.
Comment by elefanto 23 hours ago
Comment by ben_w 22 hours ago
Certainly.
LLMs have superhuman attention, and are so cheap that they can be left running for absurdly long outputs. Despite this, still not high on the competence scale (yet*).
A human doesn't output a few million tokens every day, not even counting our inner monologues, but the AI asymptote to an upper bound of quality somewhat worse than a senior human.
* I would like to have a new job before they reach this point. Got a mortgage to repay.
Comment by LoganDark 1 day ago
The nature of probabilistic sampling practically guarantees that corner cutting is always just a few samples away. Certain sampling strategies can mitigate this, but there's no way to fully eliminate it, without fully eliminating it from the training data and guarding against it during training. Model reasoning can help by giving the model space to draft and review its approach before it executes, but models still aren't guaranteed to follow their own thinking. A mistake or shortcut can always simply slip in during generation and it won't always be caught and corrected.
Comment by ben_w 22 hours ago
If it were that bad, 100% of chat with AI would look like this comment I'm writing
Comment by LoganDark 22 hours ago
- Good logits and sampling strategy can make cases like those exceptionally unlikely -- sufficiently so for one to assume it won't realistically happen.
- Once a bad path is sufficiently taken, it tends to be a lot more likely to continue.
This leads to real-world advice:
- If a model refuses your request, do not argue with the refusal; edit your original message or otherwise regenerate -- the presence of refusal tells the model it should continue refusing.
- More generally, don't allow the model context to get contaminated with behavior or commands you don't like -- describing what to do is more effective than describing what NOT to do.
- It's rude to push unreviewed model outputs onto others.
I'm not saying corner-cutting is a thing that is necessarily all over the place (even though there are countless examples in the wild). I'm also not saying it always results in random stops, or that doing one thing bad makes everything else bad. What I'm saying is that bad decisions could be hidden anywhere, at any time, even if everything else looks fine. Such is the nature of current LLMs.
Comment by ben_w 21 hours ago
no they demonstrably self correct with injected bad tokens
> - If a model refuses your request, do not argue with the refusal; edit your original message or otherwise regenerate -- the presence of refusal tells the model it should continue refusing.
wish i could do that with humans :P
> - It's rude to push unreviewed model outputs onto others.
Yes but that's not why.
Same real-world advice applies to stuff random fresh graduates make. I remember being one of those.
The incompetence is why.
Comment by heisgone 23 hours ago
Comment by saidinesh5 1 day ago
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.
Comment by jkrejcha 1 day ago
Comment by usernametaken29 1 day ago
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.
Comment by nomel 1 day ago
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"
Comment by bot403 1 day ago
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...
Comment by tobyhinloopen 1 day ago
Done after my potty break
Comment by verall 1 day ago
This one grinds my gears so bad, probably 1/4 of my job at this point is telling an LLM (either in my own editor or in review comments for someone's MR) "how about we do this right _before_ merging it, eh?".
Or:
foo = abc
<Maybe 4-10 lines of code>
if foo != None:
...
In my experience giving it "rules" not to do this does nothing, but a separate pass (could be by a different model but really just fresh context is enough) does okayComment by nomel 17 hours ago
I really wish there was an "every x tokens" type trigger for every agent, where I could have it fire off a "Pause, go read the guide to make sure you're adhering fully." To help keep concepts fresh in context.
Comment by bcrosby95 1 day ago
Comment by JodieBenitez 1 day ago
I've never seen that though.
Comment by dap 1 day ago
Comment by geraneum 1 day ago
Or maybe they are trained that way. It’s more tokens used and more money you need to pay.
Comment by drudolph914 1 day ago
Comment by mpweiher 1 day ago
And the rewrite can only reliably solve the problem if you understand the problem, and even then it's obviously not a guarantee.
If you have a huge blob of code that nobody understands then re-generating a new blob of code that nobody understands is unlikely to solve the problem.
That said: I've always been a fan of optimistic rather than pessimistic merging, at least for human-generated code.
Comment by arcanemachiner 1 day ago
An incomprehensible source of truth is still a source of truth.
Comment by mpweiher 16 hours ago
Alas in incomprehensible source of false is not a source of truth.
¯\_(ツ)_/¯
Comment by tabs_or_spaces 1 day ago
This is a severe misunderstanding in how LLMs work..
I don't know how this got on my front page....
Comment by eschneider 1 day ago
Comment by rixed 1 day ago
Comment by Analemma_ 1 day ago
Comment by zarzavat 1 day ago
Comment by cadamsdotcom 1 day ago
Say you discover in review that your agent wrote code before tests. A file that was added, no corresponding test file.
Tell the agent to read in the file, delete it (or roll back), then reimplement using red/green TDD.
Claude can test-drive an identical reimplementation but this time by writing red tests and making them green. Now you have coverage that you KNOW covers the code because you watched those tests fail before they passed.
Going further I added a note to my `/review` command so the agent looks for this mistake for me in its self-review. If it finds uncovered code it makes a plan which includes the delete-reimplement trick. Now all I do is approve that plan - no hunting needed, no explaining, no repeating myself.
You could even put this in a Ralph Wiggum loop and give yourself super high quality tests by going file by file.
Comment by hintymad 1 day ago
[1] Unless you're an engineer in Anthropic, so you just spend you time writing "loop".
Comment by bob1029 1 day ago
The compiler does a lot of heavy lifting in the codebases I work with. Strongly typed languages seem mandatory if you want to use an LLM. Worrying about every symbol is too much. Let the CPU get hot for a few seconds on the paranoia and stay focused on the minimap.
Comment by m463 1 day ago
but the higher-level "should you do this?" or "check your design" - could AI do that stuff?
Comment by lericzhang 1 day ago
Comment by ShinyLeftPad 1 day ago
No way this can backfire.
> checking calling and called arguments
Like a static language compiler already does?
Comment by m463 1 day ago
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...
Comment by shepherdjerred 1 day ago
Comment by ares623 1 day ago
Comment by rob74 1 day ago
Comment by dv_dt 1 day ago
Comment by nnevatie 1 day ago
Comment by hluska 1 day ago
Comment by bryanlarsen 1 day ago
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.
Comment by joshka 1 day ago
Comment by nryoo 1 day ago
Comment by YuriiKholodkov 1 day ago
Comment by simianwords 1 day ago
Comment by bryanlarsen 1 day ago
Comment by simianwords 1 day ago
My knowledge + Claude is much better than just my knowledge.
I don’t know why it is considered strange to use both tools (my knowledge plus Claude) to make reviews go quicker. In fact it is highly dogmatic to not use Claude while reviewing.
Comment by CBLT 1 day ago
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.
Comment by happytoexplain 1 day ago
Comment by gravypod 1 day ago
Comment by g-b-r 1 day ago
Comment by cyanydeez 1 day ago