Some cool refactoring examples, and what seems to be a lovely book
Just found this great set of
refactoring patterns with examples. The examples are taken from the book “
Refactoring to patterns“ which seems like its worth a read. There is some stuff there that I did not hear or read about or thought about as a refactoring pattern but totally made sense once I read it (
constructor chaining, for example). I think it deviates from the
classic refactoring book to a nice angle - it talks about refactoring your code into distinguishable design patterns, not just removing duplication or bettering readability. I like this notion. although it may seem a bit complicated for those who have no experience with design patterns (to which I recommend heartily
this mind opening classic book). Very cool to be able to point people at this URL to explain what I'm talking about when I say “Refactoring” and people start staring at me. I think this book might be a compliment to the classic that is
Refactoring by fowler - and to the design patterns one as well (yes- you need all three is what I think!).
Anyway, this was found via
this blog, which I have no idea what language it is written in, I just found it in my referrer logs. see? track back rocks :)