Software developers working on change tasks commonly experience a broad range of emotions, ranging from happiness all the way to frustration and anger. Research, primarily in psychology, has shown that for certain kinds of tasks, emotions correlate with progress and that biometric measures, such as electro-dermal activity and electroencephalography data, might be used to distinguish between emotions. In our research, we are building on this work and investigate developers’ emotions, progress and the use of biometric measures to classify them in the context of software change tasks. We conducted a lab study with 17 participants working on two change tasks each. Participants were wearing three biometric sensors and had to periodically assess their emotions and progress. The results show that the wide range of emotions experienced by developers is correlated with their perceived progress on the change tasks. Our analysis also shows that we can build a classifier to distinguish between positive and negative emotions in 71.36% and between low and high progress in 67.70% of all cases. These results open up opportunities for improving a developer’s productivity. For instance, one could use such a classifier for providing recommendations at opportune moments when a developer is stuck and making no progress.
Stuck and Frustrated or In Flow and Happy: Sensing Developers’ Emotions and Progress
1. Sebastian Müller and Thomas Fritz
Stuck and Frustrated or in Flow and Happy:
Sensing Developers’ Emotions and Progress
ICSE 2015, Florence, Italy
2.
3.
4. Benefits of Knowing
Emotions and Progress
4
Support developers when stuck and
making no progress
Avoid interruptions when in flow and
making a lot of progress
5. Biometric Sensing of
Emotions & Progress
5
positive/negative emotions (e.g. Lin et al)
happiness, sadness (e.g. Li et al)
positive/negative emotions (e.g. Haag et al)
frustration (e.g. Scheirer et al)
positive/negative emotions (e.g. Muldner et al)
EEG
(Electroencephalography)
frustration (e.g. Kapoor et al)
anxiety (e.g. Doehring)
Pupil sizes
Eye blinks
positive/negative emotions (e.g. Haag et al)
boredom, anxiety (e.g. Chanel et al)
positive/negative emotions (e.g. Drachen et al)
happiness (e.g. Steptoe et al)
EDA
(Electro-dermal activity)
Skin temperature
HR(V)
(Heart rate (variability))
6. Research Questions
6
Correlation of emotions and progress?
Aspects and practices that affect developers’ emotions
and progress?
Biometric sensors to determine developers’ emotions
and progress?
7. Study Participants & Tasks
17 participants: 6 professionals and 11 PhD students
• on average 7.1 years of prof. development experience
• only minor differences between professionals and students
Two change tasks
• Task 1: small program to interact with StackExchange API
• Task 2: new feature in JHotDraw
7
11. Study Method
9
Fish tank video as a baseline for biometric measurements
Work on two change tasks, each for 30 minutes
12. Study Method
9
Fish tank video as a baseline for biometric measurements
Work on two change tasks, each for 30 minutes
• progress
• valence: ‘’very unpleasant’’ to ‘’very pleasant’’
arousal: ‘’very calm’’ to ‘’very excited’’
• reasons for the current state of emotions / progress & aspects
that would help to improve
Assessments every 5 minutes or at signs of strong negative/
positive emotions
13. Study Method
9
Fish tank video as a baseline for biometric measurements
Work on two change tasks, each for 30 minutes
After working on both change tasks: set of emotion inducing pictures
• progress
• valence: ‘’very unpleasant’’ to ‘’very pleasant’’
arousal: ‘’very calm’’ to ‘’very excited’’
• reasons for the current state of emotions / progress & aspects
that would help to improve
Assessments every 5 minutes or at signs of strong negative/
positive emotions
14. Data Collection
10
biometric data from 3 sensors
213 data points
• emotion and progress ratings
• answers to the questions we asked
2 emotion ratings for the set of emotion
inducing pictures
15. Research Questions
11
Correlation of emotions and progress?
Aspects and practices that affect developers’ emotions
and progress
Biometric sensors to determine developers’ emotions
and progress
16. Correlation Emotions & Progress
12
Linear Mixed Model
Dependent variable: Self-reported progress
Fixed effects: Valence, arousal
Random effects: Participant, task, measurement time
17. Correlation Emotions & Progress
13
Linear Mixed Model
Dependent variable: Self-reported progress
Fixed effects: Valence, arousal
Random effects: Participant, task, measurement time
Random effects: Measurement time no effect, task medium effect and
participant highest effect
Effect Estimate Deviance explained
Valence 0.66 28.03
Arousal 0.10 1.09
19. Correlation Emotions & Progress
14
Subject 1
Significant correlation between
progress and valence
20. Correlation Emotions & Progress
14
Subject 6Subject 1
Significant correlation between
progress and valence
No significant correlation
between progress and valence
21. Correlation Emotions & Progress
14
Subject 6Subject 1
Significant correlation between
progress and valence
No significant correlation
between progress and valence
significant correlations for 12 subjects,
but not for the other 5 subjects
22. Research Questions
15
Correlation of emotions and progress?
Aspects and practices that affect developers’ emotions
and progress?
Biometric sensors to determine developers’ emotions
and progress
23. Top 3 Reasons for a Change in
Emotions / Progress
16
Increase in emotions/progress # Cases # Subjects
localize relevant code 21 (11.3%) 14 (82.4%)
(better) understand parts of the code 18 (9.7%) 13 (76.5%)
next steps are clear 12 (6.5%) 9 (52.9%)
24. Top 3 Reasons for a Change in
Emotions / Progress
16
Increase in emotions/progress # Cases # Subjects
localize relevant code 21 (11.3%) 14 (82.4%)
(better) understand parts of the code 18 (9.7%) 13 (76.5%)
next steps are clear 12 (6.5%) 9 (52.9%)
”I’ve found a starting point almost
immediately. I have a good feeling that I’ll
make significant progress very soon.” (S1)
25. Top 3 Reasons for a Change in
Emotions / Progress
17
Decrease in emotions/progress # Cases # Subjects
difficulty in understanding how parts of the code / API works 33 (17.7%) 12 (70.6%)
difficulty in localizing relevant code 15 (8.1%) 8 (47.1%)
not being sure about next steps 9 (4.8%) 9 (52.9%)
26. Top 3 Reasons for a Change in
Emotions / Progress
17
Decrease in emotions/progress # Cases # Subjects
difficulty in understanding how parts of the code / API works 33 (17.7%) 12 (70.6%)
difficulty in localizing relevant code 15 (8.1%) 8 (47.1%)
not being sure about next steps 9 (4.8%) 9 (52.9%)
”It’s going too slow. I think it’s very cumbersome
when so much time is needed to understand the
project and find a starting point.” (S9)
27. Emotions and Progress
are Often Intertwined
18
”I finally figured out how to do it. I’m really
happy and I’m not feeling completely stuck
anymore.” (S6)
”I can’t make any progress.
That’s annoying.” (S13)
28. Research Questions
19
Correlation of emotions and progress?
Aspects and practices that affect developers’ emotions
and progress
Biometric sensors to determine developers’ emotions
and progress?
31. Machine Learning Approach
22
Data Cleaning and Feature Extraction
• Noise cleaning
• Feature extraction following established methods
Data Labeling
• binary split of emotions (positive/negative) and progress (low/high)
32. Machine Learning Approach
23
Data Cleaning and Feature Extraction
• Noise cleaning
• Feature extraction following established methods
Data Labeling
• binary split of emotions (positive/negative) and progress (low/high)
Machine Learning
• Leave-one-out approach
• Classifier: decision tree S01
T1
S17
T1
S01
T2
S17
T2
T1
...S01 S17
Test data Training data
......
T2
34. Contributions and Outlook
25
Study on developers’ emotions and progress with 17 participants
• Emotions and perceived progress are strongly correlated
• Biometric sensors can be used to predict emotions and progress
Future challenges
• Individual differences
• Privacy concerns
New opportunities for developer support
• Avoid interruptions when in flow and making a lot of progress
• Support when stuck and making no progress