PokerHands kata on Ruby (1.9), trying to follow strictly Object Calisthenics rules
- TDD is mandatory : write 1 test -> make the code pass -> refactor
- don't cheat with the rules spirit. def notaget(){ return @value } is a getter, no matter how it is named
- have all rules applied, otherwise you don't get the juice of the exercice
- done until 2 pairs comparison
- no proper makefile and stuff so far, tests running in rubymine
- I know, some rules are violated this and there
- Kata is here : http://www.codingdojo.org/cgi-bin/index.pl?KataPokerHands
- Object Callisthenics rules :
- Use only one level of indentation per method
- Don’t use the else keyword
- Wrap all primitives and strings
- Use only one dot per line
- Don’t abbreviate
- Keep all entities small
- Don’t use any classes with more than two instance variables
- Use first-class collections
- "Tell, don't ask" : Don’t use any getters/setters/properties