Index
Objected Oriented Nirvana
Codegram Lightning Talks
Oriol Gual -
Twitter
,
GitHub
Object Oriented Nirvana, WTF?
Inspired by
Perfecting OO's Small Classes and Short Methods
Refactor a library applying the 9 restrictions defined in "Object Calisthenics" essay by Jeff Bay on
The ThoughtWorks Anthology
.
Spinach's ScenarioRunner
to the rescue!
1. Use only one level of indentation per method
2. Don’t use the ‘else’ keyword
3. Wrap all primitives and strings
4. Use only one dot per line
5. Don’t abbreviate names
6. Keep entities small
7. Don’t use any classes with more than two instance variables
8. Use first-class collections
9. Don’t use setters, getters, or properties
Conclusions
Lots fo fun
Integration tests green
Unit tests failing: stubed too many things?
Some design flaws arised
Q&A
Use
spacebar
or the
arrow keys
to navigate
Tweet
See all slides