Objective
Computer science has some of the highest dropout rates among undergraduate majors in the U.S. Earlier research looked at fixed traits such as math ability or motivation. The authors argue that these traits are coarse. They wanted to look at something that changes from minute to minute: the emotions (called affective states) that students feel during their very first encounter with programming.
The authors expect that engagement is the best state for learning, but that programming brings many failures. Output that does not match what the student expected can cause confusion. Getting stuck can cause frustration. Long failure can lead to boredom and, in the end, to quitting. The long-term goal is to build learning programs that notice and respond to student emotions, but the authors say more basic research is needed first.
The study asked five questions about novices learning Python:
- How often does each emotion occur?
- Which emotions occur at the same time?
- How do students move from one emotion to another?
- How do emotions connect to what students are doing on screen, such as coding, reading or asking for a hint?
- Do emotions felt during guided practice go along with performance on a harder task afterward?
Methods
This was a laboratory study. It measured what happened and how things went together, so it cannot show that any emotion caused better or worse learning.
The students came from a private university in the Midwestern United States. Of 113 students, 14 were removed because they already had programming experience, which left 99 novices. About half (49.5 percent) were female, the average age was 19.3 years, and they came from 25 majors. Data were collected over two semesters (29 students in Fall 2012 and 70 in Spring 2013). The two groups used slightly different screens: the first group could use all parts of the interface at once, while the second could view only one part at a time, so the researchers could tell what the student was doing.
Each student was tested alone in a 2-hour session, using a learning program built by the researchers. It had four areas: instructions, a code box, hints, and a console to test code. A webcam recorded the face and software recorded the screen.
- Scaffolded phase (25 minutes): 19 Python exercises, mostly simple math and geometry problems. The program checked each answer automatically. Hints appeared after a delay of 45 to 90 seconds, and each hint cost a point. Students finished 13.3 exercises on average.
- Fadeout phase (10 minutes): one hard task with no hints, built to be harder than novices could fully solve. Two trained judges scored it by counting matching lines of code (maximum 11). The average was 5.95.
- Emotion ratings: afterward, students watched videos of their own face and screen. The video paused at about 100 points, and they picked their main emotion from a list of 13 options. They could also pick a second emotion. The method yielded 9,696 ratings in all.
The researchers used non-parametric tests (tests that do not assume a bell-shaped spread of scores) and adjusted for multiple tests. For the link to learning, they statistically set aside gender, self-reported SAT scores, scaffolded score and hints used. The paper does not mention ethics approval.
Key Findings
Overall, novices mostly felt five emotions, which tended to follow clear patterns tied to what they were doing on screen.
How often each emotion occurred
- Engagement, confusion, frustration, boredom and curiosity were each reported at least 5 percent of the time and together made up about 73 percent of all ratings.
- Anxiety, happiness, anger, surprise, disgust, fear and sadness were rare and together made up only 10 percent. Neutral (no apparent emotion) made up 17 percent.
- Students did differ by phase. They reported more neutral (about 20 percent versus 9 percent) and more curiosity (about 8 percent versus 4 percent) during guided practice. They reported more engagement during the hard task without hints (about a third of ratings versus about a fifth).
Emotions at the same moment
- Students added a second emotion fairly rarely. Only 46 students gave enough of them to analyze.
- Two pairs occurred together more than chance: confusion with frustration, and curiosity with engagement.
- The pairs were lopsided. Confusion more often came with frustration than frustration with confusion, and curiosity more often came with engagement than the other way round.
Moving from one emotion to another
- Five of six moves predicted by an existing theory showed up: engagement and confusion in both directions, confusion and frustration in both directions, and frustration to boredom.
- The predicted move from boredom to frustration did not appear. Instead, boredom often moved to engagement. The authors suggest the fast pace and the option of using a hint to skip ahead may explain this.
Emotions and on-screen actions
- Confusion and frustration followed a wrong answer submission and came before a hint request or more coding.
- Curiosity and engagement were linked mainly to reading and coding, not to errors or hints.
- Coding was the central activity, connected to every emotion. In the hard task, students often cycled between coding, running code that worked, and submitting a wrong answer.
- This analysis used only the 70 students whose screens logged one activity at a time.
Emotions and later performance
- After setting aside gender, SAT score, scaffolded score and hints, more boredom (r = -.149) and more frustration (r = -.218) in guided practice went along with a lower score on the hard task.
- Moving between confusion and frustration (r = .103 and .105) and moving from boredom to engagement (r = .282) went along with a higher score.
- Engagement and confusion showed weak positive trends. The authors treated values near .100 as suggestive trends, not firm results, because the sample was small.
Implications
For teachers and instructors
The results suggest that confusion and some frustration are a normal part of a first programming lesson, and that a wrong answer is a likely moment for a student to get stuck. A sensible reading is that a teacher could check in after repeated errors. The paper does not test any teaching change, so this is not a tested recommendation. The finding that boredom often moved to engagement through coding suggests that getting a bored student back to hands-on work may help, but this is also only a reading of the results.
For designers of learning software
The authors recommend that programs that respond to emotion should focus on engagement, confusion, frustration, boredom and curiosity, because these were the common ones. They propose these uses:
- Use log data, such as errors and hint requests, to help detect emotions alongside face-based detection.
- Suggest a hint when frustration seems high.
- Track which exercises produce many wrong submissions, since these may cause too much frustration.
The authors also raise open questions, such as whether detectors should recognize blends like confusion plus frustration and how a program should respond to them.
For researchers
The authors suggest updating their emotion model to add a link from boredom to engagement and to include the two co-occurring pairs.
What to watch out for
The correlations with performance were small. The results should not be used to say that students should be made frustrated or confused. The authors themselves say it is unclear whether the findings apply to other settings, such as reading a programming text.
Limitations
The authors name four main limits. First, emotions were self-reported afterward, and such reports depend on how honest and accurate students are. Second, the sample was small, which limits the power to detect small effects, and the authors treated correlations around .100 as trends. Third, all students came from one university, so results may not hold for other novice programmers. Fourth, a lab session may not match real classrooms or homework.
The authors also say results may be specific to this learning program. Curiosity and engagement differed between the guided phase and the hard task, which shows that the activity and available help shape what students feel.
The paper does not mention, but the students were not told the real purpose, and the study had no comparison group testing any teaching change, so it cannot show what causes any emotion or learning difference. The paper does not mention, but the learning measure was a single 10-minute task scored by lines of code, and the session was short, with mostly math-style exercises. The paper does not mention, but students rated emotions after finishing, so memory of the session may have affected what they chose. Finally, only part of the sample could be used for some analyses: 46 students for co-occurring emotions and 70 for the on-screen action analysis.
Future Directions
The authors say future work should address the limits of this study and ask these questions:
- Do the same patterns appear when emotions are measured in other ways, such as live observation, video coding by trained judges, or sensors?
- Do they appear in real learning settings, for example when students do their own programming homework?
- How do emotions change with different learning programs and instruction formats, such as different hint and feedback options?
- Do things like gender or SAT score change how emotions relate to learning?
- Do high-performing and low-performing students show different patterns, and can students be grouped by how their emotions change over time?
- Which exercises or concepts are hardest, based on an exercise-by-exercise look?
The authors also ask whether emotion detectors should focus on blends of emotions and how a learning program should respond when confusion and frustration occur together. Their larger aim is to use these insights to build better learning technology for teaching programming.
The bottom line: Among 99 novices learning Python in a lab at one university, five emotions dominated: engagement, confusion, frustration, boredom and curiosity. Confusion and frustration tended to follow wrong answers and come before hint requests. More frustration and boredom went along with a weaker score on a later hard task, while moving between confusion and frustration, and from boredom to engagement, went along with a higher score. These links were small and based on self-reports from a small, single-site sample, so they are suggestions, not proof. Teachers and software designers can treat early errors as a likely point where beginners need support.
Comments 0
No comments yet. Be the first to share a thought.
Get new research summaries by email
Every new summary, daily at 8:00 AM Eastern (or weekly if you prefer). Unsubscribe in one click.