The Selfish Class

Wednesday 21 May 2003This is over 21 years old. Be careful.

The Selfish Class is a paper by Brian Foote and Joseph Yoder about how to design software to maximize reusability. It isn’t quite a collection of patterns, more a collection of mindsets and philosophical goals, but with motto-able titles (such as “Low Surface to Volume Ratio”, and “Gentle Learing Curve”).

I think they’ve nailed a number of important principles. For a long time now, when designing a class, I’ve looked toward an intuitive feel of whether the class was “round” or not (meaning close to circular). A class is bad if its shape has become sort of bumpy or had pieces glued onto the sides. This is very similar to Foote and Yoder’s low surface to volume ratio (the circle is the 2D object with the lowest), though my criteria feels more about the single-mindedness of the class. I suppose they amount to the same thing.

Comments

Add a comment:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
Comment text is Markdown.