XNews

Clean Code Author Bob Martin: 'I Don't Read AI-Generated Code,' Relies on Tests and Metrics

Bob Martin, author of Clean Code, stated he does not read AI-generated code because human reading is too slow and negates AI's productivity gains. Instead, he sets up a pipeline of four agents for specification, coding, refactoring, and architecture review, each more formal than the last. He relies on unit tests, Gherkin tests, QA processes, code quality metrics, mutation testing, and coverage. He monitors cyclomatic complexity, dependency structure, and module size to infer code quality. Martin argues that in the AI era, writing high-quality tests and constraints is more valuable than reading code, and he now teaches courses on AI agents for clean code.

Source posts