How to use design patterns successfully