Do programmers work at night or during the weekend?
It’s often thought that programmers have very irregular working hours compared to those of the general population. Claes, Mäntylä, Kuutila, and Adams analysed commit data from 86 large software projects and found that this isn’t actually the case – for most programmers.
Poor working patterns are bad for health and productivity:
Long working hours are correlated with depression, anxiety, and heart disease;
Atypical working hours result in more health complaints, poor work-life balance, and .
It should be clear that there are plenty of reasons to avoid poor working patterns. Before we can implement measures to counteract them, we first need to know if poor working patterns are actually a common phenomenon among programmers.
The authors analysed commits in repositories from three organisations:
The Mozilla Foundation is primarily known for Firefox. Its core projects include contributions from paid developers, but the organisation also hosts projects that are developed by the community without any financial compensation.
The Apache Foundation has numerous projects and supports their communities, but doesn’t pay any of its developers. Some projects include contributions by paid developers however: many projects are business-critical to companies, which therefore sometimes choose to sponsor them or directly contribute to development.
A local company that only works on commercial, closed-source projects. Their characteristics may differ from those of open source projects from the other two organisations.
Only commits from larger repositories are considered, as those are more likely to be “real” projects.
As you might have already guessed, Betteridge’s law applies here – for the most part at least.
Commits are mostly made on business days and within regular business hours. The number of commits is a bit lower on Mondays and Fridays and a lot lower during lunch breaks and the weekend.
Having said that, there are also quite some developers that mostly make commits from noon until midnight, even during weekends.
This information is already quite useful on its own, but what’s probably even more interesting is that : if more commits are made outside developers’ regular working hours, that may indicate that their workload has increased.
While most projects have very similar working hours (10:00–18:00), only 60% of work is actually done during those hours.
Projects that contain many (or only) contributions from unpaid developers are especially likely to be active outside office hours, which includes hours after office hours on weekdays and hours during weekends.
Commits made during office hours have roughly the same as commits made outside office hours.
The authors hypothesised that work patterns may change over time, for example when:
- a software project approaches its deadline and slowly turns into a death march in which a lot of extra work is done outside office hours;
- a project that initially has a start-up culture with flexible working hours slowly matures into a project that is largely confined to regular office hours.
The data suggests that such projects do exist, but neither are a regular occurrence.
The content of a commit message typically conveys the intent of the commit. This can be used to learn whether commits made outside office hours are often made for different (special) reasons.
For the Mozilla Firefox repository the authors found some small differences between commits that are made during and outside office hours. For instance, informal revert commits (which revert changes due to regression bugs) are more likely to be made by developers outside office hours.
One might assume that senior developers are more likely to work within office hours, as they’re more likely to be paid for their work.
It turns out there’s no significant correlation between seniority and amount of work done during office hours. The authors did find that work outside office hours is mostly done by unpaid developers.
Developers usually work within regular office hours (10:00–18:00)
Developers that are paid for their work are more likely to make their contributions within regular office hours
Work patterns extracted from commit message data can be used to detect increased workloads and/or stress levels
Commits made outside office hours are slightly more likely to be quick fixes, but that’s pretty much the only real difference