Break complex problem down into:
As few parts as possible as independent as possible.
Easier to learn because fewer components.
Productive because the components are re-usable.
Simplicity and Generality
Small number of independent parts
Easy to learn
Maintainable (Built with fewer components)
self <= 1
self = 0 ifTrue: [^ 1].
self > 0 ifTrue: [^ self * (self - 1) factorial].
self error: 'Not valid for negative integers'
self < 0
ifTrue : [^0]
self = 0
ifTrue : [^1]
ifFalse: [^self * (self -1) recFact]
Instead of :
p 'This will print forever'
[ code ] repeat
Ignore knowledge about objects. Focus on messages.