氛围编码的崇拜很疯狂。
The cult of vibe coding is dogfooding run amok

原始链接: https://bramcohen.com/p/the-cult-of-vibe-coding-is-insane

## Claude 代码泄露:一次糟糕的“自食其果” Anthropic 的 Claude 源代码泄露显示代码出乎意料地混乱,引发了在线批评。根本原因是什么?一种极端的“自食其果”——使用自己的产品——以至于适得其反,被称为“氛围编码”。这种方法故意避免直接检查底层代码,而是依赖于与人工智能的抽象对话。 虽然“自食其果”很有价值,但 Claude 团队实际上*避免*审查代码,尽管代码是用易于理解的英语编写的。这导致了显而易见的冗余和低效,而简单的代码审查就能发现这些问题。 人工智能在代码清理和重构方面表现出色*在指导下*。人类可以很容易地引导 Claude 识别和解决重复代码等问题,但团队优先让人工智能在没有干预的情况下运行。作者认为,糟糕的代码质量并非人工智能辅助开发不可避免的后果;而是一种刻意的选择。人工智能可以显著改进现有代码库,但需要人类的指导和监督来识别和解决它不会自发识别的问题。最终,Claude 代码泄露表明,高质量软件源于有意识地*优先考虑*质量的决定,即使有人工智能的协助。

## 黑客新闻讨论:“氛围编码” 最近黑客新闻上的一场讨论引发了对“氛围编码”的争论——一种利用人工智能辅助快速开发软件的做法,通常将速度置于传统代码质量之上。这次讨论是由Anthropic的Claude的泄露源代码引起的,一些人认为这是成功产品*可以*用非常规编码实践构建的证据。 许多评论者同意,由于截止日期和实际限制,混乱的代码在现实世界的项目中很常见。一些人指出,即使是成熟的公司也会发布不完美的代码,通常是作为从未被重新审视的临时修复。 还有人指出,即使代码库不太理想,像Claude这样的人工智能工具仍然可以发挥作用,特别是由于它们强大的底层模型。 然而,人们对“氛围编码”项目的长期可维护性表示担忧。一些人认为,虽然快速的结果很有吸引力,但忽视代码质量最终会导致复杂性和成本增加。 讨论还涉及开发人员角色的演变,一些人认为人工智能将重点从编写代码转移到指导和审查人工智能生成的内容。 最终,争论的中心在于,优先考虑速度和利用人工智能是否可以证明牺牲传统的软件工程原则是合理的。
相关文章

原文

Claude had a leak of their source code, and people have been having a whole lot of fun laughing at how bad it is. You might wonder how this could happen. The answer is dogfooding run amok.

Dogfooding is when you use your own product. It’s a good idea. But it can turn into a cult activity where it goes beyond any reasonable limits. In this case, the idea is vibe coding, where you make a point of literally making no contribution to what’s going on under the hood, not even looking at it.

This is, of course, ridiculous. It’s not like there isn’t human contribution happening here. For starters, you’re using a human language, and the machine is using that same human language for its own internal thought processes. You could argue that that other humans, not on the development team, did all that foundational work and your team are doing pure vibe coding. But even that isn’t what’s happening. You’re still building the infrastructure of things like plan files (That’s fancy talk for ‘todo lists’), skills, and rules. The machine works very poorly without being given a framework.

So pure vibe coding is a myth. But they’re still trying to do it, and this leads to some very ridiculous outcomes. For example, a human actually looked and saw a lot of duplication between them. Now, you might ask: why didn’t any of the developers just go look for themselves? Again, it’s vibe coding. Looking under the hood is cheating. You’re only supposed to have vague conversations with the machine about what it’s doing.

This gets particularly silly because it’s not like there’s some super technical thing under the hood that the general public couldn’t understand. This code is written in English. Anyone could read it. It’s easy enough to go through and notice, “wow, there’s a whole bunch of things that are both agents and tools. That’s kind of redundant, maybe we should clean this up.”

This happens all the time in software. Projects are born in sin. Historically a software project would usually have so much tech debt that if you were doing what made sense from a pure development standpoint you would literally do nothing but clean up mess for the entire next year. Now that you can use AI for coding, you can get that cleanup done in sometimes a matter of weeks, or get it paid down a bit slower will still writing new features. And you should. You should strive for much higher quality. Helping you clean up mess is something AI is actually very good at.

In this particular case, a human could have told the machine: “There’s a lot of things that are both agents and tools. Let’s go through and make a list of all of them, look at some examples, and I’ll tell you which should be agents and which should be tools. We’ll have a discussion and figure out the general guidelines. Then we’ll audit the entire set, figure out which category each one belongs in, port the ones that are in the wrong type, and for the ones that are both, read through both versions and consolidate them into one document with the best of both.”

The AI is actually very good at this, especially if you have a conversation with it beforehand. That’s what Ask mode is for. You walk through some examples, share your reasoning, and correct the wrong things it says when trying to sycophantically agree with you. After enough back and forth, it’s often able to do what looks like one-shotting a task. It’s not really one-shotting at all. There was a lot of back and forth with you, the human, beforehand. But when it actually goes to do the thing, it zooms ahead because you’ve already clarified the weird edge cases and the issues likely to come up.

But the Claude team isn’t doing that. They’re going completely overboard with dogfooding and utterly refusing to even spend a few minutes looking under the hood, noticing what’s broken, and explaining the mess to the machine. That wouldn’t even be a big violation of the vibe coding concept. You’re reading the innards a little but you’re only giving high-level, conceptual, abstract ideas about how problems should be solved. The machine is doing the vast majority, if not literally all, of the actual writing.

I’ve been doing this for months. I’ll start a conversation by saying “Let’s audit this codebase for unreachable code,” or “This function makes my eyes bleed,” and we’ll have a conversation about it until something actionable comes up. Then I explain what I think should be done and we’ll keep discussing it until I stop having more thoughts to give and the machine stops saying stupid things which need correcting. Then I tell it to make a plan and hit build. This is my life. The AI is very bad at spontaneously noticing, “I’ve got a lot of spaghetti code here, I should clean it up.” But if you tell it this has spaghetti code and give it some guidance (or sometimes even without guidance) it can do a good job of cleaning up the mess.

You don’t have to have poor quality software just because you’re using AI for coding. That is my hot take for today. People have bad quality software because they decide to have bad quality software. I have been screaming at my computer this past week dealing with a library that was written by overpaid meatbags with no AI help. Bad software is a decision you make. You need to own it. You should do better.

联系我们 contact @ memedata.com