The foundational principle – writing clean code
The main point of presenting the topics in this chapter is to set a boundary. You can master all the patterns in this book and more, but if your software is poorly written, overly clever, haphazardly structured, or hard to maintain, then all the patterns in the world can’t help you. Let’s set some boundaries. I’m going to suggest some guidelines for creating “clean code.” You are welcome to argue the minutiae. It doesn’t bother me one bit if we differ in opinion over tabs versus spaces as long as you have a method to your particular flavor of madness. Let’s paint some broad strokes that hopefully everyone can agree with.
Clean code has the following characteristics:
- Easily readable by human beings with limited cognitive load
- Consistent in style
- Documented with an appropriate level of commentary
You should write code that is readable by humans
I feel...