This article starts with a story from someone who tried Claude Code and found it amazing, but then switches to the same person a few months later seeing what a disaster it’s been.
-
@david_chisnall And kids, don't use LLMs for test code either! Subtle bugs in test code are just as hard to catch as in production code and that compromises your production code. Heck, don't use that shit for anything at all.
@TauPan @david_chisnall harder to find, because of lack of intent.
-
@david_chisnall And kids, don't use LLMs for test code either! Subtle bugs in test code are just as hard to catch as in production code and that compromises your production code. Heck, don't use that shit for anything at all.
@TauPan I cringe so much when I see people say 'I use it for repetitive things, like tests!'. Because writing good tests requires understanding which bits in the code are corner cases and writing tests that exercise those. I've seen LLM-generated tests with hundreds of tests for the happy path and none that trigger any of the error-handling.
I can maybe imagine a loop with an LLM and a coverage tool to get proper coverage, but then you'd need to review the tests generated by the LLMs for the corner cases to make sure you weren't just generating tests that enforce bugs in the implementation.
-
@david_chisnall “LLMs, by their nature, generate statistically plausible output." and “trained on code that made it past code review”.
<Ding!>
Bang on target.@thirstybear @david_chisnall except it is also trained on tons of shitposts and repos that don’t do code review
-
@david_chisnall Great article. I want to zoom in on the last thing he says:
‘AI is not a magic “infinity machine” that can solve all our problems… It’s a normal technology, and perhaps it’s time we start talking about it that way.’I assert that for A LOT of people, they already viewed most tech as magic even before LLMs went big. I think a lot of people ARE treating LLMs like they treat normal tech. Though when the author says it’s time WE talk about LLMs as normal tech, maybe he’s thinking of tech people and programmers as the WE, not people in general.
I think a lot of tech had already exceeded the normal person’s ability to understand and predict. So this is just really bad coincident timing for LLMs to appear. I have hope that the scales will fall off programmers’ eyes. I don’t have much hope for everyone else.
@paco @david_chisnall And then there's the problem that a lot of the general audience will assume "oh, if it had such glaring issues then the experts would not be using it or warn us about it" ... and, well ...
-
This article starts with a story from someone who tried Claude Code and found it amazing, but then switches to the same person a few months later seeing what a disaster it’s been. This quote is key:
The problem is that code produced by an AI agent looks reasonable, but can contain ‘hard-to-spot bugs’ that end up causing major problems
LLMs, by their nature, generate statistically plausible output. That is often a set that overlaps with correct output. But the things that are not correct look exactly the same as the ones they are.
Learning to review code is hard. You look for the bugs that you expect to be possible implementing it by using your theory of mind for the person writing the code and the kinds of things that they might overlook (not necessarily a specific person, but the kinds of things people miss) and also common bug classes.
And the big help is that the person writing the code is not thinking adversarially. They are not trying to sneak bugs in. Normally. Unless they’re a supply-chain attacker, and we’ve a depressing amount of evidence that code review doesn’t catch supply-chain attacks.
An LLM is not trying to do anything. It has no intent. But it is a machine that is trained on code that made it past code review. The kind of bugs that it will generate are ones that look like code that appeared in production. This is exactly what an attacker would do: try to write code that looks correct but is subtly wrong.
I’m only being slightly flippant when I say LLMs are a mechanism for bringing supply chain attacks in house.
@david_chisnall i am really getting sick of posts and articles blaming AI where actually the humans and managers are to blame.
-
You make a very key point, which is the one I try to convey to non-technical people I speak to about the risks of this stuff.
Some systems are trained to be correct. That is the training objective.
Some systems are trained to look correct, to get past a forgery spotter. That isn't the same as being trained to be correct.
This is a subtle (or not!) difference between say an LLM and post code hand writing classifier in the mail system.
This does "click" with most of the people I try to convey this diifference to.
@rzeta0 @david_chisnall Arguably this evasion of which you write has just happened with theorem provers.
-
@david_chisnall Great article. I want to zoom in on the last thing he says:
‘AI is not a magic “infinity machine” that can solve all our problems… It’s a normal technology, and perhaps it’s time we start talking about it that way.’I assert that for A LOT of people, they already viewed most tech as magic even before LLMs went big. I think a lot of people ARE treating LLMs like they treat normal tech. Though when the author says it’s time WE talk about LLMs as normal tech, maybe he’s thinking of tech people and programmers as the WE, not people in general.
I think a lot of tech had already exceeded the normal person’s ability to understand and predict. So this is just really bad coincident timing for LLMs to appear. I have hope that the scales will fall off programmers’ eyes. I don’t have much hope for everyone else.
@paco @david_chisnall This closely correlates with "software development proficiency is not necessarily correlated with proficiency in general systems theory, cognitive science, or pushing the limits of human consciousness itself", the latter of which is not carte blanche to treat Esalen Institute outputs uncritically
-
@ChemicalEyeGuy @david_chisnall I'm particularly fond of the term "cognitive knotweed" at the moment, though I usually tend to employ a C-word...
-
@TauPan I cringe so much when I see people say 'I use it for repetitive things, like tests!'. Because writing good tests requires understanding which bits in the code are corner cases and writing tests that exercise those. I've seen LLM-generated tests with hundreds of tests for the happy path and none that trigger any of the error-handling.
I can maybe imagine a loop with an LLM and a coverage tool to get proper coverage, but then you'd need to review the tests generated by the LLMs for the corner cases to make sure you weren't just generating tests that enforce bugs in the implementation.
@david_chisnall @TauPan I cringe too when people say “I use AI to write boilerplate” and I think isn’t that what a framework is for? This is primarily in the Ruby on Rails space too… -
This article starts with a story from someone who tried Claude Code and found it amazing, but then switches to the same person a few months later seeing what a disaster it’s been. This quote is key:
The problem is that code produced by an AI agent looks reasonable, but can contain ‘hard-to-spot bugs’ that end up causing major problems
LLMs, by their nature, generate statistically plausible output. That is often a set that overlaps with correct output. But the things that are not correct look exactly the same as the ones they are.
Learning to review code is hard. You look for the bugs that you expect to be possible implementing it by using your theory of mind for the person writing the code and the kinds of things that they might overlook (not necessarily a specific person, but the kinds of things people miss) and also common bug classes.
And the big help is that the person writing the code is not thinking adversarially. They are not trying to sneak bugs in. Normally. Unless they’re a supply-chain attacker, and we’ve a depressing amount of evidence that code review doesn’t catch supply-chain attacks.
An LLM is not trying to do anything. It has no intent. But it is a machine that is trained on code that made it past code review. The kind of bugs that it will generate are ones that look like code that appeared in production. This is exactly what an attacker would do: try to write code that looks correct but is subtly wrong.
I’m only being slightly flippant when I say LLMs are a mechanism for bringing supply chain attacks in house.
AI allows a lazy programmer's reach to far exceed what they are able to grasp.
They can, and do, ask AI to create things they can't figure out how to create themselves, and the end result is therefore incomprehensible to them.
If their new zero day runs without core dumping their code review consists of scheduling a tee time.
Many LLMs were trained by indiscriminately gobbling up GitHub. The end result is that the most probable code for any given problem is likely to be the most common associated coding error, rather than the correct solution.
The primary defect in LLMs is that they are retrospective.
I think of this as degenerative AI.
The K-hole Villionaires who promote them claim they will cure cancer which would only be possible if somebody already cured cancer and the cure had somehow been concealed from us all by the multi-billion dollar cancer treatment industry colluding with shadowy government agencies to suppress the truth on behalf of Space Aliens and yet the document explaining the cure had somehow been published on the Internet by a disgruntled researcher hoping to make a quick buck by selling it to anyone who had $9.95 and no common sense at all and clicked the link below and then the cure was hoovered up by the largest intellectual property theft in history only to be revealed to somebody who wrote the right prompt.
The jobs AI will replace first are the jobs of the people who rely on AI too heavily to do their jobs.
The companies AI will destroy first are the companies who rely on AI too heavily to replace their employees.
The Villionaires AI will bankrupt first are the Villionaires who rely on AI too heavily to prop up the stock price of their rocket companies.
AI is powerful, but so is dynamite.
The fuse is burning down.
-
@cholling @david_chisnall from this amount I’m 90% certain.
@hbons @cholling @david_chisnall Cal Newport has written like that for a long, long time.
-
@rzeta0 @david_chisnall Arguably this evasion of which you write has just happened with theorem provers.
I'm no expert but my naive under is that theorem provers are designed to be correct...
.. and some people are using Llama to "search" for candidate proofs which are only given credibility once they pass a theorem provers check.
In this sense the output of an llm is filtered by a "correctness filter".
I may not like this workflow but if it advances human knowledge then there may be a case for it, subject to environmental and other ethical concerns.
Did I misunderstand your observation?
-
@david_chisnall @TauPan I cringe too when people say “I use AI to write boilerplate” and I think isn’t that what a framework is for? This is primarily in the Ruby on Rails space too…
-
@david_chisnall That's (on of) my concern(s) with LLM submissions too.
It's going to be so much more work to review them than reviewing human submissions, and at the same time the payoff is less valuable. Human submissions, even if they're flawed at first, may result in a new contributor. Reviewing LLM submissions will not grow a new contributor.@david_chisnall @kp and you have to do those harder reviews much faster because tomorrow - ding! - another 10,000 line PR just dropped.
-
@david_chisnall i am really getting sick of posts and articles blaming AI where actually the humans and managers are to blame.
@Okuna @david_chisnall "Guns don't kill people, people kill people" vibe
-
This article starts with a story from someone who tried Claude Code and found it amazing, but then switches to the same person a few months later seeing what a disaster it’s been. This quote is key:
The problem is that code produced by an AI agent looks reasonable, but can contain ‘hard-to-spot bugs’ that end up causing major problems
LLMs, by their nature, generate statistically plausible output. That is often a set that overlaps with correct output. But the things that are not correct look exactly the same as the ones they are.
Learning to review code is hard. You look for the bugs that you expect to be possible implementing it by using your theory of mind for the person writing the code and the kinds of things that they might overlook (not necessarily a specific person, but the kinds of things people miss) and also common bug classes.
And the big help is that the person writing the code is not thinking adversarially. They are not trying to sneak bugs in. Normally. Unless they’re a supply-chain attacker, and we’ve a depressing amount of evidence that code review doesn’t catch supply-chain attacks.
An LLM is not trying to do anything. It has no intent. But it is a machine that is trained on code that made it past code review. The kind of bugs that it will generate are ones that look like code that appeared in production. This is exactly what an attacker would do: try to write code that looks correct but is subtly wrong.
I’m only being slightly flippant when I say LLMs are a mechanism for bringing supply chain attacks in house.
@david_chisnall I've been saying a version of this for years (though much less eloquently). It also applies to technical writing in any field.
On LLMs' having intent - yes, they don't, but arguably they always produce bullshit: https://link.springer.com/article/10.1007/s10676-024-09775-5
-
@david_chisnall Sorry, but this article is not a good source. There is nothing stated about the bug(s) and the narrative is the dev has brought 2 bugs to prod in 6 months and was threatend to be fired. That alone does not sound plausible. The rest is the usual fear mongering. As if subtile bugs is something new.
@demiurg @david_chisnall Production being down can lose you millions. I know someone who caused that (before slop generators) but suffered no consequences.
-
@thirstybear @david_chisnall pretty sure your style is better than this.
@hbons @thirstybear @david_chisnall Just in case introduce some spelling errors.
-
I'm no expert but my naive under is that theorem provers are designed to be correct...
.. and some people are using Llama to "search" for candidate proofs which are only given credibility once they pass a theorem provers check.
In this sense the output of an llm is filtered by a "correctness filter".
I may not like this workflow but if it advances human knowledge then there may be a case for it, subject to environmental and other ethical concerns.
Did I misunderstand your observation?
@rzeta0 @bms @david_chisnall That was probably a reference to the recent incident in which a LLM exploited a bug in the theorem prover to make it accept an invalid proof as valid.
-
This article starts with a story from someone who tried Claude Code and found it amazing, but then switches to the same person a few months later seeing what a disaster it’s been. This quote is key:
The problem is that code produced by an AI agent looks reasonable, but can contain ‘hard-to-spot bugs’ that end up causing major problems
LLMs, by their nature, generate statistically plausible output. That is often a set that overlaps with correct output. But the things that are not correct look exactly the same as the ones they are.
Learning to review code is hard. You look for the bugs that you expect to be possible implementing it by using your theory of mind for the person writing the code and the kinds of things that they might overlook (not necessarily a specific person, but the kinds of things people miss) and also common bug classes.
And the big help is that the person writing the code is not thinking adversarially. They are not trying to sneak bugs in. Normally. Unless they’re a supply-chain attacker, and we’ve a depressing amount of evidence that code review doesn’t catch supply-chain attacks.
An LLM is not trying to do anything. It has no intent. But it is a machine that is trained on code that made it past code review. The kind of bugs that it will generate are ones that look like code that appeared in production. This is exactly what an attacker would do: try to write code that looks correct but is subtly wrong.
I’m only being slightly flippant when I say LLMs are a mechanism for bringing supply chain attacks in house.
@david_chisnall “LLMs, by their nature, generate statistically plausible output. That is often a set that overlaps with correct output. But the things that are not correct look exactly the same as the ones they are.”
LLMs optimize for verisimilitude, not veracity.