Clean code in the age of coding agents.
TL;DR: Keeping code clean helps both humans and agents.
I was thinking the other day how coding agents despite being very different from human developers, still share some similarities - their productivity is affected by the state of the codebase.
Robert Martin in Clean Architecture talks about code as having two properties: value (it works, it's fast, etc.) and structure (how code is organised).
While value is obvious for all the stakeholders, the structure is somewhat less clear.
Poor structure means it's harder to introduce new features, and bugs are going to multiply. Eventually it costs your company momentum and money. It's just not immediate. It's a long-term thing.
What makes clean code?
It has several characteristics (but also note how all of those are affected by each other).
Readability: any other developer can easily understand what's going on. Simplicity: it gets the job done as simply as possible (but not simpler). Modularity: sensible code splitting into modules whatever those might be (classes, functions, files, directories, or micro-services). Testability: writing tests is easy and fun.
Naturally, code is easy to change if it has these characteristics.
... continue reading