Use this dialog to select your cookie preferences. We use cookies to enhance your experience and to collect data for analytics. Read our Cookie Policy.
The idea of 'clean code' is a nice one... we can write code in a 'clean' way? perfect, why wouldn't we want that. It's the same as the 'democratic' part of the Democratic People's Republic of Korea or the 'patriot' part Patriot Act. They are phrases that sound nice but are massively misleading, oversimplified and in the case of clean code, just plain wrong.
Uncle bob and the clean code movement
Uncle bob is a programmer, lets get this out the way. the reason I say clean code is an example of an idea pushed by primarily non-programmers is because its almost entirely pushed by management. I have maybe came across one or two programmers who have ever mentioned uncle bob or clean code.
Clean code is like Marxism, the diagnosis is mostly correct but the solution is wrong
its easy to point out things that are wrong with the way that people do things. Coming up with good solutions is the hard part. Once you have to consider third, fourth, n-th order effects, most 'solutions' fall apart.
great in theory, terrible in practice
not to keep harping on the Marxism reference, It would be hilarious if people read this article as clean code == marxism. But the point is that clean code is a great idea in theory, but in practice it falls apart.
you cannot plan a project out in full
you don't know the edge cases that will come up
Theory is miles and miles away from practice
Unit tests are useless if you're doing integration tests
I said it, arrest me.
Integration contains units. If you're testing the integration, you're testing the units