Linux 之父谈 Vibe Coding - AI不会彻底取代程序员
目录
偶然刷到 Linux 之父 Linus Torvalds 接受采访时谈到对 AI 的看法,觉得很受启发,遂记录之。
观点总结
1. AI 只是“高级代码生成工具”,而非“思考者”
Linus 将 AI 的演进与编程历史上的工具革新进行了类比:
- 编程的本质是从手写十六进制机器码,发展到汇编器、编译器,再到今天的 AI 编程助手。
- 编译器将程序员的生产力提升了 1000 倍,而 AI 只是在此基础上再提升了 10 倍。
- 编译器帮程序员跳过了写底层机器码的步骤,AI 则帮程序员跳过了写模板代码和基础逻辑的步骤。AI 只是人类用来生成代码的又一层工具,并没有改变“人去定义逻辑”的本质。
2. Prompt 的质量取决于对系统深度的理解
AI 能够生成代码,但它极其依赖人类给出的指令(Prompt)。
- 懂系统逻辑的开发者:能够准确描述需求、理解复杂的系统架构和边界条件,从而引导 AI 写出高品质代码。
- 不懂系统复杂性的人:即便使用了 AI 生成代码,由于无法给出有深度、逻辑严密的指令,最终产出的代码也必定会在运行中崩溃。
3. 程序员的真正价值在于“长期维护”与“承担责任”
Linus 提到,利用 AI 进行快速原型开发(即“Vibe Coding”)或写一次性的小项目非常方便,但真正的软件工程完全是另一回事:
- 严肃的工程需要维护 30 年以上:AI 可能会产生“幻觉”或隐藏 Bug,生成出来的代码如果不经过人类逐行理解,未来将变成无法维护的垃圾代码。
- 开发者必须对最终结果负责:你不能只懂写 Prompt,必须能看懂 AI 生成的代码(甚至底层编译出来的汇编),才能确保系统的稳定、安全与长期演进。
4. 软件开发的瓶颈是“应对复杂性”,而不是“打字速度”
编写代码只是程序员工作中最基础的一环,真正的难点在于:
- 理解复杂的业务需求与系统架构。
- 评估性能、安全性与容错机制。
- 处理人与人之间的协作、沟通与工程伦理。
AI 可以提升代码编写的效率,但无法替代人类对复杂系统的掌控力与创造力。 因此,在 Linus 看来,AI 只是赋予了优秀开发者更高的生产力,而不会消灭“程序员”这个职业本身。
我的思考
基于目前 AI 的发展,我对Linus的观点表示认同,因为AI会产生什么样的软件,很大程度上取决于你的提示词,你的品味,你会不会给出精准的 Prompt 让 AI 去打磨细节。 除了编码,还有很多要考虑的地方,比如 软件是否易于修改(可维护性,可扩展性),是否有安全漏洞等。
AI 增强的是执行力,而专业知识帮助人类更好地定义方向、选择方法和解锁 AI 的创造力。 所以我们还是要学习软件工程,优秀的设计模式,软件架构等知识。
到于手工古法编程还要不要学,这个暂时没明确的答案,目前面试很多公司还在考查,但未来也许会改变。
Linus 发言原文
视频: https://www.youtube.com/watch?v=fi29pfLcW4I&t=1555s
文字:
Linus Torvalds: So my opinion has always been that hey, AI is a great tool, but it's a tool. And
when I see people saying, "Hey, 99% of our code is written by AI," I literally get angry, because
those same people, I pretty much guarantee that 100% of their code is written by compilers, but they
never say that, right? It's exactly the same issue.
I grew up writing machine code, and when I say machine code, I don't mean assembly language, I mean
the numbers. And I mean, it leaves an imprint on you. I can still remember LDA is hex A9 on the
6502, right? Correct. And it took me a while to understand that writing down the numbers and
calculating offsets for branches is kind of stupid and people had come up with this tool called an
assembler. And then later on I figured out compilers are good too, and these days I'm figuring out
AI tools are good too. I'm still writing the code, I'm just not doing it the same way I did when I
was basically typing in numbers in data statements.
And I'm personally 100% convinced that AI is changing programming, but it's not changing the
fundamentals. Exactly the same way that you all use compilers to actually generate your code, you
will all use—well, not maybe all of you, but a lot of people will use AI to generate the code that
the compilers use to generate the code that the assemblers then use to generate the machine code.
This is revolutionary in the same sense that we've seen revolutions before, and AI will increase
your productivity by a factor of 10, and I claim that compilers increased your productivity by a
factor of a thousand. So AI is great, but AI is not changing programming. It may be changing other
areas, don't get me wrong, but I'm a programmer so I don't care.So my opinion has always been that
hey, AI is a great tool, but it's a tool. And when I see people
And one of the things, sorry my voice is already fading, one of the things that I think has always
been true: when you look at the code written by developers, good developers write good code, other
developers write code that then breaks. And the same will be true for the people prompting the AI
tool. People who know what they're doing, who understand systems, will be able to prompt tools to
write good code; and people who don't understand the complexity of systems will also prompt systems
and write code, and it will fail.
And I think you do want to understand how it all works in the end. I still... I don't program in
machine code anymore, but I still look at the generated code. So when I use a compiler, even when I
use AI for my pet toy projects, I will use AI to generate code, I will look at that code, I will
actually still look at the assembly language end result because it's what I grew up with, it's kind
of where my comfort zone is. And right now I'm playing with microcontrollers anyway, so you really
want to actually look at the generated code and make sure it's doing what you really want it to do.
So I think even when you use AI for coding, if you do a project that you actually maintain long
term, you need to understand not just your prompts, but you need to understand the end result too,
because that's the only way you can maintain it long term. And it's easy enough—and we see that all
the time—where you basically generate a new project and it's a throwaway project and it's a one-time
and it's over, and AI is great for that, and we call it "vibe coding". But if you want to make
something serious, you're going to have to maintain it for 35 years or something, and at that point,
it's a lot more than just writing the prompts to make somebody else generate the code.
Dirk Hohndel: Well, unfortunately we're out of time. I have a lot more questions. I guess I'll have
to ask them next year...