Icpc 2011 storey

50
SHriMP Views: The Untold Story Margaret-Anne Storey University of Victoria 011 Award for Most Influential Paper from IWPC 2001. teractive Visualization Environment for Exploring Java Programs" ed by Margaret-Anne Storey, Jeff Michaud and Casey Best.

description

SHriMP Views: The Untold StoryPresentation based on Influential Paper award from IWPC 2011.

Transcript of Icpc 2011 storey

Page 1: Icpc 2011 storey

SHriMP Views: The Untold Story

Margaret-Anne StoreyUniversity 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.

Page 2: Icpc 2011 storey

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

Page 3: Icpc 2011 storey

Acknowledgements….

• My students and former colleagues:– Hausi Muller– Kenny Wong– Casey Best– Jeff Michaud– Rob Lintern– Ian Bull– Chris Callendar– Del Myers– …

• Funding:– NSERC– University of

Victoria– IBM– Darpa– Stanford University– MIT– NASA– DRDC

Susan Sim, Filippo Ricci and other members of the committee for selecting this paper

Page 5: Icpc 2011 storey

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)

Page 6: Icpc 2011 storey

Many visualization tools

• Rigi, PECAN, Seesoft• Landscape views, Hy+• Surgeon’s Assistant• Bauhaus• …..• …..• …..• Imagix 4D• Sotograph• Polymetric views

Page 7: Icpc 2011 storey

What about Fred Brooks???

Page 8: Icpc 2011 storey

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

Page 9: Icpc 2011 storey

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

Page 10: Icpc 2011 storey

Other trends…

• Higraphs in software engineering [David Harel, 1988]

• Pad++, a zoomable user interface [Bederson et al., 1994]

• Continuous Zoom [Bartram et al., 1995]

Page 11: Icpc 2011 storey

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]

Page 13: Icpc 2011 storey

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

Page 14: Icpc 2011 storey

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.]

Page 15: Icpc 2011 storey

A Cognitive Framework for Describing and Evaluating Software Exploration Tools

Supportingprogram comprehension

Bottom-up

Top-down

IntegratedIntegrated

NavigationNavigation

Orientation cuesOrientation cues

User interfaceUser interface

Bottom-upBottom-up

Top-downTop-down

NavigationNavigation

Orientation cuesOrientation cues

User interfaceUser interface

Cognitive Design Elements

Cognitive Design Elements

Enhanceprogram comprehension

Enhanceprogram comprehension

Reducecognitive overhead

Reducecognitive overhead

IWPC 1997, JSS

Page 16: Icpc 2011 storey

Integrated

Bottom-up

Top-down

Enhanceprogram comprehension

Provide directionalnavigation

Orientation cues

NavigationNavigation

User interface

Reducecognitive overhead

Reducecognitive overhead

Cognitive Design Elements

Support arbitrary navigation

Support arbitrary navigation

…bookmarks, search engines

Indicate options forreaching new locations

Indicate options forreaching new locations

Display path to the focus

Indicate the current focus

…histories, overview windows, trails

Page 17: Icpc 2011 storey

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

Page 18: Icpc 2011 storey

Almost 10 year old demo!

Page 19: Icpc 2011 storey

What tools do programmers need to understand

programs?

A Cognitive Framework of Design Elements

to guide tool design

Evaluate tool usefulnessand usability with

user studies

How do programmersunderstand programs?

Page 20: Icpc 2011 storey

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

Page 21: Icpc 2011 storey

Creole: Integration of SHriMP with Eclipse

2007 Demo …

Page 22: Icpc 2011 storey

Recap on noteworthy features• Filmstrip – semantic bookmarks

(snapshots)• Scripting (javascript)• Customized views• On demand visualization

Page 23: Icpc 2011 storey

Beyond software visualization…. • Ontologies in Protégé, Jambalaya

(Darpa, Stanford University)• Version control information, Xia • Business flow diagrams,

Ebi (IBM)• Assembly (DND)

Page 24: Icpc 2011 storey

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…)

Page 25: Icpc 2011 storey

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]

Page 26: Icpc 2011 storey

The next chapters?

Page 27: Icpc 2011 storey

NavTracks/VizTracks [ICSM2005]

Page 28: Icpc 2011 storey

Beyond Bookmarks: Waypoints

Page 29: Icpc 2011 storey

Waypoints and metadata

• Used by 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

Page 30: Icpc 2011 storey

TagSEA [CHI2006, ICSM2007]– Can waypoint in code, outside code,

docs, xml, breakpoints, url etc.– Tags used for indexing waypoints

Page 31: Icpc 2011 storey

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…

Page 32: Icpc 2011 storey

Dynamic Interactive Views

For Reverse EngineeringUses Dynamic Analysis to Create

Trace-Focused User Interfaces for IDEs

Page 34: Icpc 2011 storey

Choosel

open source frameworkfor creating web-based

visualization environments with multiple coordinated views

Try out Choosel at: http://choosel-mashups.appspot.com

Page 35: Icpc 2011 storey

“each software project is alive performance”

www.jazz.net

Page 36: Icpc 2011 storey

“each software project is alive performance”

Page 37: Icpc 2011 storey

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

Page 38: Icpc 2011 storey

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!

Page 39: Icpc 2011 storey

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!

Page 40: Icpc 2011 storey

Some advice… (3)• Does your tool really answer difficult questions

that developers really care about? How do you know? Theories or insights!

Page 41: Icpc 2011 storey

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!

Page 42: Icpc 2011 storey

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]

Page 43: Icpc 2011 storey

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”

Page 44: Icpc 2011 storey

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

Page 45: Icpc 2011 storey

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

Page 46: Icpc 2011 storey

Contact me

• Email: [email protected]• Blog:

http://margaretannestorey.wordpress.com/

• Twitter: @margaretstorey, @web2se• Papers, tools:

http://www.thechiselgroup.org

Page 47: Icpc 2011 storey

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

Page 48: Icpc 2011 storey

References (2)• Mental imagery in Program Design and Visual Programming,

by M. Petre and A. Blackwell, http://www.cl.cam.ac.uk/~afb21/publications/IJHCS.html

• Price et al’s principled taxonomy of software visualization: http://www.dgp.toronto.edu/people/RMB/papers/p20.pdf

• Cognitive questions in software visualization: http://www.cl.cam.ac.uk/~afb21/publications/book-chapter.html

• Research methods in the social Sciences, by J. McGrath, http://social.cs.uiuc.edu/class/cs598kgk/papers/methodology-mcgrath.pdf

• Pacione, M.J., Roper, M., and Wood, M. A Novel Software Visualisation Model to Support Software Comprehension.  In Proceedings of WCRE. 2004, 70-79.

• Andrew Bragdon, et al.: Code bubbles: a working set-based interface for code understanding and maintenance. CHI 2010: 2503-2512

Page 49: Icpc 2011 storey

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/SelectingEmpiricalMethods.pdf

Page 50: Icpc 2011 storey

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