Using diagrammatic explorations to understand code
David R. Karger, Robert Clell Miller, Vineet Sinha · 2008
Understanding code is a significant challenge for developers. This thesis examines the limitations of current tools that use diagrams to assist code comprehension and demonstrates the value of four design principles: (1) That diagrams should be based on familiar models such as UML class diagrams and layered architectural diagrams, so that developers can understand them without additional training. (2) That the familiar diagrams must be able to focus on specific parts of a codebase relevant to the developer's task, to prevent users from getting overwhelmed with irrelevant information. (3) That the focused diagrams need to support exploration of the codebase by directly interacting with the existing diagram. (4) That the focused diagrams can be created by users' exploration as needed for their tasks in traditional code editors. This thesis shows that understanding for software developers can be effectively supported by interactive exploration using focused diagrams of familiar representations of code. These ideas have been combined to build two tools: Strata, which displays using the popular layered architectural diagrams, and Relo, which is based on UML class diagrams. The tools have been evaluated using both controlled lab studies and field deployments. Study results have been positive, indicating merit in these ideas. (Copies available exclusively from MIT Libraries, Rm. 14-0551, Cambridge, MA 02139-4307. Ph. 617-253-5668; Fax 617-253-1690.)