In 1996 Brian Foote and Joseph Yoder wrote “The Selfish Class” , a very important paper giving a code’s eye view of software reuse and evolution. Of course the analogy is with Richard Dawkins’ gene’s eye view in his book “The Selfish Gene”. Foote and Yoder discussed attributes of successful classes such as “works out-of-the-box” and “low surface-to-volume ratio”.
Our focus here also deals with classes in the sense of object-orientation, but we discuss them in relation to the representation of memes, another term coined by Dawkins.
The Wikipedia entry says that a meme refers to a unit of cultural information that can be transmitted from one mind to another. Dawkins said, Examples of memes are tunes, catch-phrases, clothes fashions, ways of making pots or of building arches. A meme propagates itself as a unit of cultural evolution analogous in many ways to the gene.
What is this unit of cultural transmission? Will we ever find something like a DNA, the chemical molecules of genes? We don’t think so.
We suggest that memes are classes and patterns (note: patterns are sets of classes which cooperate and work together in a certain way, see e.g. the gang of four’s book ),


and hence are bits of information or software in our brains. Should we, one day, be able to extract the information content of our brains, we might be able to read those classes and patterns.
We say that memes are classes, and not just any bit of information, because classes encapsulate both attributes and procedural knowledge. A tune, for example, has the attributes the composer, the singer, dates, but also the music itself encoded as a procedure.
Origami technique of paper folding to make a ship is another example of a class with coded instructions.
Sometimes a class is not sufficient to represent a meme, the Romeo and Juliet meme for example, consists of entities with specific relations to each other, and a certain sequence of events. We propose to represent such memes as patterns. In the pattern, a class has a certain role, and classes and send messages to other classes to do something. This fits in very nicely with Dawkins view of communication, not as information exchange, but as manipulation.
Other more complicated memes such as the notion of a deity can be represented as more complicated patterns.
The consequence of looking at memes as classes is that all properties of object-orientation would apply: instantiation, abstract classes, inheritance, and messaging. One meme such as a joke could involve a bicycle or motorcycle, or an abstract 2 wheeled vehicle.
Memes actually exist in different forms, a passive storage such as books, active in our minds, or on the internet and computers, or as unwritten traditions and customs. The distinction is between active and passive, and between vehicles that only stores, and those that can manipulate and propagate. Human minds can modify memes and can propagate them. Libraries are only passive repositories. Computers if programmed to do so, can manipulate and propagate memes. TV commercials are basically programs showing multimedia content and in so doing help propagate memes.
We therefore have the following categories of meme repositories:
- passive libraries
- human minds
- tools for propagation such as computers, media, and internet
The third category needs to be programmed by human beings. One day perhaps, with advanced artificial intelligence, computers could be more than just tools.
Returning to our classes and patterns, in categories 1 and 3 memes are just information, whether procedural or not. In the second category, a meme is not just a piece of information, it has emotional attachment to the host. Think about many products where the brand name actually has more prestige value than the products actual utility value.
Many memes will be competing for our attention, but only few will have a strong attachment to us, just like a suicidal terrorist infected by a doctrine. The attachments are changing all the time, one time we may be entirely occupied by earworms (songs that one can't stop humming or thinking about), just like a computer under a DOS (denial of service) attack, at other times our minds could be serene in mediation with minimal attachments.
The attachments are obviously just as important as the content.
Hence our title: memes as classes and patterns with emotional attachments.
We shall later explore this further and deal with debugging memes that are mind viruses using meditation techniques.