- 1 -

The structure of patterns – Part II: Qualities

Christian Kohls

September, 26th, 2011

Abstract

This paper discusses qualities of good patterns using the metaphor of a path. Paths and their representations on maps are very well known concepts. This allows the use of common sense to understand properties of patterns that are otherwise hard to grasp. In a previous paper, the path metaphor was used to explain the meaning of context, problem, forces, solution, consequences, and the connections in a pattern language. This paper is a continuation of that work. It will discuss wholeness, encapsulation of wholes, abstraction that are whole, composition of new structures, openness and variation, generativity, evolution of patterns, and human factors.

Introduction

In The structure of Patterns (Kohls, 2010) I introduced a path metaphor to explain the context, problem, forces, solution and consequences. Let us reconsider the metaphor based on a hillside landscape. In such an environment, if we intend to hike from one place to another, we may encounter the problem that we cannot directly move in a straight line to the destination because we cannot cross canyons or pass over steep walls. Each path that guides us to the destination is therefore a solution to our problem: getting us from where we are to our desired destination.

Context: The context is the environment or the situation in which we find ourselves in. In the simple example of a hike, the context is the physical environment of the landscape as well as your current situation (where you are, how well trained you are, what your hiking skills are, which tools you have at hand etc.) and your goal or intent.

Problem and forces: In a changed context the same solution form may not fit any longer. Another context sets new constraints, boundaries, introduces new requirements and offers different opportunities. For example, the equipment and training of a hiker is part of the context and implies different fields of forces. An untrained hiker might be forced to choose a path that is not too steep. The right equipment might offer new opportunities (e.g. climb a steep wall) but also introduce new limits. Forces provide the reason for design decisions: Why do we have to follow this specific path? Why do we have to go there? Why do we need this specific form? Why can’t we do another thing instead?

Solutions: A solution is one known way that takes into account all the forces that matter in a specific context and balances them to a satisfying extent. The form of the solution is a path that has proven in the past to actually lead to the intended goal and takes the forces appropriately into account. It does not mean that it is the only path that does exist nor does it claim to be the best path. There might be paths that even fit better to the context but that have not been found yet.

Consequences: Each path has different advantages, disadvantages, liabilities, and suggests different next steps. In the process of searching a decision between different solutions, the pros and cons are weighed against each other; the consequences are compared. The better we understand the consequences the better we can find an appropriate decision.

The simplicity of the path metaphor enables us to show how the territory and the overall situation define which paths are potential solutions and which properties each path has In the following sections I will draw my examples mainly from the field of software science and education. However, since the target audience is everybody interested in patterns – all kind of design patterns – I will avoid getting too technical.

The Quality of Patterns

Once we understand the descriptive components of patterns and the relations in a pattern language it is time to ask: what makes a pattern a good pattern? Which are the qualities of a pattern that we are looking for? Certainly we want that the pattern works and solves the problem to a satisfying degree. But a pattern should also be elegant, work with other patterns to form a solution on a larger scale, and be flexible to be used in various situations. The next sections will discuss the qualities and illustrate them for the path metaphor: wholeness, encapsulation of wholes, abstraction that are whole, composability of new structures, openness and variation, generativity, evolution of patterns, and human factors.

Wholeness

Paths that are whole

The most important quality of a pattern to be alive and meaningful is its degree of wholeness. In our path example a basic requirement is that the path should work as a whole. At no point of the path should there be an obstacle that cannot be managed (or a force that cannot be resolved). The path has to fit to its environment at all times. A single misfit – such as a blocked passage or a deep river without a bridge – will invalidate the whole path. The path also has to connect properly to other paths in order to be open for the composition of larger paths.

A larger whole (a long path) consists of sub-wholes (sub-paths). The larger whole orchestras the sub-wholes, e.g. the path as a whole sets the requirements for the sub-paths. Not any partition of the whole path into sub-paths is meaningful. For example, if we take an arbitrary sub-path between point A and B, then this path is hardly self-contained.

Figure 1. Whole paths.

There is only one way to go to A and only one way to continue from B. Hence, the sub-path starts and ends “nowhere”. However, at points C and D the path connects to multiple other paths. The section between C and D is more whole because it can stand on its own – it is a whole solution. It makes sense in multiple contexts, i.e. coming from different paths and following on different paths afterwards. While it is only whole when it properly connects to the parts of the environmental paths its inner form – that is the structure of the path – can be shaped nearly independently according to the local surroundings.

It would be wrong to consider the sub-paths as ready made building blocks that can simply be plugged together. A path can only be whole if takes the whole situation into account. But the actual situation is always a little different (variation in weather, conditions of the people who hike). This calls for differentiation every time the path is followed. A particular hike along a path unfolds differently every time. Wholeness suggests that each detail matters and affects the experience of following a path as a whole. Changing the path at one point will have consequences for the whole path. Most figuratively expressed, a single choice between walking to the left or to the right may lead to different shapes thereafter.

The whole is not only affected by the physical surroundings. The mood of the hiker can change the path altogether. Whether the water bottles have been refilled at some point may alter the next steps as well.

Discussion of wholeness

A software system has to work as a whole. That means it has to fit to the requirements on a semantic level (e.g., the software should serve the needs of the end-user) and its inner design must be stable when the system evolves according to new requirements.

Every programmer is well aware that errors or design failures in the small can cause the whole system to break. Each part of the system has to be designed in a way that it serves the need of the whole. Wholeness means that we are not considering software modules or objects in isolation. An encapsulated component can help to reduce the complexity of designs; hence, libraries are means to re-use algorithms and code. However, if a library cannot be adapted to the specific needs of a situation it cannot serve the whole appropriately: “it is impossible to form anything which has the character of nature by adding preformed parts.” (Alexander, 1979, p. 368). The parts of a software design have to fit together across the whole architecture. Patterns capture structures and relationships that are not limited to independent parts: “These deep components of architecture and design are larger than any architectural building blocks such as procedures or objects.” (Copelien,1996) Wholeness means a balance between the inner forces and the environment; all parts of a system have to be in balance with all the other parts at the same time (Gabriel, 1996).

A whole form emerges out of the dynamic interplay of whole forms and serves itself to a larger whole.

Example 1: Each part of a software system has to be designed in a way that it serves the need of the whole in order to give it a gestalt: “the concept of ‘need of the whole’ refers to the grand designs or architecture of the piece of software under development, and ‘needs of the parts’ refers to the inevitable changes the various parts of the software undergo. It’s difficult to change the grand design of software: You cannot expect to evolve a window system into a spreadsheet. Although the primary need of the whole is to remain true to its essence, the parts often must change. For instance, one sort of window system could evolve into another” (Gabriel, 1996, p.13)

Example 2: In education, a blended learning scenario consists of whole parts such as INITIAL MEETING, ONLINE SEMINARS, DISCUSSION FORUMS, SHARED GROUP SPACE and many others. While each of these forms can be considered as a self-contained form, the whole scenario is more than the sum of these parts. Something new emerges and one gets more out than was put in. However, what is very often overseen is that the parts too depend on the whole, i.e. on the environment. In a holistic view each part reflects the whole to certain degrees. For example, the blended learning scenario does not only have an INITIAL MEETING but the INITIAL MEETING itself fully depends on the scenario. For example, if there are ONLINE SEMINARS and DISCUSSION FORUMS planned then these parts will influence what happens in the INITIAL MEETING (e.g. make a demonstration how to use the supporting online tools). Likewise, the INITIAL MEETING will have an impact on how these online tools will be used (e.g. a poor introduction or motivation may lead to very rare use); what happens in the SHARED GROUP SPACE depends on the other parts as well, such as the INITIAL MEETING or announcements in a DISCUSSION FORUM. It shows that the whole blended scenario emerges not from the single components but from the interplay of connected parts. A form without context is not a whole form – what is the meaning or value of an EDUCATIONAL BLOG if it is not used for a purpose in a specific situation? Hence, a part gets its character to some extent from the whole.

Accordingly we cannot consider any part without its context. And the whole that is composed of sub-wholes is more than the sum of its parts. That means the parts are giving the whole its character but at the same time the whole context influences the meaning of the sub-wholes: “Wholeness is seen as primary while the parts are secondary in the sense that what they are and what they do can be understood only in the light of the whole. I could summarize this in the principle: The wholeness of the whole and the parts.” (Bohm, p. 22)

The whole does not come after the parts but is rather primary in that it organizes the parts, making them work together, and effectively influences what the parts are. It is a design form as a whole that orchestrates how the single parts are unfolded. However, the parts are not determined by the whole – this would make the whole a super-part: “…a part is a part only inasmuch as it serves to let the whole come forth, which is to let meaning emerge. A part is only a part according to the emergence of the whole which it serves; otherwise it is mere noise. At the same time, the whole does not dominate, for the whole cannot emerge without the parts. The hazard of emergence is such that the whole depends on the parts to be able to come forth, and the parts depend on the coming forth of the whole to be significant instead of superficial.” (Bortoft, 1996, p. 11). We experience wholeness if we follow a story in a novel. The plot unfolds chapter for chapter, paragraph for paragraph, sentence for sentence, word for word. The parts make the story and the story gives meaning to each of the parts. A simple sentence such as “The door was locked” has its own meaning; however, in the context of a larger story its meaning can alter. A locked door has a deeper meaning in a crime story where a victim tries to escape. The same sentence can have a different meaning in a love story: “She wanted to tell him her feelings and caught up with the train at the local station. The door was locked.” The context does not only change the meaning of the sentence. A single sentence that reveals an important fact or event can also change the meaning of the whole story. The story directs the development of the events, scenes and characters; at the same time the story is made exactly out of these interrelated parts.

The whole depends on its context

The context not only implies how the “inner” parts have to be orchestrated but actually changes what these parts are in a field-like effect. Consider figure 2 in which we use the very same circles in two different contexts. In context (a) the circles are eyes, in context (b) they are part of loudspeakers. Hence what the very same form is depends on the context. Yet the form itself contributes to the context – without the circles we would neither see a face nor the loudspeakers as (c) or (d) show. Schümmer (2005) draws the analogy to Heidegger's phenomenology: “Situatedness (In-der-Welt-sein) describes a situation where the individual cannot understand his being without taking the current context, the situation, into account.” (Schümmer, 2005, p. 10).

Figure 2. The meaning of the circles depends on their contexts.