Overview


This book is divided into three sections. Section 1 focuses on smells (problems) that occur within classes. Section 2 focuses on smells that occur between classes. Section 3 provides large programs for practicing refactoring in a variety of domains. Sprinkled among these sections, there are what I have called interludes ”brief excursions into analyzing the refactoring catalog in Refactoring: Improving the Design of Existing Code , by Martin Fowler et al. (hereafter referred to as Fowler's Refactoring ), or the patterns in Design Patterns by Erich Gamma et al. (similarly referred to as Gamma's Design Patterns ).

In the first two sections, the chapters consist mostly of smells (warning signs of potential problems) and challenges (exercises). I've used a standard format for describing smells:

Smell ”

its name

Symptoms ” cues that help you spot it

Causes ” notes on how it might happen

What to do ” possible refactorings

Payoff ” the ways your code will improve

Contraindications ” when not to fix it


This should help keep the smell pages useful for reference even when you've finished the challenges.

The challenges vary; some ask you to analyze code, others to assess a situation, still others to revise code. Code-based exercises have their code online at www.xp123.com/rwb .

Not all challenges are equally easy. The harder ones have "(Challenging)" between the challenge number and title;you'll see that these often have room for variation in their answers. Most exercises have solutions (or ideas to help you find solutions) in Appendix A. The later (code-based) exercises tend not to have answers, because they're asking you to modify programs.



Refactoring Workbook
Refactoring Workbook
ISBN: 0321109295
EAN: 2147483647
Year: 2003
Pages: 146

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net