I was thinking this morning about what I perceived to be my normal working pattern—lots in the morning, then tapering out from mid-day on with an occasional bump in the evenings. I wanted to see if this was quantifiable through git logs, and I decided to look across a wide range of our repositories.
The chart below shows the portion of each person’s commits that occur within a given hour of the day in their local time.
As you can see, there’s a wide range in preferred working hours – one of the great advantages of working in slow time is that this is absolutely fine. There’s enough overlap in hours for people to be able to work together, but enough flexibility to work when you want to.
Nick Quaranto
on 29 Sep 11Cool, but in what time zone? :)
Anonymous Coward
on 29 Sep 11Who’s graph is who’s?
(BTW, that bell shaped curve in he middle looks awesome. Almost too good to be true)
Matt Helm
on 29 Sep 11Relative local time.
Chris Jones
on 29 Sep 11would love to know what tools your using to do these reports against your git repo’s?
Anonymous Coward
on 29 Sep 11Is each graph on a different vertical scale?
If so, it’s a bit deceiving to compare people when they are not on the same scale.
Anonymous Coward
on 29 Sep 11@Anonymous Coward: What’s deceiving? It’s a graph of portion of commit by time of day and each bar is the % of each person’s total commits.
NL
on 29 Sep 11@Nick – each person’s commits have been adjusted into their local time zone (or at least, the one they live in—people sometimes commit while traveling, which isn’t taken into account).
Neil Kelty
on 29 Sep 11Am I missing something or are you guys all working incredibly long days?
Joe
on 29 Sep 11Neil: You’re missing something.
This is commit history over an unknown period of time. No one, I bet, works each of those hours every day. For any given person, maybe some days they usually start early and other days they start later. Maybe in the summer they work early mornings to enjoy the evenings and in the winters they work evenings to avoid cold mornings. Who knows? This does not illustrate typical work hours.
Michael
on 29 Sep 11doesn’t when commits happen depend on individuals’ git practices/ their roles in the organization? I know in my organization it would be a jump to associate git commit times to when they were working.
Mostafa
on 29 Sep 11The fourth person from the buttom works from 5 AM until 1 AM?
Joe
on 29 Sep 11@Mostafa – no.
The fourth person from the bottom at one time issued at least one commit at 5am; and at one time issued at least one commit at 1am.
TJ
on 29 Sep 11Very interesting…
MattO
on 30 Sep 11Is the average size of a commit the same for everyone. I’ve found working with teams with subversion that some people’s commits were larger than others on average or some members of the team just did more with one commit, or broke work into more of them. Personally i would forget to include some comment or find a formatting error that would add a commit to the log. I don’t think that any of these will obscure your data for what you are trying to measure, but commits are a funny and weird metric to measure off of.
Scott
on 30 Sep 11@MattO: I don’t think it matters. This does not compare the number or frequency of commits of one person to another.
Though peoples’ commit habits differ, a given person’s commit habits are probably pretty consistent. On this chart a person’s commit patterns are shown across hours of the day, with each hour of the day shown relative to their commit volume on that hour. The bars do not indicate a relationship of a person’s commit frequency compared to others’ commit frequency.
NL
on 30 Sep 11@MattO: As Scott said, these charts represent each person’s activity normalized to their own behavior, so size of commit doesn’t really matter for this purpose.
Your question did make me curious about relative commit size, so I looked it up for the same dataset I used to generate these charts. There’s a >15x difference between the person with the largest average commit and the person with the smallest average commit (as measured by number of lines changed). A lot of this difference is due to the different things that people work on (a developer commits differently than a designer or system administrator), but there are still substantial differences in average commit size among developers.
James Hunt
on 30 Sep 11This is really cool! I just wrote a little git/ruby snippet that creates an ASCII graph for my repository. Interesting to see how different people work.
git log—pretty=”format:%ai,%an” | ruby -e “require ‘date’; people = {}; ARGF.each_line {|l| time, author = l.split(’,’); people[author] ||= Array.new(24, 0);hour = DateTime.parse(time).hour; peopleauthor += 1}; people.each_pair {|name, times| puts name; tot = times.inject(0) {|sum, t| sum + (t || 0)}; times.each_with_index {|t, i| puts i.to_s.rjust(2) + ’: ’ + ‘█’ * (t.to_f/tot * 100).round}}”
NB: This processed ~17k commits in a few seconds, so YMMV for larger projects!
James Hunt
on 30 Sep 11Hmm, seems to have mangled the quotes…
Matt B
on 30 Sep 11Would love to know what tool was made to graph the data – the image is beautiful.
NL
on 30 Sep 11@Matt B: the graph was made with the fantastic
ggplot2
package for R (http://had.co.nz/ggplot2/), which is my goto tool for most (non interactive) graphics.Andrew
on 30 Sep 11Not sure if it’s valid, but I wonder if there’s any correlation between people with families and those who’s git commits drop between 5pm and 8pm and then rise back up again from 8pm till later at night?
It’d also be interesting to see graphics like this for various open source projects tracking major contributors. I know that looking through the Linux git history, Linus makes commits at some rather strange hours sometimes but I just assume that’s his working schedule based on other commitments (family, travel, conferences, etc).
Saeed Neamati
on 02 Oct 11How did you extract that chart out of GitHub? Is it a utility they serve?
NL
on 03 Oct 11@Saeed – Github doesn’t include a chart like this (they do show a repositories total commits vs. day and time of day, but not by committer).
Instead, I just ran the below ruby code from the directory that contains all of my cloned repositories to get a file containing committer and timestamp.
Ben
on 03 Oct 11Great data visualization. I would have taken out the dray boxes. It clearly shows your main point that relaxed hours can lead to dramatically extended actual work hours. Also, I wonder how different (in terms of lifestyle and personality) #2 and #9 are.
joel
on 03 Oct 11what tools are you using ?
Marc Walker
on 04 Oct 11Great post, some great points, thanks.
This discussion is closed.