Morning or Evening? An Examination of Circadian Rhythms of CS1 Students

Albina Zavgorodniaia, Raj Shrestha, Juho Leinonen, Arto Hellas, John EdwardsarXiv 2021 · arXiv

TL;DR

Researchers used unsupervised machine learning on millions of keystrokes to identify the "internal clocks" (chronotypes) of introductory programming students. The study reveals that the "night owl" programmer is largely a myth, and that students with morning-leaning chronotypes tend to achieve higher academic scores and procrastinate significantly less.

What Problem Does This Paper Address?

While educators have long studied student procrastination, they have rarely looked at when during the day students actually do their work. Every individual has a chronotype—a natural biological preference for activity at certain times of the day (e.g., "morning people" vs. "night owls").

In the demanding environment of a CS1 (Introductory Computer Science) course, a mismatch between a student’s chronotype and their academic schedule (the "synchrony effect") can lead to cognitive fatigue and lower grades. This paper investigates whether these chronotypes can be detected through passive keystroke logging and how they correlate with academic success across two different cultural and educational contexts.

Methods

The researchers collected timestamped keystroke data from students using custom IDEs. To identify chronotypes, they employed k-means clustering on a 4-dimensional feature vector for each student. This vector represented the percentage of a student's total keystrokes occurring in four 6-hour bins: [3-9, 9-15, 15-21, 21-3].

To ensure the results weren't just an artifact of how they chose the time bins, they performed a robustness check by shifting the bin start times (e.g., starting at 5:00 AM or 7:00 AM) and comparing the resulting clusters.

Fig. 1: Comparison of keystroke distributions for each proposed chronotype across feature vector definitions for the US dataset. Vector binning strategies are: First = [3-9, 9-15, 15-21, 21-3]; Second = [5-11, 11-17, 17-23, 23-5]; Third = [7-13, 13-19, 19-1, 1-7].

Datasets

The study analyzed data from two distinct environments:

  • US Context: 519 students in a Python-based course at a mid-sized US university. The course featured flexible due dates (late work accepted for a penalty) and larger, weekly projects.
  • European Context: 318 students in a Java-based course at a large research university in Finland. This course used a "subgoal" pedagogy with many small exercises (147 total) and strict, fixed deadlines.

In total, the researchers analyzed over 31 million keystrokes.

Key Insights and Ideas

  • The Four Chronotypes: The data naturally clustered into four groups that align with established biological literature: Morning, Napper (two peaks of activity), Afternoon, and Evening.
  • Debunking the Night Owl Myth: Contrary to the popular image of the programmer coding until 4:00 AM, only 1% of keystrokes occurred between midnight and 5:00 AM. Even "Evening" types did most of their work before midnight.
  • Chronotypes are Robust: Despite massive differences in geography (18 degrees of latitude difference), daylight hours, and teaching styles, the identified chronotypes were remarkably similar between the US and European cohorts.
  • Procrastination is Biological: There was a strong, statistically significant link between chronotype and how close to the deadline students worked. Morning types worked on projects significantly earlier than Evening types.

Key Results

The study found that chronotype is a strong predictor of academic outcomes, particularly in the US context:

  • Academic Performance: In the US, Morning and Napper students performed significantly better on both projects and exams than Afternoon and Evening students.
  • The "Subgoal" Advantage: In the European context, the performance gap between chronotypes was much smaller. The authors hypothesize that breaking work into many small, daily tasks with strict deadlines may help "Evening" students stay on track and mitigate the negative effects of their chronotype.
  • Effort Levels: Interestingly, "Napper" chronotypes tended to type the most characters overall, while "Evening" types typed the fewest.
Fig. 3: Outcomes by cluster, showing project scores, exam scores, and hours remaining before deadlines.

Limitations and Future Work

The authors acknowledge that they lacked demographic data, such as whether students held part-time jobs, which could force them into specific working hours regardless of their biological preference. However, their analysis of weekend behavior (where students have more freedom) suggests that diurnal preference remains the primary driver of activity.

Future research aims to combine this keystroke analysis with validated chronotype questionnaires and explore how task difficulty interacts with a student's peak alertness hours. The ultimate goal is to provide individualized learning recommendations based on a student's internal clock.

Summary updated

Abstract

Circadian rhythms are the cycles of our internal clock that play a key role in governing when we sleep and when we are active. A related concept is chronotype, which is a person's natural tendency toward activity at certain times of day and typically governs when the individual is most alert and productive. In this work we investigate chronotypes in the setting of an Introductory Computer Programming (CS1) course. Using keystroke data collected from students we investigate the existence of chronotypes through unsupervised learning. The chronotypes we find align with those of typical populations reported in the literature and our results support correlations of certain chronotypes to academic achievement. We also find a lack of support for the still-popular stereotype of a computer programmer as a night owl. The analyses are conducted on data from two universities, one in the US and one in Europe, that use different teaching methods. In comparison of the two contexts, we look into programming assignment design and administration that may promote better programming practices among students in terms of procrastination and effort.
BibTeX
@misc{zavgorodniaia2021morning,
  author = {Albina Zavgorodniaia and Raj Shrestha and Juho Leinonen and Arto Hellas and John Edwards},
  title = {{Morning or Evening? An Examination of Circadian Rhythms of CS1 Students}},
  year = {2021},
  eprint = {2103.01752},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.01752},
}
Figure