Programming with Tuples (was On Reuse) - still reuse

Ralph E. Johnson johnson at cs.uiuc.edu
Wed Jul 7 10:25:35 UTC 1999


>One answer is, "Better factoring."  If that one method were several smaller
>methods, then each contributor would only be modifying unit methods.  That
>may be, but it seems to me that there is no one factoring that would mean
>that *all* possible enhancements/additions/modifications to the system
>would only touch unitary methods.  There's probably a theorem about O-O
>systems that makes this case somewhere.

Perhaps no design makes every possible change easy, but there are
designs which make all the common changes easy.  I think that better
factoring *is* indeed the answer.  The problem is that you can't
come up with that factoring when you first write the software because
you don't know what changes are most likely.  But as changes arise, you
refactor to make those changes easy.  After awhile, you'll have seen
the common kinds of changes and so your software will handle the common
changes well.

So, when you make your first version of the software, just try to make
it easy to understand, don't worry about making it easy to change.
As your software gets reused and changes, refactor it so that it 
accomodates the changes that actually occur.  With experience, the
software will adapt to the kinds of changes that actually happen,
instead of the changes you can imagine might happen.

-Ralph Johnson





More information about the Squeak-dev mailing list