SHriMP Views: The Untold Story Margaret-Anne Storey University of Victoria ICPC 2011 Award for Most Influential Paper from IWPC 2001. "An Interactive Visualization Environment for Exploring Java Programs" authored by Margaret-Anne Storey, Jeff Michaud and Casey Best.
The storyline • History of SHriMP Views – What inspired it – Lessons learned along the way (tools and studies) – How the tool and underlying theory evolved • Our follow-on work to SHriMP • Other visualizations that show promise for the near future • Some advice for researchers
Acknowledgements…. • Funding: • My students and former colleagues: – NSERC – – Hausi Muller University of Victoria – Kenny Wong – – Casey Best IBM – Jeff Michaud – Darpa – Rob Lintern – Stanford University – Ian Bull – MIT – Chris Callendar – NASA – Del Myers – DRDC – … Susan Sim, Filippo Ricci and other members of the committee for selecting this paper
10 years ago….. • Year 2000 bug was still fresh in our memories! • PCs around for 20 years • eCommerce was on the rise • Integration, migration, interoperability (legacy code)
Fred Brooks misquoted… • He claims software is inherently invisible and unvisualizable… not amenable to a geometric mapping… But are software code, designs, documentation, invisible? • His quote referred to PhDs on visual programming! Not to visualization of preexisting software artifacts…. No silver bullet: Essence and accidents of software engineering, 1987 IEEE Computer
Information visualization • People have used external aids for centuries to amplify cognition (e.g. paper, slide rule, diagrams, charts) • Visualize: to form a mental image or vision • The use of computer supported, interactive, visual representations of abstract data can amplify cognition • Visualizations can help us gain insight about data
Other trends… • Higraphs in software engineering [David Harel, 1988] • Pad++, a zoomable user interface [Bederson et al., 1994] • Continuous Zoom [Bartram et al., 1995]
SHriMP – A Software Exploration Tool Simple Hierarchical Multi-Perspective Views (for Rigi): • Make better use of limited screen area – Leveraging sophisticated animation and layout, fisheye view features [ICSM 1995]
Lessons #1 Evaluated early version of SHriMP and compared it to Command Line and Rigi (multiple windows) [WCRE 1996] • “Source code is king” (Janice Singer) • Search is an essential activity in program comprehension (Lethbridge, Singer) • Fisheye views not so useful! • Efficiency was a concern
Comprehension theories • Top-down comprehension model [Brooks, Soloway, Ehrlich, 1986] • Bottom-up comprehension [Shneiderman/Mayer 1979, Pennington 1987] • Opportunistic and systematic strategies [Littman et al., Letovsky 1987] • Integrated meta-model [Vans, von Mayrhauser 1995] • Hypermedia navigation (coherence, legibility) [e.g. Thurston et al.]
A Cognitive Framework for Describing and Evaluating Software Exploration Tools Bo B t o t t o t m o - m u - p u Su E p n p h o a r n t c ieng pr p o r g o r g am r
Top To T - p d - o d w o n w am co c m o p m r p e r h e e h n e si n on sion on In Integrated Cognitive Design Elements Navig vi a gatio i n on Reduce cognitive Or O ie i ntatio i n cues e overhead User i r n i terface c IWPC 1997, JSS
Bottom-up Enhance program Top-down comprehension Integrated Provide directional navigation Cognitive Design Elements Na N vig avig atio atio n n Sup Sup por portt arb arb itrary itrary na n vig avig ation ation R R ed ed uce uce Indicate the current focus co co gni gn tive itive o o verh verh ead ead Orientation Display path to the focus cues Indi Ind cate icate o o pt pti ion on s s for for User interface re re ach ach ing ing n n ew ew llocatio ocatio ns ns …bookmarks, search engines …histories, overview windows, trails
SHriMP – A Software Exploration Tool Simple Hierarchical Multi-Perspective Views (for Rigi): • Make better use of limited screen area – Leveraging sophisticated animation and layout features • Integrate code browsing using hypertext (HTML objects) embedded in the graph – Using nested graphs (containment) and ZUIs – Support for top down and bottom up navigation – Integrated search, source code views
Almost 10 year old demo!
How do programmers understand programs? What tools do programmers need to understand programs? A Cognitive Framework of Evaluate tool usefulness Design Elements and usability with to guide tool design user studies
Lessons #2 Compared SHriMP with Rigi and SNiFF++ [WCRE 1997] • Overviews in Rigi and SHriMP communicated a mental map • Opportunistic sightseeing behaviours observed in SHriMP • Need for better searching and filtering tools in SHriMP • Layouts not so important (but preserving mental map is) • Align with the tools developers use (reduce friction) • “Star programmers” can use any tool
Creole: Integration of SHriMP with Eclipse 2007 Demo …
Beyond software visualization…. • Ontologies in Protégé, Jambalaya (Darpa, Stanford University) • Version control information, Xia • Business flow diagrams, Ebi (IBM) • Assembly (DND)
Lessons learned #3 • Need for on-demand task driven visualization as opposed to overviews… • Customization required but very few users will write scripts (unless it is easy to do so!) • Source code should be editable… Need to be able to play with the invisible stuff… • Executing the program is important (duh…)
Lessons learned about empirical studies • Need for an underlying theory! Otherwise you only know one tool is better than another not why… – Not enough to say my users liked it or that they used it or that they answered questions they hadn’t actually thought of before they saw my tool! • Student programmers are *not* the same as prof devs • Statistical significance is not the holy grail (too many controls), strive to be convinced (but convincing reviewers is harder) • Understand the different tradeoffs of empirical studies and choose wisely and purposefully [McGrath94, Easterbrook2007]
The next chapters?
Beyond Bookmarks: Waypoints
Waypoints and • Usemet d by adata geographical positioning systems (GPS) to save locations for future navigation • They can be entered explicitly by entering lat/long coordinates or during navigation • They have metadata
TagSEA [CHI2006, ICSM2007] – Can waypoint in code, outside code, docs, xml, breakpoints, url etc. – Tags used for indexing waypoints
Waypoints -> Tours [ICSE2007] • Notion of user-defined trails was also proposed by Vannevar Bush for Memex (Bush, 1945) • Use cases for source code tours: Code review, education, testing, debugging…
Dynamic Interactive Views For Reverse Uses DynE a ngi mic An ne alys e is r to ing Create Trace-Focused User Interfaces for IDEs
“each software project is a live performance” www.jazz.net
“each software project is a live performance”
Other exciting research! • Many other specialized visualization, exploration tools… tools for analytics… • Software cartography (Adrian Kuhn et al.) • Software Canvas (Rob Deline et al.) • Code bubbles (Andrew Bragdon et al.) • Debugger Canvas – http://www.youtube.com/watch? v=3p9XUwIlhJg
Some advice… (1) • Eat your own cooking – You need to feel the pain that your tool helps resolve – You also need to feel the pain of using your own tool – But don’t assume that this will be enough! adoption is hard!
Some advice… (2) • Focus on continuous need for comprehension rather than just the software immigrant… • Nowadays easy to ask people for advice (e.g. StackOverFlow…)… Can’t visualize what you don’t have yet!
Some advice… (3) • Does your tool really answer difficult questions that developers really care about? How do you know? Theories or insights!
Theories are littering the landscape! • Cognitive dimensions (Green and Petre) • Cognitive framework of design elements (Storey) • Cognitive support (Walenstein) • Pacione’s software visualization task model • Ko’s theory of navigation • Sillito, Murphy, Robillard… theories on navigation and questions programmers ask • And more… • Look in other disciplines!
Comprehension theories • Top-down comprehension model [Brooks, Soloway, Ehrlich, 1986] • Bottom-up comprehension [Shneiderman/Mayer 1979, Pennington 1987] • Opportunistic and systematic strategies [Littman et al., Letovsky 1987] • Integrated meta-model [Vans, von Mayrhauser 1995]
Some advice… (4) • Understand different research method limitations • Be informed • Write fewer but better papers! • Fake it! “A Rational Research Process, How and Why to Fake it”
Concluding thought: Accident or essence? • Probably accidental…. Essential complexity may still remain but cognitive support can help us deal more effectively with that inherent complexity • Software visualization declining in popularity as a topic but not as a solution
Takeaways • Layouts not that important, but the mental map is • Need to integrate in the IDE with good support • Can’t visualize what you don’t have • Importance of theories, eating your own cooking • Consider different research methodologies • Cognitive support will never be out of fashion
References (1) • David Harel. 1988. On visual formalisms. Commun. ACM 31, 5 (May 1988), 514-530. DOI=10.1145/42411.42414 http://doi.acm.org/10.1145/42411.42414 • Benjamin B. Bederson and James D. Hollan. 1994. Pad++: a zooming graphical interface for exploring alternate interface physics. In Proceedings of the 7th annual ACM symposium on User interface software and technology (UIST '94). ACM, New York, NY, USA, 17-26. DOI=10.1145/192426.192435 http://doi.acm.org/10.1145/192426.192435 • Lyn Bartram, Albert Ho, John Dill, and Frank Henigman. 1995. The continuous zoom: a constrained fisheye technique for viewing and navigating large information spaces. In Proceedings of the 8th annual ACM symposium on User interface and software technology (UIST '95). ACM, New York, NY, USA, 207-215. DOI=10.1145/215585.215977 http://doi.acm.org/10.1145/215585.215977
References (3) • A Cognitive Framework by Storey et al: http://www.cs.uvic.ca/~mstorey/papers/jss.pdf • Margaret-Anne Storey, Hausi A. Müller, "Manipulating and documenting software structures using SHriMP views", International Conference on Software Maintenance (ICSM '95) (ICSM), 1995 • Rob Lintern, Jeff Michaud, Margaret-Anne Storey, Xiaomin Wu, "Plugging-in Visualization: Experiences Integrating a Visualization Tool with Eclipse", 2003 ACM symposium on Software visualization, 2003 • Theories, Methods and Tools in Program Comprehension: Past, Present and Future, M.-A. Storey, IWPC 2005 (also SCP 2006) • Cognitive Support in Software Engineering Tools: A Distributed Cognition FrameworkA Walenstein – 2002. • S. Easterbrook, J. Singer, M.-A. Storey and D. Damian, Selecting Empirical Methods,http://www.cs.toronto.edu/~sme/papers/2007/SelectingEmpiri calMethods.pdf
References (4) • Margaret-Anne Storey, Li-Te Cheng, Peter C. Rigby, R. Ian Bull, "Shared Waypoints and Social Tagging to Support Collaboration in Software Development", CSCW 2006: ACM Computer Supported Cooperative Work (CSCW), 2006 • Margaret-Anne Storey, Li-Te Cheng, Janice Singer, M. Muller, Del Myers, Jody Ryall, "How Programmers can Turn Comments into Waypoints for Code Navigation", International Conference on Software Maintenance (ICSM), 2007 • Li-Te Cheng, Michael Desmond, Margaret-Anne Storey "Presentations by Programmers for Programmers", 29th International Conference on Software Engineering (ICSE), 2007