Monday, April 25, 2011

Refactoring: Improving the Design of Existing Code

It is a great book from Martin Fowler & Co. What I found most useful are all the examples that are given for almost every refactoring that is described. The examples are simple with not much details to distract you, but still they are excellent illustrations of the topics. And don't fool yourself - they might be written in Java, but almost all of them are actually language agnostic and will apply to your favourite object oriented programming language.

In my opinion the concept of the Bad Smells in Code should be taught in the schools and universities as a separate course. Some of them are taught indeed, but this topic should be studied much more in depth and with much more attention to the details. The skill to know when the code needs refactoring is something that comes not with reading and studying, but with lots of practice and experience. It's never too early to start building this knowledge and probably this process will continue until you stop being developer. It's great that with this book you can kind of get a sense, when something is wrong with your design.

What is really interesting - the authors talk about tools that should support and help the developer in refactoring his code. Well, most of their ideas are already reality! At least Java and .NET have very advanced software development environments and what of the things that are done manually in the book are just a few keyboard clicks away.

To sum up, I think this book is a must for every developer, especially for those that work with existing and legacy code. 

What's next? After Refactoring: Improving the Design of Existing Code I think I should deepen my knowledge in design patterns.