I wrote this book for numerous reasons. Probably the first motivation had to do with Extreme Programming. I was a bit surprised when Kent Beck did not include patterns in XP. I struggled with that for a while. I wrote about it in a paper called Patterns & XP for the first XP conference in Sardinia, Italy, 2000. That paper got me started on wanting to write a book to re-position patterns within the new agile world.
Another motivation for writing the book had to do with the patterns workshop that my company, Industrial Logic, teaches. I found again and again that I needed real-world examples to use in teaching people how to be really good with patterns. So I began creating a catalog of such examples.
As I continued to write and get reviews from some very smart programmers, I began to learn that my approach to refactoring wasn't even that good. I would do too much work manually and not rely on small, safe refactorings. So as time went on (I worked on book for about 4 years) I learned to be better at refactoring, to refactor to, towards or away from patterns in really small, safe, and often automated steps. The IDEs, such as Eclipse, have been really helpful in this area -- I can practically refactor to the certain patterns by exclusively relying on automated refactorings in my
IDE.
Finally, a motivation for writing the book was to show what it really means to do Evolutionary Design, which is at the core of XP. Rather than using Design Patterns for upfront design (which I once did, when I was a bit naive), I have learned to evolve patterns into systems when they really help. So I wanted to share that knowledge with the world.