The Selfish Class (Irrational Software)
Brian Foote and Joseph W. Yoder has written a lot of interesting things about software-related patterns. One of my favorites is The Selfish Class, a paper about the characteristics of long-lasting code. The title of the paper refers to a book called The Selfish Gene, which looks at organisms as “replicators” for genes – basically that humans and other animals exist solely for the purpose of replicating genes.
Foote and Yoder’s paper looks at programmers as replicators for classes and talk about which properties a class must have to “attract” programmers and get replicated (by being reused). They write, for example, that the class must provide enough defaults to “work right out of the box”, but be tailorable and exhibit a gentle learning curve.
(Reuse is perhaps not as hot a topic today as a couple of years ago, but I think it’s fair to talk about classes getting “reused” within a project. Then, you want to attract other members on the team to your classes in order to prevent duplication. So this paper is valid even if you think that reuse – in the sense that you build new applications by glueing together a bunch of already available components—is good in theory but takes too much work to achieve in practice.)