Stop Reading the Code
原始來源與檔名:2026-08-11T094447+0800-Stop Reading the Code.md
SOURCE | 資訊源評估
- 作者:David Lee
- 來源:Medium
- 核心主題:Agent-driven development, Code Review, Testing
NAPKIN | 餐巾紙
餐巾紙公式
Code Generation + Manual Reading = Bottleneck Code Generation + Automated Systemic Constraints (TDD + Mutation Testing) = Scalable Output
一句話
When AI agents write code faster than humans can read it, the engineering bottleneck shifts from writing code to designing robust automated constraints (tests, metrics) to verify it.
餐巾紙草圖
Traditional:
Human -> Write Code -> Human -> Read Code (Bottleneck)
Agentic:
Human -> Define Tests/Constraints -> Agent -> Code -> Automated Gauntlet (Metrics/Tests) -> Ship
ROUND 1: SKELETON | 骨架掃描
- The bottleneck moved: Agents write code fast, reading line-by-line negates the speed.
- Robert Martin (Uncle Bob) suggests not reading the code agents write.
- Stop inspecting the cut, build the gauges (like CNC machines).
- Not reading ≠ not caring. It means surrounding the agent with constraints.
- The constraints: Acceptance tests (Gherkin), Unit tests, Mutation testing, Quality metrics (cyclomatic complexity).
- The pipeline made concrete: chain of agents (spec, code, refactor, architecture).
- The valuable skill shifts to writing tests and defining constraints. Code becomes cheap.
- Pushback: never ship code you don’t understand. Security flaws can pass tests.
- Conclusion: the discipline didn’t disappear, it just moved up a level.
ROUND 2: DISSECTION | 血肉解剖
- A capable agent generates code far faster than any human can read it.
- Robert Martin proposes treating software like a CNC machine, relying on measurement systems instead of manual inspection.
- The gauntlet includes:
- Acceptance tests (Gherkin format).
- Unit tests with high coverage.
- Mutation testing: injecting small bugs into code to ensure tests actually fail.
- Quality metrics: cyclomatic complexity, module size, dependency structure.
- The core competency of a software engineer shifts from reading/writing code to defining the tests and constraints.
- Tests become the durable asset, whereas code is regenerable and cheap.
- Caveats: Tests only catch what you test. Security and architectural flaws might slip through. Systemic discipline must be extremely rigorous.
ROUND 3: SOUL | 靈魂提取
The true value of an engineer is no longer in the mechanical act of producing or line-by-line verifying code, but in capturing the exact specification and boundary conditions of the system. The trust in software must move from “I read it” to “The system rigorously proved it”.
DEEP READ | 精讀指引
- “He says he does not read the code his agents write. He calls this the only way to actually capture the productivity of an agent.”
- “Stop inspecting the cut. Build the gauges.”
- Mutation testing: “A mutation tool deliberately injects small bugs into the code… If the tests still pass, your tests are theater. They prove nothing.”
- Cyclomatic complexity: “You do not need to read a function to know a complexity score of forty is a problem.”
- “Lose the code and you can rebuild it. Lose the tests and you have lost the only thing that told you the code was any good.”
- “You are trading the local, per line discipline of careful reading for a systemic discipline that has to be even more rigorous, because it runs without you watching.”
