Addy Osmani 说,AI 写代码快过 review,质量得靠测试、变异检测这些约束来把关。
传统代码审查靠逐行阅读代码判断质量,但 Agent 生成的代码量远超人工可读范围。质量把关必须转移到 Agent 周围的测试、确定性检查、变异测试和质量度量等约束上。这些约束构成反向压力,在坏代码变成下游问题前拦截。工程师的核心能力变成搭建让低质量代码无法通过的约束系统。
软件质量正在从 “代码本身” 迁移到 “约束系统” 以前代码是人写的,看看代码就知道好坏:写得干不干净、跑得快不快、别人能不能看懂、有没有测试。review 代码的人,就是把关的人。 现在有了 A...
软件质量正在从 “代码本身” 迁移到 “约束系统” 以前代码是人写的,看看代码就知道好坏:写得干不干净、跑得快不快、别人能不能看懂、有没有测试。review 代码的人,就是把关的人。 现在有了 Agent 就完全不一样了。Agent 一个小时写的代码,人一个星期都看不完。逐行 review 这条路,客观上就走不通了。 那质量靠什么?靠你给 Agent 搭的那套关卡:测试、确定性检查、变异测试、质量度量。代码写得不行,直接拦下来,轮不到下游的人收拾残局。 说白了:你定的规则约束,决定了 Agent 写的东西敢不敢上线。 以后工程师之间拉开差距的,就是谁能搭出一套让烂代码根本混不过去的系统。 Addy Osmani @addyosmani Software quality now depends on the constraints you set around your agents. When humans manually wrote most of the code we could look at the code itself for signs of quality. Is it clean? Is it thoughtful? Is it fast? Can another engineer understand it? Does it have tests? Agents can now generate more code than people can read. When code generation scales beyond review, quality - checks for one or more of correctness, maintainability, security, performance etc - increasingly has to live somewhere else. It moves into the harness, environment and operating system around the agent. This can be the tests and deterministic checks that decide what the system is allowed to do (amongst others). Your constraints are what may eventually enable loops of agents to deliver production software reliably. They can include unit tests, property tests, acceptance tests, mutation testing and quality metrics. This back-pressure lets the system resist bad work before it becomes somebody elses problem. Set your constraints. They decide whether the code your agents generate is good enough to ship. 🔗 View Quoted Tweet 💬 0 🔄 0 ❤️ 0 👀 88 ⚡