You are on page 1of 4

Towards Recognizing and Rewarding Efficient

Developer Work Patterns


Will Snipes, Vinay Augustine Anil R. Nair Emerson Murphy-Hill
ABB Corporate Research ABB Corporate Research North Carolina State University
Industrial Software Systems Industrial Software Systems Department of Computer Science
Raleigh, NC USA Bangalore, India Raleigh, N.C. USA
Email: will.snipes/vinay.augustine@us.abb.com Email: anil.nair@in.abb.com Email: emerson@csc.ncsu.edu

Abstract—Software engineering researchers develop great tech- II. U NDERSTANDING W ORK PATTERNS
niques consisting of practices and tools that improve efficiency
and quality of software development. Prior work evaluates Developers work on tasks such as implementing new fea-
developers’ use of techniques such as Test-Driven-Development tures, making enhancements or fixing bugs. Tasks can be
and refactoring by measuring actions in the development environ-
ment. What we still lack is a method to communicate effectively divided into development sessions [2] where developers may
and motivate developers to adopt best practices and tools. extend a method, refactor some code, navigate around the
This work proposes a game-like system to motivate adoption code, run the debugger, and make modifications to the program
while continuously measuring developers’ use of more efficient structure.
development techniques.
Because we are interested in how the developer does
I. I NTRODUCTION the work in each type of session, we require a more fine
Software engineering researchers define techniques consist- grained detail that describes the steps taken by a devel-
ing of practices and tools that improve efficiency and quality oper. For example a sequence within a navigation session
of software development. Techniques such as refactoring with where developers are finding relevant code artifacts for a task
the aid of tools like Resharper, unit testing with NUnit or is Start → OpenDeclaration → V iewRef erences →
CppUnit tools may be well known but not necessarily widely ShowInstruction → End. We combine multiple sessions
or frequently used. of the same type into a set of sessions that form a pattern.
Deploying these techniques requires communicating and A work pattern is thus defined as the set of sequences the
motivating developers to use them. Murphy-Hill and col- developer uses for a particular session type. Using the work
leagues [1] show that developers can effectively learn about pattern sequences we can evaluate how the developer navigates
new tools from their peers by watching them work and through the code, the steps they use to debug, or at a higher level,
recommendations, yet this happens very rarely, in part because whether they are following a development best practice such
developers rarely work on the same computer at the same as Test-Driven-Development. By comparing the work patterns
time. This personal connection limits the knowledge transfer across multiple sessions of the same type, we identify efficient
to the co-located circle of colleagues connected with the early and inefficient work patterns and may recommend ways to
adopters. increase their efficiency.
Finding a way to automate the communication of technique
recommendations between developers enhances deployment of III. O BSERVING W ORK PATTERNS
best practices in a globally distributed software development
organization. To best match the peer recommendation scenario Collecting fine-grained data by monitoring how developers
described above, the method should mimic the personal rec- work requires a system such as Mylyn Monitor [3], HackyStat
ommendation model while rewarding successful adopters. [4], or PROM [5]. These systems collect command and click-
In this paper we envision an automated technique recom- stream data from the developer’s workstation in a log format.
mendation system composed of three aspects. First, the system The level of detail required for identifying work patterns
will monitor work patterns of developers working on tasks. includes the commands issued in the development environ-
Second, the system will heuristically compare work patterns ment, the commands issued editing the code, and commands
of developers with those using a priori defined practices issued outside the environment (e.g. testing or discovering
and tools that are more efficient for the pattern. Third, the information). Mylyn Monitor captures the commands issued
system will make recommendations in the context of a game in the Eclipse IDE, HackyStat captures the command events
that motivates developers to adopt new techniques through in multiple tools through plug-ins, and PROM collects com-
personal and situation-based recommendations. A system that mands performed in the IDE using plug-ins. Thus prior work
recognizes developers who adopt suggested techniques could demonstrates the capabilities for collecting fine-grained data
give a significant boost to deploying best practices. on developer work activities.
IV. A NALYZING W ORK PATTERNS TABLE I
S EQUENCE DATA A NALYSIS
Our hypothesis is that software developers’ work patterns Developer Searcher Browser
reveal when developers are using effective techniques for a Navigation nodes 17 27
task. Furthermore, we hypothesize that by suggesting training Navigation arcs 37 89
Average sequence length 6.3 15.5
or alternative ways of working, we can move developers to Sequence length standard deviation 2.5 8.7
more effective techniques.
Space prevents us from an exhaustive comparison to prior
work, but three areas are especially relevant to analyzing TABLE II
NAVIGATION S TRUCTUREDNESS
pattern data from developer environments. One approach is to
Developer Searcher Browser
create a Markov chain of the steps taken during a development Neither 44% 19%
session [6]. Another is to leverage recent research in the web Structured 38% 18%
community in clickstream analysis. Much of the research in Unstructured 18% 63%
this area is devoted to identifying similarities [7], user profiles
[8], and usage patterns [9].
Describing work patterns in finite-state Markov chains using variance describe how many steps the developer takes for the
the relevant statistical properties is useful for comparison average session. We also look for the most frequently issued
and reveals key attributes of efficient and inefficient work commands within a session to identify repetitive steps, and
patterns. We demonstrate this analysis by following the prac- look at characteristics of the commands to determine whether
tices described in [6] using JUMBL [10] for describing the the developer is using more or less effective commands.
usage model and for calculating the occupancy and frequency In Table I we show data supporting how using structured
statistics of the model. navigation is more effective to isolate the bug in fewer steps
In our preliminary data analysis we identified work patterns than unstructured. For Searcher, the average number of navi-
from data collected by monitoring developers performing a gation session steps (average sequence length per navigation
maintenance task [11]. The study provides a data set generated session) is 6.3 and the standard deviation in the number of
by assigning a task to fix the same bug to multiple developers. steps is 2.5. Browser used more than twice the average number
A video of the activity records the developer actions that of steps per session used by Searcher. The higher standard
are translated to a text log file of steps taken while editing deviation indicates that Browser was also less consistent in
the code. The data from this study measures how long each the number of steps taken for each navigation session. While
developer took to perform the maintenance tasks as well as not conclusive, Browser’s methods to do the same task seem
how well they understood the code they were maintaining. less efficient than Searcher’s methods though this could be
Because they are working on the same task, we can compare influenced by differences in their experience level or other
the steps each developer takes to solve the bug. factors not measured.
To build the Markov model, we convert the step log file to a Investigating the commands issued during navigation activi-
graphical representation where each unique step is represented ties highlights opportunities to improve. In the model solution,
as a unique node and each adjacent pair of nodes are repre- we classified each navigation command as structured or un-
sented as a connection between the corresponding nodes. i.e., a structured and counted the number of times each command
connection from node A to node B exists if the developer uses was issued along with time spent in each step. Table II shows
the command B following A in the log file. Figure 1 shows the difference in the distributions between the developer’s
the model for developer Searcher. The edges are labeled with use of structured vs. unstructured navigation. Searcher used
the name of the connected nodes and the number of times this structured navigation twice as often as unstructured, where
transition has occurred. For example, Open Type occurs a two Browser used Unstructured three times more than structured.
times after Scan in the log file, and the edge from node Open By analyzing the repetitive actions that occur in a sequence
Type to Scan in the graph is labeled with Open Type {2} . we determine whether a developer is using ineffective com-
We highlight the differences between patterns by selecting mands. The stimulus describes the trigger of a transition to a
two developers from a set of 12 where the developer we call state, in this case, issuing a specific command such as Find
“Searcher”used structured navigation to find the bug and the Text. Find Text locates a string in a source file and is less
developer we call “Browser” used unstructured and browsing effective than Find References that searches the entire project
more. Structured navigation defined in [12] is using code or solution. In our two developers, we see Browser using find
search commands such as Find References to locate important text on average four times per navigation session. In contrast,
code whereas unstructured navigation the developer browses Searcher does not use any command more than once on
the code or uses Find Text commands for the same. For the average per navigation session. These key indicators highlight
navigation patterns, we investigate some key metrics motivated opportunities to help Browser improve and become a more
by the data. The number of nodes in the model and the number effective developer. Recommending a structured navigation
of arcs describe the breadth of commands used to perform approach to program investigation to Browser could make
the task. The average sequence length and sequence length them more successful according to Robilliard et al. [12].
Fig. 1. Work Pattern Markov Model for Developer Searcher

V. M OTIVATING I MPROVEMENTS TO W ORK PATTERNS to monitor their work patterns in order to receive the
Applying the information collected and analyzed about de- feedback and achievement recognition.
veloper work patterns must help developers improve. Helping 3) Whether recommendations of their peers would encour-
to improve implies that we provide information on how to age them to adopt new tools and practices
improve and motivate the developer to adopt the new patterns Then we plan to create a recognition system within the de-
in a positive way. velopment environment. The system will recognize developers
Providing a means for recognizing achievements of the who follow good practices with achievement rewards such as
developer towards improvement is one strategy to generate the badges. The system could provide suggestions to developers
proper motivation. This approach is inspired by the gamifica- who are striving to improve by suggesting that using specific
tion trend where processes are enhanced by game mechanics techniques, practices, or tools would improve their score.
to motivate people to follow them. A study by Saatchi and Recognizing developers who try new techniques may provide
Saatchi S reporting on the gamification trend [13] claims that the extra motivation necessary to move developers up the
75% of employed 18-45 year old respondents would be at least efficiency scale.
somewhat interested in working in an environment that uses Figure 2 shows a mock-up of an example achievement
games to increase productivity. recognition system. The developer earned three badges of
Since the Saatchi and Saatchi S study did not focus on different types. The first is for following Test-Driven Develop-
software developers, we wonder whether achievement could ment practice, second is for using Sando [15] for code search,
also motivate people in knowledge work environments such as and third is for using breakpoints in the debugger. As new tools
software development. Maehr states in a study of achievement and practices are supported by the analysis, new badges can be
motivation in foreign cultures that since these behaviors can be provided by the system to developers who use them. With this
triggered by circumstance, they are normally present in most system we plan to measure changes in developer practices and
people [14]. He further states that “achievement motivation is tool use in order to determine whether the system is having a
universal...in all people and that it only needs establishing of positive effect.
the right cues and context to elicit these behaviors”. Therefore VI. R ELATED W ORK
it is possible that developers from different backgrounds Researchers have developed systems that aim to answer
can be motivated by a form of game that recognizes their specific questions using data from command logs. Zorro
achievements. [16] leverages the HackyStat data to determine if developers
To verify, we plan to conduct a study of whether this are adhering to test-driven development. The tool employs
approach is acceptable to developers. The study will determine a similar approach dividing the work of the developer into
the following: episodes delineated by when test cases pass. The researchers
1) Whether developers are open to the idea of applying define multiple types of episodes then determine whether
achievement motivation to their daily work activities. the developer uses Test-Driven-Development or not in each
2) Whether developers accept the intrusion of automation episode.
work patterns? Finally, will a game-based achievement system
drive adoption of new techniques?
This system can be used to study the efficacy of rec-
ommended work patterns. Researchers can use the proposed
system to measure whether or not their tools lead to increased
efficiency for specific tasks by comparing the work patterns
of developers before and after a new pattern is adopted.
ACKNOWLEDGMENT
Thanks to David Shepherd, Thomas Fritz, and Christoph
Fig. 2. UI Mockup with Achievement Badges Bäunlich for providing developer activity logs from their study
[11]. JUMBL is developed and maintained by the University
of Tennessee Software Quality Research Laboratory.
Murphy-Hill, Parnin, and Black [17] use the Mylyn Monitor
R EFERENCES
to explore whether or not developers use the automated
refactoring tools present in Eclipse. They look for specific [1] E. Murphy-Hill and G. C. Murphy, “Peer interaction effectively, yet in-
frequently, enables programmers to discover new tools,” in Proceedings
refactoring commands in Eclipse and determine the amount of the ACM 2011 Conference on Computer supported cooperative work,
of time developers use tools versus hand refactoring the code. ser. CSCW ’11. ACM, 2011, pp. 405–414.
[2] R. Robbes and M. Lanza, “Characterizing and Understanding Devel-
Robillard, Coelho and Murphy explore hypotheses around opment Sessions,” in 15th IEEE International Conference on Program
how developers can be more effective at performing a main- Comprehension, ser. ICPC ’07. IEEE, Jun. 2007, pp. 155–166.
tenance task [12]. Key conclusions are that developers are [3] G. C. Murphy, M. Kersten, and L. Findlater, “How are Java software
developers using the Elipse IDE?” IEEE Software, vol. 23, no. 4, pp.
more more successful finding and fixing bugs when they create 76–83, Jul. 2006.
a detailed plan for implementing a change, use structured [4] P. M. Johnson, H. Kou, J. Agustin, C. Chan, C. Moore, J. Miglani,
navigation with keyword search or cross-reference search, and S. Zhen, and W. E. J. Doane, “Beyond the personal software process:
Metrics collection and analysis for the differently disciplined,” in Pro-
only review methods once during their search. ceedings of the 25th international Conference on Software Engineering.
Building on this success, this work proposes a general- IEEE Computer Society, 2003.
ized method to automate the identification of the techniques [5] A. Sillitti, A. Janes, G. Succi, and T. Vernazza, “Collecting, integrating
and analyzing software metrics and personal software process data,” in
described in the related work and others, and determine Proceedings of the 29th Euromicro Conference. IEEE, 2003, pp. 336–
when the techniques would help a developer improve their 342.
work patterns. Then we intend to create a game-like virtual [6] S. Prowell, Cleanroom software engineering: technology and process.
Reading, Mass: Addison-Wesley Professional, 1999.
environment where developers learn from each other and are [7] A. Banerjee and J. Ghosh, “Clickstream Clustering Using Weighted
motivated to adopt the best practices developed by these and Longest Common Subsequences,” in Proceedings of the Web Mining
other researchers. Workshop at the 1st SIAM Conference on Data Mining, 2001.
[8] O. Nasraoui, M. Soliman, E. Saka, A. Badia, and R. Germain, “A
Web Usage Mining Framework for Mining Evolving User Profiles
VII. C ONCLUSION in Dynamic Web Sites,” IEEE Transactions on Knowledge and Data
Engineering, vol. 20, pp. 202–215, Feb. 2008.
We propose an automated system for capturing developer [9] R. Atterer and A. Schmidt, “Tracking the interaction of users with
AJAX applications for usability testing,” in Proceedings of the SIGCHI
work patterns, suggesting improvements, and motivating adop- Conference on Human Factors in Computing Systems, ser. CHI ’07.
tion of those improvements. This system will leverage existing ACM, 2007, pp. 1347–1350.
tools in order to monitor developer work patterns. It will apply [10] S. J. Prowell, “JUMBL: a tool for model-based statistical testing,” in
Proceedings of the 36th Annual Hawaii International Conference on
data mining and statistical techniques in order to compare System Sciences, 2003., vol. 9. IEEE, Jan. 2003, pp. 6–9.
and model those work patterns and suggest improvements. For [11] D. Shepherd, T. Fritz, and C. Bäunlich, “Supporting search and naviga-
example, the time and number of steps required to navigate tion through code context,” Zurich, Switzerland, Tech. Rep., 2012.
[12] M. P. Robillard, W. Coelho, and G. C. Murphy, “How effective devel-
between edits can be compared between developers. Finally, opers investigate source code: an exploratory study,” IEEE Trans. Softw.
it will drive adoption of new practices and tools by using an Eng., vol. 30, pp. 889–903, Dec. 2004.
achievement-based system. [13] Saatchi and Saatchi S. (2011, Jun.) Gameification
for business brands and loyalty. [Online]. Available:
There are a number of key research questions that we hope http://www.slideshare.net/Saatchi S/gamification-study
to answer. First, can we automatically discover and group work [14] M. Maehr, “Culture and achievement motivation.” American Psycholo-
gist, vol. 1974, no. 29, pp. 887–896, 1974.
patterns from recorded developer actions? Does the automated [15] D. Shepherd, K. Damevski, B. Ropski, and T. Fritz, “Sando: An
system to capture work patterns provide relevant data for extensible local code search framework,” in Proceedings of Foundations
analysis? Can analysis of work patterns from multiple develop- of Software Engineering, Tool Demo. ACM, 2012.
[16] P. M. Johnson and H. Kou, “Automated Recognition of Test-Driven
ers identify practices that increase developer efficiency? Are Development with Zorro,” in Agile Conference (AGILE), 2007. IEEE,
graph mining techniques effective at identifying similar and Aug. 2007, pp. 15–25.
different work patterns such that automated recommendations [17] E. Murphy-Hill, C. Parnin, and A. P. Black, “How We Refactor, and How
We Know It,” IEEE Transactions on Software Engineering, vol. 38, pp.
are possible? Will developers accept recommended relevant 5–18, Jan. 2012.
techniques from an automated system in place of their existing

You might also like