Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
Notes by Jeremy W. Sherman, October 2013, based on:
Feathers, Michael. Working Effectively with Legacy Code. Sixth printing, July 2007.
Foreword:
- Software systems degrade into a mess.
- Requirements ALWAYS change.
- Your goal as a software developer: Create designs that tolerate change.