We recently launched a challenge that invites Safari Books Online subscribers to write a book or video review and in exchange for their review, we’ll enter their name into a drawing to win an eReader of their choice. We also invited non-subscribers to sign up for a free trial of Safari Books Online so they could get in on this challenge. The more reviews they write and share, the greater their chances of winning.
The following book was reviewed by Peter Tran, a Safari Books Online subscriber:
Here’s an overview of the book:
“As the application of object technology–particularly the Java programming language–has become commonplace, a new problem has emerged to confront the software development community. Significant numbers of poorly designed programs have been created by less-experienced developers, resulting in applications that are inefficient and hard to maintain and extend. Increasingly, software system professionals are discovering just how difficult it is to work with these inherited, “non-optimal” applications. For several years, expert-level object programmers have employed a growing collection of techniques to improve the structural integrity and performance of such existing software programs. Referred to as “refactoring,” these practices have remained in the domain of experts because no attempt has been made to transcribe the lore into a form that all developers could use. . .until now. In Refactoring: Improving the Design of Existing Code, renowned object technology mentor Martin Fowler breaks new ground, demystifying these master practices and demonstrating how software practitioners can realize the significant benefits of this new process.
With proper training a skilled system designer can take a bad design and rework it into well-designed, robust code. In this book, Martin Fowler shows you where opportunities for refactoring typically can be found, and how to go about reworking a bad design into a good one. Each refactoring step is simple–seemingly too simple to be worth doing. Refactoring may involve moving a field from one class to another, or pulling some code out of a method to turn it into its own method, or even pushing some code up or down a hierarchy. While these individual steps may seem elementary, the cumulative effect of such small changes can radically improve the design. Refactoring is a proven way to prevent software decay.
In addition to discussing the various techniques of refactoring, the author provides a detailed catalog of more than seventy proven refactorings with helpful pointers that teach you when to apply them; step-by-step instructions for applying each refactoring; and an example illustrating how the refactoring works. The illustrative examples are written in Java, but the ideas are applicable to any object-oriented programming language.”
Here is the review by Peter Tran
“Refactoring: Improving the Design of Existing Code by Martin Fowler reminds me of the line from the Lord of the Rings novel (slightly modified): One [Book] to rule them all, One [Book] to find them, One [Book] to bring them all in the [lightness] bind them. First published in 1999, the advice is still relevant today as it was then. The book is broken into 3 main sections: Chapters 1 – 4 covers the reason why refactoring is so important. Chapter 1 walks through an example taking a very procedural code and applies several refactoring methodology to transform the code into one that is easier to test and maintain and less fragile. Chapter 2 covers the principle of refactoring and answers questions on why refactoring is important. Chapter 3 discusses what type of code is prime candidate for refactoring – “code smell”. Chapter 4 discusses the importance of building tests before refactoring. Chapters 5 – 11 catalog all the different refactoring technique. For each refactoring technique, the author provides a name, a short summary, motivation, mechanics, and example demonstrating how to apply the refactoring technique. The examples are excellent and invaluable. Chapters 12 – 15 are co-written with other authors using real-world examples (war-stories). These will help you see the bigger picture and how refactoring fits into the bigger picture of software development. I recommend completely reading chapters 1 – 4 in order, and then peruse chapters 6 – 11 to get an idea on each refactoring technique. You can go back to refers to these chapters to study the examples. Chapters 12 – 15 can be read independently, but will have more meaning once you’ve done a few refactoring exercises. The keys to good refactoring are good test cases and knowing when which technique should be use for the given situation. There has been other books written on the subject for different languages, but this one started it all. This book is only available in hardback version, which is good because it’s going to get a lot of use.”
Read this Review on Safari Books Online and see what others may have to say about the book Refactoring: Improving the Design of Existing Code.