using task context to improve programmer productivity€¦ · presented by: reto conconi, ... 3 8 6...
TRANSCRIPT
![Page 1: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/1.jpg)
SE Seminar Spring 09 - Reto ConconiTuesday, March 17, 2009 1
Using Task Context to Improve Programmer ProductivityPaper by: Mik Kersten and Gail C. Murphy, University of British ColumbiaPresented by: Reto Conconi, ETH Zürich
![Page 2: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/2.jpg)
2
Imagine…
� … you work on a Java Project with thousands of classesand you have to refactor a class and the IDE would showyou only the elements related to the class you refactor.
� Furthermore: whenever you want to switch between twotasks the IDE adapts and remembers your last open filesand the relevant elements.
![Page 3: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/3.jpg)
3
Mylyn
� Such a tool exists: Mylyn� Outcome of this research made by Mik Kersten and Gail C.
Murphy� Renamed Mylar to Mylyn due to legal problems� Today integrated in all eclipse packages except the classic
one.
![Page 4: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/4.jpg)
4
Task
� Task Defintion: “a usually assigned piece of work often to be finished within a certain time”� Fixing a bug� Refactoring� Feature additions
![Page 5: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/5.jpg)
5
First step: User defines task
![Page 6: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/6.jpg)
6
Task Context for the User
� Information that a programmer needs to know to complete the task
![Page 7: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/7.jpg)
7
Encoding User Interaction with IDE
� Track the events
![Page 8: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/8.jpg)
8
Task context for Mylyn
� Task context: “…a graph of elements and relationships of program artifacts…”
� Build graph when processing history of interactions
� Nodes: Artifacts (e.g. a Java class or a method)� Edges represent relations that the user followed:
References, inheritance
![Page 9: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/9.jpg)
9
Example
� Programmer navigates from the method call in class A to the method definition in class B (in Eclipse by pressing F3).
� This results in two “Selection” events in the history. One of the selection of the caller and a following one of the callee.
Calling method in
Class A
Called method in
Class B
Calling method in
Class A
Method definition
in Class B
Method calledin
Class A
![Page 10: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/10.jpg)
10
Weighting the elements
� The weighting is called degree-of-interest (DOI)� DOI = Interest - Decay
� Interest based on Frequency� Decay based on Recency
![Page 11: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/11.jpg)
11
Example Computation DOI of ResourceStructureBridge
� Total interest: 1 + 0 + 2 = 3� Total decay: (16-1) * 0.1 = 1.5� DOI = 1.5
Scaling:
• Selection � 1
• Commands � 0
• Edit � 2
• Decay � 0.1
![Page 12: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/12.jpg)
12
Projecting task context
� Project a task context onto data structures in the GUI� Package Explorer
� Filter files which have a DOI under a certain threshold
� “Problems” – View� Resort warnings according to DOI
� SVN commit� Commit only changes belonging to the task
� Set of JUnit tests� Execute only tests relevant to the task context
![Page 13: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/13.jpg)
13
Prediction
� Example:Task context
Class A
Class D
Class B
Class C
![Page 14: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/14.jpg)
14
OverviewEncoding Interaction
Constructing a Task Context
Project and predict
![Page 15: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/15.jpg)
15
Mylyn in action
� Video
![Page 16: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/16.jpg)
16
Field study
� Announced study at EclipseCon March 05� Study ended 8 months later� 99 signed up via webpage and downloaded Mylyn Monitor for first� 16 survived the hard criteria:
0
500
1000
1500
2000
2500
3000
3500
4000
4500
Edit Events
Mylyn (Treatment phase)
only Mylyn Monitor (Base phase)
What the participant used:
1000 Edit events ~ 1-3 weeksfulltime programming
![Page 17: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/17.jpg)
17
Field study results
Edit Ratio (= number of edits / number of selection s)
0.00
5.00
10.00
15.00
20.00
25.00
30.00
35.00
40.00
3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4
Participant
w/o Mylyn
w/ Mylyn
![Page 18: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/18.jpg)
18
Problems of the study
� Maybe only early-adopters followed the call to try it out� Which typical industry programmer is allowed to use
unstable experimental software in a business environmentor has enough time to participate?
� 16 participants maybe insufficient� Results may depend on the development process
![Page 19: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/19.jpg)
19
Shortcomings
� Related tasks: Task may not be a single atomic unit as seen by the tool� Solution may be to allow subtasks
� Task context lifecycle� Scaling and Treshold should change according to the size/hours of
work.
� Decay� The same DOI algorithm was used for all projections.� Problem: When commiting files to repository belonging to specific
task, all changed files should be commited and not only those with a high enough DOI.
� Solved since version 0.4 (in the study 0.3 was used)
![Page 20: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/20.jpg)
20
Conclusion
� Pro� Task switching is very useful� Filtering helps you to focus on elements you need� You can enable/disable filtering with a single click
� Contra� Risk to overlook relevant elements/warnings because of filtering
� Personally I begun to use it regularly� I am using: Task switching, Task integration� I am not using: Filtering and Prediction
� Similar functions can be found in IBM Rational Team Concert http://www.jazz.net� Changesets per Task, Task Integration, (Task switching)
![Page 21: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/21.jpg)
21
Storing context
� How to store the task context?
![Page 22: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/22.jpg)
22
Storing context
� The whole event history is stored!
![Page 23: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/23.jpg)
23
Storing context
� How to restore the task context?
![Page 24: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/24.jpg)
24
Example Computation
� Total interest: 1 + 0 + 2 = 3� Total decay: (46-1) * 0.1 = 4.5� DOI = -1.5
Scaling:
• Selection � 1
• Commands � 0
• Edit � 2
• Decay � 0.1
Event Kind Origin Target(s)1 selection Package Explorer ResourceStructureBridge class
2-5 propagation Package Explorer .java file, package, folder, project6 command Rename refactoring ResourceStructureBridge class7 edit Java Editor ResourceStructureBridge declaration
8-16 propagation Refactoring monitor 4 XML and 5 Java references to ResourceStructureBridge17-46 selections Package Explorer Other Java classes (not ResourceStructureBridge)
![Page 25: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/25.jpg)
25
Algorithm to compute the DOI
DOI(element, events)
elementEvents = getAllEventsWithTarget(element, even ts)
decayStart = elementEvents[0]
interest = 0
for each event in elementEvents {
interest += SCALING(KIND(event))
currDecay = DECAY(decayStart, event, events)
if interest < currDecay then {
decayStart = event
interest = SCALING(KIND(event))
}
}
totalDecay = DECAY(dacayStart, LAST(events), events)
return interest – totalDecay
DECAY(fromEvent, toEvent, eventSeq)
decayEvents = SUBSEQ(fromEvent, toEvent, eventSeq)
return |decayEvents| * SCALING(KIND-DECAY)
![Page 26: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/26.jpg)
26
Example Computation
� Total interest: 1 = 1� Total decay: 1 * 0.1 = 0.1� DOI = 0.9
Scaling:
• Selection � 1
• Commands � 0
• Edit � 2
• Decay � 0.1
Event Kind Origin Target(s)1 selection Package Explorer ResourceStructureBridge class
2-5 propagation Package Explorer .java file, package, folder, project6 command Rename refactoring ResourceStructureBridge class7 edit Java Editor ResourceStructureBridge declaration
8-16 propagation Refactoring monitor 4 XML and 5 Java references to ResourceStructureBridge17-46 selections Package Explorer Other Java classes (not ResourceStructureBridge)
47 selection Package Explorer ResourceStructureBridge class
![Page 27: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/27.jpg)
27
Implementation details
Bridge
Context Model
Domain structure
![Page 28: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/28.jpg)
28
Implementation detail 2
� Structure bridges� Map elements of task context graph to
� Java Model (Java AST)
� XML: Plugin descriptors (plugin.xml)
� XML: Ant
� Generic files
� Tasks
� UI Bridge� Monitors user interactions� Adds selection, edit and command events to the event history
![Page 29: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/29.jpg)
29
Operating on Task Contexts: Slicing
� Slicing allows to filter the task context for certain criteria.
Context Model
„Slice all files, which I edited“
Example: Slicing for SVN commit
![Page 30: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/30.jpg)
30
Operating on Task Contexts: Composition
� Combine Task Contexts
Task Context 2Task Context 1
![Page 31: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/31.jpg)
31
Operating on Task Contexts: Manipulation
� Programmer can override DOI algorithm
![Page 32: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/32.jpg)
32
Cycles
� The called method has a recursive call in the definition. If the programmer follows the definition again cycles are possible.
Called method in
Class B
Calling method in
Class A
![Page 33: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/33.jpg)
33
Multiple Edges between two nodes
Class B
Class A
reference inheritance
![Page 34: Using Task Context to Improve Programmer Productivity€¦ · Presented by: Reto Conconi, ... 3 8 6 7 12 15 16 10 2 9 13 5 11 1 14 4 Participant w/o Mylyn w/ Mylyn. 18 Problems of](https://reader034.vdocuments.us/reader034/viewer/2022050600/5fa7f9327b4e4556f060dbe4/html5/thumbnails/34.jpg)
34
Significance of the study results
Edit ratio (#edits/#selections)id w/o Mylyn w/ Mylyn Difference
3 2.90 7.80 4.90 Null hypothesis: No or bad influence on edit ratio8 10.10 26.40 16.30 Alternative: Edit ratio increased6 14.10 36.00 21.90
7 2.60 5.40 2.80 Level of significance 5%12 2.70 5.40 2.70
15 1.70 3.30 1.60 Average 3.56316 8.80 13.00 4.20 Std. deviation 6.52610 5.80 8.20 2.40
2 11.30 14.80 3.50 t 2.1849 6.70 8.70 2.00 t(0.05,15) 1.75
13 6.80 7.40 0.60
5 4.10 4.30 0.20 t > t(0.05, 15) Null hypothesis is wrong11 2.20 2.20 0.00
1 7.70 6.90 -0.80 Edit ratio increase is significant14 15.90 13.50 -2.40
4 11.00 8.10 -2.90