DEV Community

Discussion on: What professionals think about Clean Code ?

Collapse
 
grumpytechdude profile image
Alex Sinclair

There's a bit right near the end where Uncle Bob addresses this point. He points out that clean code is more effort than unclean code, and there's a trade-off. You shouldn't strive to make your code clean, you should strive for clean enough.
That and he also points out you can't write clean code. You have to write dirty code and clean it up using refactoring. Which is where Martin Fowler's book Refactoring comes in!

And heck yeah it matters, but it generally doesn't matter immediately. If you write a 250 line behemoth that doesn't explain a thing, with no tests, somebody else two years down the line is going to have to spend a day just working out what is going on. That person then has the choice to refactor or not. If the code was cleaned up at the time...