This is an old revision of the document!
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.
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
A > 1) plus some left over elements,
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?