YaK:: WebLog #535 Topic : 2006-10-02 18.47.37 matt : using the Refactoring book [Changes]   [Calendar]   [Search]   [Index]   [PhotoTags]   
  [Back to weblog: pretention]  

using the Refactoring book

Refactoring is a great book and reference, but it can be intimidating to approach. Here's my recommendation.

The Refactoring book is really quite amazing, and I recommend people get the hang of it before they approach Design Patterns. It gives us a common vocabulary for describing why code is bad and how to fix that bad code. Refactoring isn't an extremely large tome, but it can be intimidating. Here's how to approach it in an incremental way so you don't feel you have to memorize it backward and forward right off the bat to get use out of it.

I start with learning and memorizing the Smells. Being able to objectively identify when code is starting to rot is critical. There's a handy reference in the front of the book that just lists the smells and a brief description. Photocopy it and put it up next your monitor, or see if you can name each one in the list and add a new one each day.

Once you've got the smells memorized, you can then know when you need to dip into the book as a reference on how to refactor to eliminate the smell. After you use the book this way for a month or two, you'll find that it really starts to sink in. (Update: After actually reading the Refactoring Workbook, this is its recommendation also.)

If you still feel like you aren't quite getting it after couple of months of doing this consistently or you totally get it and want to move onto the next level, I would suggest trying the Refactoring Workbook or Refactoring to Patterns .

If the statistical density of the Refactoring book is scary, try starting with the Refactoring Workbook. If you can get through the Refactoring Workbook with flying colors, you're ready to go deeper with Refactoring or Refactoring to Patterns. These do tend to focus on code that is more nimble, with not as many trapping as the worst of legacy code projects. For that situation, after reading Refactoring and/or the other books recommended, check out Michael Feathers' Working Effectively with Legacy Code . It is a genius book that brings a lot of disparate information sources together in one place. It doesn't shy away from low-level concepts either, which is great for those of us down in the bits.


showing all 0 messages    

(No messages)

Post a new message:


(unless otherwise marked) Copyright 2002-2014 YakPeople. All rights reserved.
(last modified 2006-10-11)       [Login]
(No back references.)