TDD rules
- Write the test.
- Make it Compile.
- Watch it Fail.
- Do Just Enough to make the tests pass.
- Refactor ( with some guidance below )
Object Calisthenics Rules
- Use one level of indentation per method (one programming language branch/loop statement per method)
- Don’t use the else keyword (or switch)
- Wrap all primitives and strings (descriptive - not leaning on generic language primitives)
- Use only one dot per line (what about functional transformations).
- Don’t abbreviate
- Keep all entities small (methods 5 lines, classes 50 lines, package 50)
- Don’t use any classes with more than two instance variables
- Use first class collections (wrap collections treat them like primitives as per 3.)
- Don’t use any getters, setters or properties (HARDEST - POSSIBLY SLIP ON THIS UNTIL UNDERSTOOD BETTER)
Code smells to look out for: - Duplication, - Violation of Calisthenics, - DataEnvy, FeatureEnvy - Refactorings List (https://www.refactoring.com/catalog/). - Design Patterns List (http://wiki.c2.com/?DesignPatternsBook)
See Requirements.md