This list of tips taken from Tyler Hawkins' post on dev.to, which took them from Robert C Martin's Clean Code.
My thoughts are in italics after each tip.
- The total cost of owning a mess compounds over time. Agree!
- It’s very difficult to rebuild a legacy system from the ground up. Refactoring and incremental improvements are often the better path to take. Agree, for large systems. For smaller systems (eg a single page, or even a single application), a big-bang rewrite is often the simpler, cheaper approach.
- In messy codebases it can take days or weeks to accomplish tasks that should only take hours. Agree!
- Take the time to go fast. What does this mean, Bob?
- Clean code does one thing well. Bad code tries to do too much. Can simple code doing two things be "Clean" ( eg:
{ SetDefaults(ref foo); Save(foo); })? Can complex code for one simple task be "Bad"? - Clean code is well-tested.