审稿变得昂贵,重写变得廉价。
Reviews have become expensive, rewrites have become cheap

原始链接: http://ishmeetbindra.com/posts/reviews-have-become-expensive-rewrites-have-become-cheap/

大语言模型并非懒惰,而是效率低下:它们倾向于从零开始构建,而不是使用现有的库,因为在它们看来,编写复杂的代码与简单的调用库文件所耗费的“认知成本”是一样的。因此,审查人工智能生成的代码变得成本更高,因为开发人员必须花费大量时间来核实并抵制那些过度设计的实现方案。 然而,开发的经济逻辑已经发生了转变。尽管现在审查的成本很高,但重写的成本却很低且速度很快。作者调整了工作流程,将重点放在前期规划上,以最大限度地减少初始复杂性。如果人工智能仍然生成臃肿的代码,作者不再将其视为必须接受的沉没成本,而是将其视为人工智能重写的便捷对象。通过在初稿中优先考虑快速迭代而非追求完美,开发人员可以将精力集中在细化范围和实现上,而不是去争论每一行生成的代码。

这篇 Hacker News 的讨论聚焦于大语言模型(LLM)时代软件开发动态的转变。尽管有人认为人工智能使代码重写的成本更低且更易于实现,但评论者也指出了其中的重大风险与现实挑战。 主要顾虑包括: * **认知过载**:由人工智能驱动的快速代码生成可能会超过开发人员对系统的理解能力,从而导致在知识储备和系统维护方面出现危险的缺口。 * **审查悖论**:尽管一些开发人员使用人工智能来辅助代码审查,但另一些人认为这会产生盲点;如果使用大语言模型既编写又“审查”代码,它可能会无意中纳入原始作者的偏见和错误,导致缺乏人类监督来发现关键性故障。 * **生产风险**:参与者强调,无论生成或重写代码的成本变得多低,生产故障和停机带来的代价依然高昂。 最终,各方共识认为,人工智能工具虽然提高了产出速度,但也从根本上改变了工程工作的本质,往往将渐进式、深思熟虑的进展替换为难以审查的大规模重写,从而增加了调试难度,并影响了系统的长期稳定性。
相关文章

原文

LLMs aren’t lazy. They don’t cut corners because a simpler solution feels good enough. If they know how to solve something thoroughly, they will.

An LLM defaults to building when it should be buying. Not because it doesn’t know about existing libraries, it often mentions them, but because for an LLM, writing two hundred lines of implementation is the same cognitive effort as writing two lines of import. There’s no instinct to reach for the shortest path. The shortest path for the model is to implement it completely.

So reviewing AI-generated code has gotten more expensive. You’re reading code that’s technically correct but over-engineered, and you have to decide whether to accept the complexity or push back. That decision takes time. Making the case in review comments takes time. And because the same thing shows up repeatedly, you’re having the same conversation over and over.

On the other hand, rewriting is now cheap. If I identify code that’s more complex than it needs to be, in my own work or in someone else’s PR, I ask the AI to simplify it, use a library, cut a feature that isn’t required yet. The rewrite is often a quicker turnaround. The model that created the problem is also the fastest way to fix it.

The economics has changed. Reviewing is the expensive step now. Rewriting is not.

My workload has reorganized around this. I spend more time upfront in planning, deciding what should exist, what libraries we’re using, what the actual scope is, because that’s where I can head off complexity before it gets written. Then I implement, deploy to a test environment, look at what’s there, and identify what doesn’t need to exist or could be ten lines instead of a hundred. Then I rewrite that.

If something in review feels like too much, rewriting it later is not the sunk cost it used to be. That’s changed how aggressively I push back. The cost of flagging something and iterating is lower. The cost of letting it through is the same.

联系我们 contact @ memedata.com