🌱 Simple Rules for Simpler Code
more like guidelines than actual rules
- Captain Barbosa
- don’t abbreviate
- don’t use else
- fail early
- single level of indentation
- start from the outside in
- pull complex logic into methods
- tell don’t ask
- limit instance variables (property on an object that is another object)
- 4 max
- extract responsibility
- wrap primitives and strings (SOMETIMES) 1. when it brings clarity 2. when there is behavior connect to the value 3. when there is validation connected (consistency required) 4. when it is an important domain concept