Linus Torvalds shares his thoughts on Anti-AI coding rules
(midwest.social)
(midwest.social)
The only intelligent people that I trust are those that use drugs and drink until they drop!
If you deny to consume those things than you ate dumb!
What? It's obvious that it can lead you to a downwards spiral, into alcoholism, a life of mental problems and struggles? Create a toxic environment around you, make your family worry and suffer because of those actions? Makes the world a even worse place? Oh well that's on you being weak, you should've been smart and know how to use the things well.
It's weird that you only trust people who take drugs to exess and harm.
I too only trust people who take drugs, but not those who harm themselves and those around them with excess. Caffeine, prescription drugs, recreational drugs too if they don't do as you suggest, those are fine.
I don't really trust anyone who would turn down a vaccine or antibiotic. Those people are even worse than the heavy drug users. They take neurotic beliefs to the point of harm even worse than the "destroy the family with drug use" people.
Why does everyone who starts using AI always devolve into posting like this?
it's crack for burnt out programmers who don't enjoy the process of creating software anymore. You get to have results without putting in any work of your own. In corpo-world where everything is a metric, outputting massive amounts of code quickly and effortlessly is a great thing. For the others who actually enjoy making something it's a useless tool.
We're all being hypnotized by aliens who have replaced our political leaders and oligarchs, and now they're using LLM chat hypnosis to take over the next tiers of society. /s
Lol, I could kind of understand (not really support) his use of AI. While I doubt it's something you can do for long without starting to make compromises, people who were a really good programmers before will probably use it responsibly for a while, until their skills inevitably erode and (more importantly) their willpower slowly runs out.
But this argument made me loose all my respect for him. It's so utterly stupid. I hate it when i have to check my assembly code line by line, because it's not guaranteed that the compiler will compile the same code I've written deterministically, and basically just randomizes what it outputs. Or when my editor does not save what I typed, and instead decides based on a random language statistics what to actually save, so I have to double-check my text word-by-word every time.
Oh, wait. No, because the tools are deterministic, and that doesn't happen. But of course, adding randomness into your workflow, where you have to focus and review everything line-by-line, is the same as using deterministic tools, lol.
His point is that an LLM is just another tool for increasing productivity, the same as a compiler or IDE. The quality of the code is the only metric that should be judged.
people who were a really good programmers before will probably use it responsibly for a while, until their skills inevitably erode
Damn, dude, I had mad 6502 assembly skillz in 1985, I could even write it out by hand - pencil on paper, and those slowly eroded through use of compilers for higher level languages until my last assembly experience in 1996, today... I'd be learning everyhing specific to assembly code from scratch. I guess I'm just useless now.
the people I respect and call intelligent are not the ones that shy away from using new and interesting tools.
Gotta agree there. We had two clear camps of programmers before LLM agents came along, and the camp I least enjoyed reviewing the code of before (and now) of is the camp that resisted adoption of new interesting tools the most loudly.
I think there is no equivalency between compilers and other tools, and LLMs. As the comment states, they are just the statistical prediction of what would come next. Compilers may sometimes give unexpected outcomes, but they are working to a defined set of rules and there is potential to see how they actually came to that outcome and address it.
Added to this is the prevalence of people thinking that LLMs can allow them to do anything, whether or not they understand it, it's even sold like that. In my own organisation I have an operations manager thinking he can make pages for our Intranet - where does it store the data? How is access controlled? So many basic questions that an actual programmer would know to think of. Sure you can just keep asking people if they can fly a plane and maybe one will do well enough that they get you all the way there, till it comes to landing and it's too late - maybe better to just ask a pilot to do it.
Our software engineers use it really well, they can read what it's outputting to understand if it's wrong, they know how to prompt it to avoid issues, they use it for snippets and fixes and that it won't just write a whole program. However, it's benefit to us (and the world) is nowhere near worth the monetary and environmental cost. The investors pouring in money are hoping they can be the company that people become reliant on, so they can survive the bubble and their ultimate goal of replacing real people.
Added to this is the prevalence of people thinking that LLMs can allow them to do anything, whether or not they understand it
1971, Willy Wonka and the Chocolate Factory depicted a computer which could (but was refusing to for comedic effect) predict the location of the remaining golden tickets. There were, and probably still are, a shocking number of people who believe that was a realistic scene.
I have an operations manager thinking he can make pages for our Intranet - where does it store the data? How is access controlled? So many basic questions that an actual programmer would know to think of.
Option 1: hold his hand and educate him on what he lacks
Option 2: let him flounder and make fun of his mistakes (the making fun part should be done anonymously if you value your job)
Option 3: he's bright enough to ask the important questions to you or the LLM and get reasonable answers
Option 3 has a very realistic chance of working, if 1) you have documentation for how you do these things today - even informal documentation, anything the LLM can read and extract the relevant patterns from, 2) the LLM must have access to that documentation, and 3) your manager needs the patience and perseverence to work the discovery process until it's viable and sustainable.
Odds are, your operations manager is going to fall short on the patience and perseverence dimensions and offload the boring parts to you, after all why did he become a manager in the first place?
maybe better to just ask a pilot to do it.
Yeah, except you can't make nightly backups of the plane's passenger manifest. If you're not making nightly backups, you're already in catchup territory LLM or no.
it’s benefit to us (and the world) is nowhere near worth the monetary and environmental cost.
I suggest doing a little research into what exactly the monetary and environmental cost of YOUR usage is. People engaged in low-value usages (too many to even begin to imagine, Rule 34 needs expansion to start to cover them) are burning a lot of un-necessary tokens.
What I have read, consistently from various sources, is that my $20/month Claude code subscription burns $11 to 12 in electricity to serve my responses. My house burns over $13 in electricity per day in the summer, mostly for the air conditioning.
"Deterministic" compilers and reproducible builds are actually fairly difficult problems. (Yes I know technically the compiler is deterministic, but AI is also technically deterministic since you can set the seed).
There is a clear line between deterministic code and what comes out of an LLM. One of the bigger problems there is that LLMs have a rather large "context window" they operate from, and human operators don't readily "grok" how the content of that context window enhances and degrades the desirability of the outputs you get.
I almost exclusively use LLMs to generate, review and test deterministic code, then use that code for "the real tasks" with zero LLM involvement. The output of LLMs is still unpredictable, but once they've "said" something valuable, recognizing and using that value is a deterministic activity.
It's not just about being deterministic. A compiler crucially follows clearly defined formal rules on what is a correct output given some input, which the programmer can fully rely on.
which the programmer can fully rely on.
Most of the time, today. Mid 90s I was constantly checking compiler output for bugs, and finding them. Early 90s the compiler bugs were finding me, particularly in Borland Turbo C++. I turned off the linker optimizer in 1992 and couldn't turn it back on until 2008 without getting difficult to identify bugs.
You can add deterministic testing to AI output though?
Indeed, my code has never been more rich in unit tests now that coding assistants make them so easy to add. If the coding assistant subsequently does something weird that changes program behaviour it knows immediately.
Indeed, my code has never been more rich in unit tests now that coding assistants make them so easy to add
Me as well. A year ago there was significant trouble with those unit tests not adding much value but that has improved a lot over the past several model updates. The unit tests aren't 100% as good as they could or even should be (neither are human generated unit tests that take 10x as long to add) - but in terms of time invested vs value derived, they're excellent value for effort.
If the coding assistant subsequently does something weird that changes program behaviour it knows immediately.
About 90% of the time for me now, in Opus 5.5.
What do the tests do?
They check to make sure that the code continues producing the expected results. For example if I had some code that added up numbers, I might have a unit test that calls that function with the parameters "2" and "2" and checks to make sure the result is "4". If something changes that makes it start returning something else then a flag is immediately raised.
Are these tests written by AI? Have you reviewed the tests? Do they cover all code paths and all the possible inputs and outputs? Do the tests have requirements cited (traceability)?
Unit tests have been around for a long time. They tended to be under-utilized in the past because they're such a maintenance headache - changes / improvements in the production code that used to be a simple 5 minute thing can easily balloon to an hour or more of headache in necessary adjustments to perfectly good unit tests for "the old way" that happened to be impacted by the change.
Unit tests are a good way of keeping under-experienced programmers from accidentally breaking old things as they work on new things. They are VERY appropriate tools for LLM agent assisted development.
Absolutely not. In a world where hallucinating machines are writing code, humans should be writing the tests at a bare minimum.
AI writing code to pass tests written by AI will get people killed.
Wouldn't it be just... writing code yourself? It's just instead of writing what you want directly you are writing tests for it.
But you really should be writing those tests regardless of whether or not you or an LLM ends up writing the actual code. That helps ensure that the code actually does what you think it does, and prevents bugs or unintended changes in behavior from sneaking in later when something changes
Well, depends. My thousand-line pet project does not need any tests, it needs to be feature complete and never touched again.
Bigger projects are usually ones where multiple people are contributing and having code that practically nobody wrote there is a huge problem on it's own in my opinion, even if it passes a number of tests. Good tests themselves are usually harder to write than the code they are testing, I am not sure if delegating the actual fun part of development to an LLM and doing "chores" manually is a good idea.
instead of writing what you want directly you are writing tests for it.
LLMs write pretty good requirements, specifications, code, and automated tests from chat sessions. You do need to keep an eye on what it's writing to make sure it's not hallucinating, but hallucinations have been reducing in practice rather dramatically across the last 12-18 months of model development. They still happen, you will always need to guard against them, but usually a quick read of what is written followed by a quick test of the product will find the worst offenders. In the end, you need to check the final product to be sure it does EXACTLY what you want, just like you always did. And, it's still a good idea (and as possible as ever) to keep the product modularized and also check every module to ensure it works as you want. How small you make those modules has always been a matter of preference / dictated by levels of concern, etc.
If you are generating tests with an LLM, it's not deterministic.
Also, have you actually read anything an LLM wrote that's longer than a hundered words? It's usually immediately obvious. In the open source world things I keep seeing are exchanges like this one. And Niri is a fairly good case with it's maintainer actually reading the PRs and catching all the bullshit that an LLM spits out. Very often nowadays people will also do reviews with an LLM and this sort of stuff will just accumulate in the codebase with nobody to reject it.
But even if it was as useful as big tech paints it to be, I'll always be against using it based purely on morals. There is an enormous number of issues in that regard, most importatnly LLMs literally kill people both directly and indirectly. Condoning the adoption of this technology is either being ignorant or misanthropic.
If you are generating tests with an LLM, it’s not deterministic.
Once the tests are generated, they have become deterministic - unit test code is checked in alongside the repository, CI (continuous integration) systems can prevent the code from merging to main branch until all CI tests pass. No LLM is involved in the test execution process, and if all LLMs stop functioning tomorrow, the tests still work just like they did before.
read anything an LLM wrote that’s longer than a hundered words? It’s usually immediately obvious
About 250,000 lines of code so far, and no... I don't read it all - my personal music player isn't that important, I just care that it works. Other more important projects I have read every single line. Even in the music player I have read a few hundred lines and skimmed a couple of thousand. Yes, the style is obvious. It's what you might call "too complete" attempting to cover lots of edge cases that a human would usually neglect, though as human code is maintained over the long haul, it tends to mature in that direction. And just because it's very complete doesn't mean it's perfectly correct, and that's a major point of conflict with me and LLM code, I'm constantly asking it to simplify because the complexity is easy to hide mistakes in. You know what happens when you ask it to simplify? It simplifies.
people will also do reviews with an LLM and this sort of stuff will just accumulate in the codebase with nobody to reject it.
That's a management / maturity problem. As new as all this stuff is, it's virtually inevitable there will be an adjustment process. Our company runs on processes and procedures, they average 50 pages each and there are thousands of them. I am given almost 100 of them to "train on" on a near annual basis - whenever they get revised. No way in hell can I do an accurate review of 5000 pages of intertwined procedures, not code, natural language work instructions. LLMs can. LLMs are. Simple questions to an LLM like: "review this procedure, is it internally self consistent" will find issues, real issues - usually minor - but undeniable when you read the review, the problem it describes is absolutely present in the document, page 14 says "X" and page 23 says "not X" and the context is basically identical - so which are we really supposed to do: "X" or "not X"? Well, that depends. Depends on what? Additional context and detail that the already too long 50 page procedure doesn't address. We just did an internal audit which turned up thousands of these mostly little issues. Addressing them is going to be... interesting. We've been in business over 70 years, we know we're not going to tackle it all in a single year, there will probably be a plan to work down the worst of the issues, then a second round for additional polish, of course corrective actions to ensure that we at least don't make things worse along these metrics with future changes... I bet by 2035 we'll have 90%+ of today's real observations fully addressed.
LLMs literally kill people both directly and indirectly
As does nearly every activity of life, both in human society and the natural world.
Why the are you getting more text than you can physically review at your job? That sounds like a recipe for poor reviews. How are you sure LLMs are not missing anything if nobody actually has the time to read through all the text? Why does the text that gets to a developer contain logical mistakes in the first place? Back at my last job we had people assigned to collecting feature requests, talk them through with whoever wanted the feature implemented and produce proper specifications that developers would implement without wasting time on specifications containing garbage.
As does nearly every activity of life, both in human society and the natural world.
Yea, all people who drank water died. Not a very good argument. Most things don't have a mental disorder named after them. If I leave a webpage with a calculator running unattended it won't magically persuade a random visitor into commiting suicide. Webpages with LLM-powered chatbots are doing just that. You may choose to neglect it, but to me it sounds like adding lead to your gasoline. Yea, your car runs better. Are you sure it's worth it, though?
This is a seriously weak and narrow argument. First off, the parallel drawn with existing tools is shallow. When was the last time an editor or a compiler promised to replace employees? Which of those notably accelerates climate catastrophe? Which one of those is the biggest theft of labor in the history of humanity? Everything is political. Externalizing the social and environmental cost of the major LLMs is taking a clear stance in favour of the late stage capitalistic tech empires currently taking shape.
I thought it was devastating to lose Steve Yegge to AI psychosis. But damn. This is... unspeakably bad. Like if the guy in charge of the CDC decided Tylenol caused autism or like if the guy who controls the U.S. military decided it was a good idea to bomb Iran.
It just goes to show that 'everything is only as strong as its weakest link'
If everyone you thought was smart are disagreeing with you, perhaps take another look at your position on the matter? Might be a reason beyond spontaneous mass "psychosis."
or consider not putting people on pedestals.
If everyone you thought was smart are disagreeing with you...
Plenty of people I thought were smart before the AI bubble started think of AI as I do today.
Big “100 physicists have signed a letter saying you’re wrong, Mr. Einstein” energy.
This also assumes that TootSweet is Einstein in this scenario, rather than just some guy on the Fediverse. If he's got cred on par with Steve Yegge or Linus Torvalds the comparison might hold some weight, but I'm dubious about that.
No. Not that one.
There’s a story that a reporter said to Einstein “100 physicists have signed a letter saying your theory of relativity is wrong” to which Einstein replies “if they were right, it would only take one.”
Apocryphal or not, the point remains that truth is not a democracy. If a million people say AI is great, it doesn’t make it so — even if one of those people is the primary maintainer of the the Linux kernel.
And billions of people eat at McDonald’s, but that doesn’t make a hamburger better than a steak. Or any more ethical.
This is still assuming that TootSweet is equivalent to Einstein here.
And is Linux equivalent to McDonald's in this scenario? The analogy is becoming rather unclear.
Linus says he only cares about quality and refuses to make a hardline rule explicitly banning LLMs in all contexts
This is... unspeakably bad
Man, genuinely... how do people not understand why nobody takes the Anti movement seriously?
How do you not understand that code quality alone is not a good measure for viability?
Take ZFS, for example. It is inarguably a good filesystem, and its code is... well, it's not bad, so let's quantify it as good, or good enough. But it's still poison for the Linux codebase, because of its conflicting license.
Or take sweatshop labor, or slavery. Would you accept "good" code written under duress?
"AI is just a tool." No. Machine learning algorithms are a tool. LLMs are an ecosystem, composed of agents, models, infrastructure, continuous labor to maintain the models updated, and more. And like in biological ecosystems, the worst performing factor determines the maximum health score, which for LLMs is "unethical as fuck."
Linus may be smart about OSes and seems competent about project management, but I wouldn't trust him to give me medical advice, and his opinion on AI is also wrong.
Well, it was nice while it lasted.
*slaps an orange flag over the tux sticker on my laptop*
2027 will be the year of the NetBSD desktop, guys!
I'm switching to haiku.
I plan to put Haiku on my old ThinkPad; but the lack of even a lock screen in the OS sadly makes it unsuitable for my main machine.
He's drunk the AI Kool-Aid.
That's a good thing, it was Flavor Aid that was laced with poison in Jonestown.
For me the most criticism against AI is rather criticism against Big Tech. AI itself however doesn't have to inherently come from Big Tech so banning it wouldn't really be reasonable for something like the Linux Kernel.
Of course! But also, AI shouldn't be used to simply generate code. It should assist human developers into solving problems like figuring out why your code won't build, or why certain errors occur or detect bugs.
Why? Because if everyone starts using AI to generate code, you lose experienced developers who will understand what's happening in the first place. You lose the expertise. And that's a big problem.
Yeah, and as I understand it that's what Linus wants people to do. So banning AI would not allow this to happen when working on kernel code.
It doesn't inherently have to come from big tech, but currently there's nowhere else to get it, soooo...
Maybe we ban it now and then revisit all this after small open source local models are actually useful for anything?
Not true. I've been coding for months now using only local models running on my own hardware. It's perfectly adequate with the right harness.
Ok well that's actually awesome!! But is that what these people are using in big important projects like the Linux kernel, or are they using Claude? I'm guessing it's the latter, right?
AI will come for Linus too someday.
wow.. his ego is pretty big and bursting. Good thing that he evacuated his brain power to LLMs.
thank you meta!
LLMs aren't new or interesting.
Linus being Linus :)
I know it's early, but so far y'all just throwin' rocks. No intelligent criticism whatsoever of the content you just read (you did read it, right?) - nothing but low-effort jeers. Linus is saying he expects high quality work and doesn't accept a shotgun zero-tolerance mindset against how it's produced. What, in concrete terms, is actually wrong with that?
you did read it, right?
Why would people read it? There is giant mud fight happening between idiots believing AI is the devil and idiots believing AI is their new lord and savior. And like most morons only interested in that kind of team sport they already picked their side to cheer for. No actual arguments or thinking required.
Some things deserve zero tolerance IMO
As I have gone through life, I have decided that just about the only thing that deserves zero tolerance is zero tolerance itself.
Some things do, but work technique isn't one of them.
What about a tool that killed someone every time you used it? Or every ten times you used it? There's a line somewhere, right?
I already agreed some things deserve zero tolerance, so obviously there's a line. If AI killed someone or gave the user shooting pains every ten times it was used then I would call it a failed attempt to make a tool. But the relevance of this escapes me.
My argument is that the environmental costs of AI, not to mention the knock-on effects of the societal change it incurs, lead to people dying.
You are conflating environmental costs of AI with willful destruction to make money.
AI data centers don't need to use giant amounts of water. They do because assholes can get away with saying "fuck the people and environment" by paying off other assholes in governing positions to not regulate them.
AI data center's electricity usage is not a problem either. We will see a massive increase in demand anyway as electrification is actually a big step in decarbonisation. What is a problem are again assholes in the fossil fuel industry that lobby the already mentioned corrupt assholes in government to fight renewable energy and its infrastructure that is clean and available in abundance.
If you believe that AI is a cause for the problem and not just a pretense and that they would not have found (actually manufacture, just like they manufactured this insane "Ai will solve everything"-bubble) another reason (or dozens) to burn the planet for their profit anyway, you really lost the plot.
So, bring the numbers. Where's this environmental catastrophe resulting from the use of chatbots?
My $20 per month Claude Code subscription uses about $11 worth of electricity to generate my replies - our damn air conditioner is using near $11 per day to keep the house cool in the summer these days.
Evidence would make that an argument. Without it what you have is a hypothesis. I have a hypothesis that people die from the knock-on effects of social media, but here we are doing it without demonizing ourselves.
Fair enough. I'm not going to follow up with all that just for this comment thread. At least we can agree that some things are bad enough to justify not using.
Exactly, the only thing that matters is results.
No. The ethics of how something is produced are material.
The ends don’t justify the means.
@cm0002 He's right though. People have been using auto-complete forever. And now that it's gotten a little better, it's suddenly a problem?

Matrix chat room: https://matrix.to/#/#midwestsociallemmy:matrix.org
Communities from our friends:
LiberaPay link: https://liberapay.com/seahorse