AnyBook4Less.com
Find the Best Price on the Web
Order from a Major Online Bookstore
Developed by Fintix
Home  |  Store List  |  FAQ  |  Contact Us  |  
 
Ultimate Book Price Comparison Engine
Save Your Time And Money

Refactoring Workbook

Please fill out form in order to compare prices
Title: Refactoring Workbook
by William C. Wake
ISBN: 0-321-10929-5
Publisher: Addison-Wesley Pub Co
Pub. Date: 22 August, 2003
Format: Paperback
Volumes: 1
List Price(USD): $34.99
Your Country
Currency
Delivery
Include Used Books
Are you a club member of: Barnes and Noble
Books A Million Chapters.Indigo.ca

Average Customer Rating: 4.4 (5 reviews)

Customer Reviews

Rating: 4
Summary: Good exercises in refactoring
Comment: Refactoring is the process of recognizing and correcting problems in code that is functional. Since the code is working correctly, refactoring is something that is generally done late in the development cycle or perhaps not until the code has entered the maintenance phase. However, refactoring has proven to be so valuable that most recent books on software engineering spend some time describing what it is.
Performing a refactoring starts with identifying a "code smell", a segment or feature of the code that just feels awkward or unusual. This is not as hard as it may appear, many of the most common "smells" have been cataloged and the solutions identified. For example, the first "smells" covered in this book are:

* Obscure or overly descriptive comments.
* Overly long methods.
* Overly large classes.
* Overly long parameter lists to methods.

and all examples are coded in Java. Programming veterans will recognize most of these problems as old and venerated programming difficulties. With the exception of large classes, they have been part of the list of bad programming habits for decades. However, the solutions require a bit of thought, it is conceptually simple to make comments, variable names and method names more descriptive, but of course there are reasonable bounds that reasonable people can disagree on. There are only rules of thumb available to guide us, and Wake sets down his thoughts on this matter.
The real difficult problems in this list, and where this book is the biggest help in this section, is in demonstrating how to make methods and classes shorter. To factor out just the right amount of code and still maintain the same level of understandability can be a difficult judgement call. Programmers learn best by seeing worked examples, so the sequence of presentation is:

* Symptoms.
* Causes.
* What to do?
* Payoff.
* Discussion.
* Contraindications.

Coding veterans will most likely find the "contraindications" section of the exercises the most helpful. It describes reasons why performing the refactoring may not be the best decision.
The second set of refactoring exercises are:

* Unnecessary complexity.
* Duplication.
* Conditional logic.

This set of refactorings will also be familiar to coding veterans. Removing dead code, eliminating duplicate code, deleting magic numbers and using more efficient Boolean operations have been on the list of good programming habits for decades. Therefore, the refactorings in this section are fairly routine, as they do not require an object-oriented example to demonstrate them.
The most valuable section of the book is the second one, where the coverage is smells between classes, which are as follows:

* Data.
* Inheritance.
* Responsibility.
* Accommodating change.
* Library classes.

Most modern programmers will be familiar with the first section and will have already done many of them as part of their general coding practices. However, the "smells" in the second list are those that always seem to creep undetected into large programs. Therefore, they are harder to identify and often even harder to remove. I found the segment on problems in library classes to be the most valuable one of the entire book. I often use library classes in Java and there have been times when I have looked at a library class and been puzzled by how it is constructed.
The book closes with four small programs that are to be refactored as exercises. Large and complex enough to be worthwhile exercises, they are an excellent conclusion to a helpful book. Many problems are included and solutions to almost all are found in an appendix.
While this book is a good way to practice refactoring, it is not a good way to learn it. The classic book by Martin Fowler is still the best introduction to refactoring.

Rating: 4
Summary: Makes Refactoring Real
Comment: This book proved to be an excellent learning tool during a refactoring session at my eXtreme Programming Users Group meeting. We discussed most of the covered refactorings, divided into pairs, and went through several of the exercises (many of which had downloadable code). Thereafter, each pair discussed their approach with the entire group. I must say the book accomplished its goal: To give novices and veterans alike the chance to gain or sharpen refactoring skills. I highly recommend this book and suggest its use within a group.

Rating: 5
Summary: Required reading to get effective at refactoring
Comment: The concrete identification of smells, working examples, and straighforward but useful exercises make this book a must-have to really understand how to refactor your code -- even if you're a non-Java guy like myself.

It would've been nice to have examples inline for some of the refactorings -- more of the feel of _Design Patterns_. I also didn't agree with him everywhere; he asserted that there were some smells that had no known justitications and had to always be addressed. However, unit tests look like they would set off his 'too much internal knowledge' smell, but I probably wouldn't just go chopping them out because of that.

Similar Books:

Title: Refactoring: Improving the Design of Existing Code
by Martin Fowler, Kent Beck, John Brant, William Opdyke, Don Roberts
ISBN: 0201485672
Publisher: Addison-Wesley Pub Co
Pub. Date: 28 June, 1999
List Price(USD): $54.99
Title: Domain-Driven Design: Tackling Complexity in the Heart of Software
by Eric Evans
ISBN: 0321125215
Publisher: Addison-Wesley Pub Co
Pub. Date: 22 August, 2003
List Price(USD): $49.99
Title: Agile and Iterative Development: A Manager's Guide
by Craig Larman
ISBN: 0131111558
Publisher: Addison-Wesley Pub Co
Pub. Date: 15 August, 2003
List Price(USD): $34.99
Title: Test Driven Development: By Example
by Kent Beck
ISBN: 0321146530
Publisher: Addison-Wesley Pub Co
Pub. Date: 08 November, 2002
List Price(USD): $34.99
Title: Balancing Agility and Discipline: A Guide for the Perplexed
by Barry Boehm, Richard Turner
ISBN: 0321186125
Publisher: Addison-Wesley Pub Co
Pub. Date: 15 August, 2003
List Price(USD): $29.99

Thank you for visiting www.AnyBook4Less.com and enjoy your savings!

Copyright� 2001-2021 Send your comments

Powered by Apache