[Phoenix-pm] Refresh

Michael Friedman friedman at highwire.stanford.edu
Sat Feb 25 10:21:59 PST 2006


On Feb 25, 2006, at 1:21 AM, Brock wrote:
> How are YOU doing? :)
>
> --Brock

Well, I'm still in California, but I have been reading Martin  
Fowler's _Refactoring_ book and realizing that it's incredibly useful  
for Perl programming.

For those who haven't read the book (or heard about Refactoring), he  
gives a ton of "recipes" for changing code to make it more readable,  
more maintainable, and more object oriented -- without changing what  
it does. Some of the ideas are mind-numbingly simple, like "Rename  
variable", but each one has explanatory text that tells you where you  
want to use it and what to look for in existing code that should  
probably be replaced. It's also handy so that you don't forget  
something -- "Move method" reminds you to look for global variables  
used in the method and that you'll probably have to rename it to fit  
the new class.

All the sample code is in C++ or Java, but it's perfectly readable to  
a perl coder. You just have to decide if/how you want to handle the  
refactorings that involve encapsulation. :-)

Anyway, I recommend the book to everyone.
-- Mike

PS - AND my boss gave me permission to spend a week refactoring some  
ugly spaghetti code I now get to maintain. Yay! (boy, am I a geek)

---------------------------------------------------------------------
Michael Friedman                     HighWire Press
Phone: 650-725-1974                  Stanford University
FAX:   270-721-8034                  <friedman at highwire.stanford.edu>
---------------------------------------------------------------------




More information about the Phoenix-pm mailing list