控制想法,而非代码
Control the Ideas, Not the Code

原始链接: https://antirez.com/news/169

知名程序员 antirez 指出,开发者的角色正在发生根本性转变。由于人工智能现在可以高效生成代码,他认为将精力集中在编写和阅读代码行上已不再是最佳的时间分配方式。相反,程序员应将重点转向“掌控思路”:即设计架构、确保严格的质量保证,并深入理解软件背后的逻辑。 Antirez 承认,尽管他目前仍会对 Redis 等项目进行人工代码审查,但他认为这种做法正逐渐变得过时。他主张在未来,技术文档和高层设计文档的地位将优于原始代码的可读性,因为人工智能模型在发现细微漏洞和竞态条件方面已逐渐超越人类。 他坚持认为这一转型过程虽然痛苦,但却是必要的,因为软件行业长期以来一直深受低质量“代码垃圾”的困扰。尽管他强调年轻程序员仍需学习构建系统的基础知识(如哈希表或解释器)以培养扎实的思维模型,但他警告称,不要在繁琐的标准应用代码人工审查上浪费时间。最终,他鼓励开发者拥抱这一变革,将重心从具体实现细节转向架构愿景。

这段 Hacker News 讨论探讨了“人工智能辅助编程”的现实。 **核心技术见解:** * **验证是关键:** 资深工程师认为,虽然大语言模型(LLM)擅长编写代码,但它们仍会产生幻觉。开发者应采取“混合”方案:利用 LLM 进行代码生成,但针对关键系统需依赖稳健的单元测试和集成测试。验证——通常通过为 LLM 生成的逻辑编写人工检查——至关重要。 * **引导模型:** 用户讨论了如何更好地控制 AI。一些人抱怨模型会忽略设计文档,转而套用常见的训练模式;另一些人则认为,精通(或“技能”)可以让他们成功引导模型处理高度不寻常、非标准的项目架构。 **社区争议:** 该讨论帖演变成了一场关于 Redis 许可证变更及其后续引发 Valkey 分支的激烈辩论。创始人 Salvatore Sanfilippo (antirez) 批评用户支持那些在没有贡献的情况下利用开源劳动获利的超大规模云服务商(如 AWS)。评论者对云服务提供商被视为“窃取”开源价值的行为表示不满,认为限制性许可证对于保护开发者免受科技巨头剥削是必要的。
相关文章

原文
antirez 1 hour ago. 16268 views.
Look at the past history of this blog. There are many blog posts about programming with AI, a few of them date back to January 2024 (like this: https://antirez.com/news/140). I’m a relatively well regarded programmer, after all. I don’t have the need to still be in the “loop” as a old man that seeks for relevance, I recently rejoined Redis, and now I also am developing a new open source software for local LLM inference that received a good welcome in the community. Why I keep doing this, of saying what people don’t want to hear? Why I keep announcing how future programming will be by default? Because I feel the urge of lowering the impact for people less prepared to the change than me, often younger than me, and that, unlikely me, didn’t see many of those things coming (In 2022 I published, before ChatGPT existed, a book preannouncing many things that now happened and other things that I believe *will* happen, so I feel like I can say this without sounding egocentric).

So mine is a trick. People feel more and more programming is completely modified by AI and don’t know what they should do, if they can really start coding in a completely different way, without looking much at the code as their main output. They feel like they are betraying their own field. So my intention is to arrive and say “look at me, In can write code, you know, I’m not hiding behind AI: yet, things changed, it’s not your weakness, it’s not that you are AI-pilled. It is just that our field is evolving in an incredible *and* painful (but also joyful) direction”.

This is why yesterday, on X, I said that I believe many programmers at this point have less impact they could have because they look at the code. I truly believe into that. And note that this does not mean to vibe code something just asking for the final product. The point is: if you control the ideas of your software, looking at the code itself is suboptimal and often pointless. For the following reasons:

1. You can now generate a lot of code, even *not* accounting for the LLM code verbosity (that is also effect of not being able to instruct them well, for most of the part). How are you supposed to review 5k lines of code every day?

2. LLMs are very good at writing locally optimal code, and are worse (but improving) with big ideas. What’s the point of scanning function by function, line by line? Instead you should prompt the design you have in mind, sometimes ask “how is exactly the design of that part? How does it work?”, and evaluate if it is the right model. It is much faster.

3. The working day is 8 hours. If you read the code, it is a tradeoff. You are doing less of what today is the most important part of your job, that is, asking yourself: what I’m doing with this software? What are the new directions I want to take? And also, think at new ideas, features, optimizations tricks. And doing a lot of QA.

Controlling the ideas. Do you remember this phrasing from the Mythical Man Month? Well, a book from the 70s tells us more things about the current software era than many of the things that were said from 2000 to 2020. Why people that now protest against AI were not horrified by the state of software in the last decade? The level of slop we touched during recent years, before AI, is unbelievable. I’ll say you another thing. What is slop? With DwarfStar I implemented an inference for two LLMs (DeepSeek v4 and GLM 5.2) in a completely automated way, but: try it yourself, you will discover you can’t just say “implement XYZ” and see it working. You have to understand how things work, what is the best design, how to reach a certain level of performance. Then I compared the implementation, for correctness, to other systems, finding that other implementations sometimes contained more errors. I researched more, and found that the local inference world is full of subtle errors that accumulate and damage the model output, issues in the attention implementation causing performance slopes after the context is over a certain limit because indexed attention implementations are broken (do more work than they should, for instance), and so forth. This is the result of a domain that is very complicated to handle, fast changing, with models that are slightly different one from the other in the inference graph being released every day. It’s an unfair game for developers. Well: AI helps a lot with that. There are many domains where rigorous engineering (in the design side) and testing is *far* better than writing a GPU kernel by hand (or reading it). So are we sure most of that resistance it is not ideological?

Matteo Collina yesterday asked me, in reply to my tweet: but didn’t you say that you check all the AI generated code for Redis? And this is a good question indeed. Yes, I do, but this is, at this point, something I *need* to do but that I believe to be mostly pointless, partially once GPT 5.5 was released, but now with Fable and GPT 5.6 Sol even more. Yes: I identify things that I don’t like how they are coded, but if I open other Redis files written by other Redis contributors there is *far worse*, and not since they are not good coders, but because it is a matter of taste. I write very clean code since I want it to be readable, so during the implementation of Redis Arrays I operated changes. I’m doing it again for the 50% memory saving optimization of Redis sorted sets, a PR that I’ll submit soon. But I do not feel this is useful anymore. Nobody should anymore look at this code, but only at the ideas the code contains. I continued to do it out of respect for users. Redis is at this point a commonly useful thing, and many programmers will open files and modify stuff by hand. But if I had my hands free, you know what I would do, instead? Use all the time that the review is taking me to do more QA, to think at the next optimization idea and apply it, and to use LLMs to write a DESIGN.md file where each data structure is described in human language, with the ideas it contains, the implementation tricks, the design. That, in the future, is going to be much more useful. Do you want to modify sorted sets? You open the file, read the design, then you own the ideas. You can open your agent and ask it what to do with the right mental model. This is a lot more useful than reviewing the code.

Fable and GPT 5.6 reviews to the sorted sets memory saving are going to spot ways more errors and subtle race conditions that my review is going to uncover. Yet I’ll do it. But for the majority of software projects, all this does not make sense anymore. Focus on controlling the ideas, instead. Focus on quality, testing, and having an idea of the software you want to ship. The world changed and it is painful, but also full of opportunities to improve a software world that was already completely rotten.

I have a doubt only regarding young programmers that don't have enough experience, and can't build a mental model. We don't know, yet, if they will require or not to understand very well how a given piece of code works, but I believe they should learn how to write programs. Yet, I'm not sure checking the LLM output is the right thing they should do. It may be a lot more useful if they learn some programming language and implement a small interpreter, a small database, an hash table and so forth. Reviewing some Javascript stuff of some web site for a customer? Hell, no, don't lose time with that shit.
联系我们 contact @ memedata.com