By Margaret-Anne Storey, 2006
Presented by Rodrigo Araujo
How developers understand code?
Developer's expertise and background knowledge
Developer's current understanding of the program
How the mental model evolves using the developer's knowledge base + code + docs. Bottom-up or top-down
Questioning the role of a function or piece of code
What is the method for accomplishing a goal
What is the variable or one of the program functions
Invoked and developed using as-needed strategy, when code is familiar. It uses domain knowledge as starting point for formulating hypotheses
Invoked when unfamiliar, it's a control-flow abstraction
Dataflow and functional abstractions in the program. Developed after a partial program model is formed
Information needed to build the top-down domain model, program model and situation model
Should be designed to support top-down comprehension (Brooks, 1983). Important to document problem domain, programming concepts and domain knowledge
Support to search code by analogy and iterative searching. Should allow querying on the role of a variable, function, etc.
Top-down process requires browsing from high level abstractions to lower levels details, taking advantage of beacons. Bottom-up process requires following control and dataflow. Both should be supported
Programming environments need to provide different ways of representing programs: textual representation, call graphs, classes and their relationship, etc. These views, if easily accessible, should facilitate comprehension, especially if combined and cross-referenced
Hard task of mapping the code to the requirements
Hard task of mapping the code to the requirements
1. Where is a particular subroutine/procedure invoked?
2. What are the arguments and results of a function?
3. How does control flow reach a particular location?
4. Where is a particular variable set, used or queried?
5. Where is a particular variable declared?
6. Where is a particular data object accessed?
7. What are the inputs and outputs of a module?
Parsers & data gathering tools to collect static/dynamic data.
Parsers & data gathering tools to collect static/dynamic data.
Support clustering, concept assignment, feature identification, metrics. Dynamic analysis: code instrumentation
Parsers & data gathering tools to collect static/dynamic data.
Support clustering, concept assignment, feature identification, metrics. Dynamic analysis: code instrumentation
Code browsers, code editors, visualization tools
Spot on!
Spot on!
"[...] more prevalent with technologies such as .NET, J2EE and web services. One programming challenge that is occurring now and is likely to increase, is the combination of different paradigms in distributed applications, e.g. a client side script sends XML to a server application"
We have problems. But we definitely improved over the past few years
How can we avoid bloated IDEs?
Huge amount of ideas for developer tools
Great interdisciplinary study
Spreading awareness on how important cognitive models are
Evaluating tools is hard
Experience cannot always measure developers ability and creativity