[prog] Book Recommendation for OOP Design

Cynthia Kiser cnk at ugcs.caltech.edu
Sun Jan 11 22:23:48 EST 2004


Quoting Jacinta Richardson <jarich at perltraining.com.au>:
> On 7 Jan 2004, etb wrote:
> >        Refactoring: Improving the Design of Existing Code by Martin
> >           Fowler
> >            http://www.amazon.com/o/ASIN/0201485672/
> 
> I'm not sure that this book will be what you want.  Refactoring need not
> have anything to do with OO at all.  To refactor code you:
> 	a) work out what you want to improve in existing code (speed of
> 	   execution?  memory usage?  maintainability?)  Refactoring
> 	   should not change the functionality of the code in any way.
> 	b) write a test suite and run it on current code
> 	c) rewrite part of the code
> 	d) run the test suite to make sure you didn't break anything
> 	e) repeat c and d until the code meets your refactor targets.
> 
> I can see that this refactor book is written for Java, and OO code, but
> I'm not sure that it'll help you write OO code.

I agree that the Refactoring book might not give you a good STARTING
point for writing OO code. But I think it might make an excellent
choice if you have tried to write some and been dissatisfied with what
you have produced. A lot of the art to programming is realizing what
trade-offs are inherent in implementation choices you make. In
discussing how to refactor code, Fowler does an excellent job of
identifying some common problems caused by certain choices - and then
shows you how to change your implementation (and there by changing
your "problems" to ones you may find more acceptable). I read this
book as part of a Java study group I was attending and some of the
ideas in it have really helped the quality of my (purely procedural)
Tcl code. So, while this is not the best choice for the first design
book you buy, I would heartily recommend it as the second or third.

-- 
Cynthia N. Kiser
cnk at ugcs.caltech.edu


More information about the Programming mailing list