Clean code isn't really about clean code
Clean code isn’t really about clean code. It’s about being responsible and confident about the software we create.
Who is the code written for? At a company, code is written first to make or save money.
Code needs to be clean because humans need to understand it. Code needs to be understandable in order to successfully be reviewed and approved.
There’s a lot of friction in code reviews where people are on different spectrums of what clean code is for. On one end of the spectrum, you have people YOLO creating PRs, shipping massive amounts of code while barely understanding the code being written. On the other end of the spectrum, you have people who treat agentic code as code written by humans, painstakingly reviewing each line and drowning over the sheer volume of code reviews coming their way.
I’m more “agentic coding is for agents” combined with “code is to make money.” Slop has always been written, even before the agentic coding era. Accepting it and figuring out ways to improve this without blocking things on human attention is the productive way forward.
For me, the bar is, can I be reasonably confident that my code is doing the thing I want it to, it won’t break things, and I can easily fix or make changes to it later?
If the code is written for humans, why do we need clean code? Ultimately, someone is responsible for the code that gets written. It’s a tradition in non-software engineering disciplines for engineers to wear a plain metal ring to symbolize their duty to the public. Software is more removed from the physical world, but when something breaks, someone is still responsible.