Table of Contents

Kohls, C. & Scheiter, K. The Relation between Design Patterns and Schema Theory. Proceedings of the 15th Conference on Pattern Languages of Programs, ACM Press, 2008

Abstract

Patterns capture the design knowledge of experts. But how is this expertise represented by the expert? When we mine for patterns, what is the ground in which we seek? Are there patterns in our head? And if so, how do the patterns in our head relate to the design patterns in the real world and the patterns we document? This paper tries to give some answers by referring to the principles of psychological schema theory. Schemas are some sort of patterns in our heads. A special type of schema, the problem schema, has many features in common with design patterns. The paper will discuss how schemata are organized in memory, how they are activated and constructed. At the end, we will discuss implications for the mining of patterns.

Comments

Yann-Gaël Guéhéneuc, 2013/09/20

The paper makes very interesting links between design patterns and schema theory, which is one theory to explain memory and its ability to recognise and use “schema” efficiently. It does not go into the reasons why our memory would use schema (probably from our evolution from hunters-gatherers…) but how this theory about the “conceptual model of human memory” explains our like of design patterns and some implications. Also, “[i]t does not make any statement about the nature of reality, that is whether these ``real forms”“ [document by patterns] exist in an objective reality or in a socially/individually constructed reality”.

First, the paper recalls briefly the history of schema theory, starting from Plato and Aristotle (!) who spoke of the “essence or nature of things” all to recent works by Barlett, who focused on “how schemas are acquired, applied, stored, and manipulated in memory, passing by Kant, for whom “a schema was the link from empirical information to the pure categories or concepts” in memory.

Second, the paper makes it clear that ”[a] pattern does not exist as a real thing, because real things can only manifest patterns“ and that ”[l]ike patterns, a problem schema “allows problem solver to group problems into categories in which the problems in each category require similar solutions”“. Schema are “mental representations in an individual's mind”, which “bundles all experience within one class”, “abstracting away from irrelevant or superficial variations of these experiences”. The schema are used by the brain to “recognise similar and discriminate dissimilar new experiences”. The paper then interestingly links schema theory and the “quality without a name”: if a schema is “whole”, as a gestalt, then it is of quality, quality without a name, which “is a synonym for wholeness in the pattern concept summary”.

Then, the paper defines/describes schema, introducing the ideas of variables, which can take constrained range of values. Specific configurations of some variables values imply some values, further constrained values of other variables, in a kind of (positive or negative) feedback loop. It also introduces relations among schema: has-a/part-of relations and is-a relations and describes how memory builds schema, when solving a problem the first time, or how memory retrieves/uses schema when facing a recurring situation. It emphasises that schema are acquired/refined “either by learning, by doing, or [by] studying illustrating examples” and that the information acquired “often changes […] the problem space itself”. This last point is interesting with respect to documenting patterns and teaching patterns! “This implies that our perception of things depends on our previous experience and what we expect about situations” and that “role play” is useful.

The paper then makes the point that a “schema A […] is more than the sum of its sub schemas because it itself defines additional structure concerning the way in which [schemas] B1…Bn interrelate.” However, it does not say much about emerging properties. Yet, when describing the assimilation process, it reports that T + I → AT + E, where T is the current schema and I is the acquired information will give a modified T (by A > 1) plus some left over elements, E. AT may describe emerging properties because A is greater than 1.

Of course, with respect to design patterns, the point of the paper is that design patterns (in a designer's mind) are similar to schema and that the forms of documented patterns help designers learn and assimilate/accommodate new schema: “A design pattern, too, is a logical structure that consists of variables” and ”[it] is attempt to discover some invariant features, which distinguishes good places from bad places with respect to some particular [constrained]“. The paper describes how these patterns can be activated in memory, possibly with some measure of likelihood when competing/conflicting patterns exist. However, the paper does not say anything about the “cost” of computing a likelihood for all patterns in memory. We could assume some kind of hierarchical bottom-up activation, as hinted in the paper about “visual patterns”, and further discussed in Palmer's book (which we have in the lab. library!). Moreover, it recalls that Rumelhart and Norman state that “the selection […] of schema […] is called comprehension”, what about program comprehension?

The paper makes other interesting points, including that ”[e]xperts usually have a better understanding of a given problem in their domain in that they can represent problem based on its second order features rather than its first order feature“, that “our perception oft [design problem] depends on our previous experience and what we expect about [the design]” (which is typically express when an expert says “Actually, the real problem is…”, and that “typical [designs] are retrieved by [designers] in term of general information rather than the specific information [but that] for extraordinary situations, [designers] often remember the specific details”, (which highlights the interest of reading patterns, code). Yet, it recalls that “schema [are] never fully [whole] because after thousands of hours of practice, [designer] can still improve his or her performance.”

Finally, the paper concludes on implications of schema theory on design patterns. It is unfortunate that some of these implications are hard to grasp or not directly backed up by evidence in the paper, for example that “individually constructed patterns do not differ that much when they are communicated” and that ”[t]he pattern format therefore seems to be adequate vehicle to capture [experience]“. Indeed, the examples in the paper are not always relating schema theory to design patterns but stay at a very high, yet interesting, level.