Dotplot Patterns: A Literal Look at Pattern Languages Jonathan Helfman AT&T Research Murray Hill, NJ 07974 jon@research.att.com ABSTRACT This paper describes the dotplot data visualization technique and its potential for contributing to the identification of design patterns. Pattern languages have been used in architectural design and urban planning to codify related rules-of-thumb for constructing vernacular buildings and towns. When ap- plied to software design, pattern languages promote reuse while allowing novice designers to learn from the insights of experts. Dotplots have been used in biology to study similar- ity in genetic sequences. When applied to software, dotplots identify patterns that range in abstraction from the syntax of programming languages to the organizational uniformity of large, multi-component systems. Dotplots are useful for design by successive abstraction—replacing duplicated code with macros, subroutines, or classes. Dotplots reveal a perva- sive design pattern for simplifying algorithms by increasing the complexity of initializations. Dotplots also reveal pat- terns of wordiness in languages—one example inspired a design pattern for a new programming language. In addition, dotplots of data associated with programs identify dynamic usage patterns—one example identifies a design pattern used in the construction of a UNIX(tm) file system. Keywords: Biology, homology, reverse architecture, self- similarity, Shakespeare, shuffle, similarity structures, soft- ware design, software visualization. Introduction Pattern languages were identified by Christopher Alexander, an architectural designer, who began describing the design of vernacular buildings and towns in terms of collections of templates or rules-of-thumb that when applied in the right context would result in functional and beautiful structures [1]. Alexander called his templates patterns, and he called collec- tions of related patterns, pattern languages. Alexander’s work has had a strong influence on the object- oriented design community, where the goal of defining pat- terns is to promote reuse while allowing novice designers to learn from the insights of experts. Figure 1: About 2 million lines of C code; an entire module of a telecommunications switching program. Software patterns are found at different levels of abstraction. Low-level patterns include idioms, useful design techniques for specific programming languages [5]. Higher-level pat- terns have been identified in behavioral interactions between objects [13] and classes [17]. Even more abstract are high- level design patterns, or simply design patterns, that are inde- pendent of specific programming languages and application domains [11]. Design patterns capture “the intent behind a design” by identifying “classes, instances, their roles, collab- orations, and the distribution of responsibilities” [10]. Design patterns have been identified through reverse architecture,a process of “analyzing many software systems in an effort to recover recurring designs and rationals behind them” [21]. Reverse architecture requires reading a lot of code, learning about many different systems, and reflecting on the relative merits of previous designs. Unfortunately, reverse architec- ture requires a tremendous amount of time and thought. Visualization tools may be particularly helpful for identify- ing software design patterns. Previous work in visualizing object-oriented systems has shown that animated plots of in- formation about class interactions are useful for identifying