
At what time of day do famous programmers work? - lionix
https://ivan.bessarabov.com/blog/famous-programmers-work-time
======
dahart
Personally, I’d be very cautious about assuming that commit time has anything
to do with work time.

For at least 15 years I’ve had a policy - and so have the people on my teams -
to avoid merging or committing to public branches at night or just before &
during weekends so that you don’t accidentally hose other people on the team,
who rely on automated builds & testing. We write code at all hours, but wait
to commit/push/merge to master until the morning when everyone’s there.

I realize that not everyone has policies like that, but these are high profile
programmers who are likely to have their own complicating factors. Linus, for
example, commits a lot of merges that other people depend on; his code reviews
and code writing might be on separate schedules.

~~~
dchest
Strange policy about commits — why just not push at night or during weekends?
Why's everyone not working on branches?

~~~
dahart
> Strange policy about commits — why just not push at night or during
> weekends? Why's everyone not working on branches

That is what I’m saying. The policy is avoid pushes to master. My policy does
apply to branches too once there are more than a few people in the branch.

Lots of people do work in branches, but everywhere I’ve worked, plenty of
people skip branching when they’re making what they think are “small” changes.
And some places I’ve been, the team has decided on a policy to skip branches &
merges for single commit changes due to the history noise it causes.

The policy is to avoid breaking changes being committed to master when people
aren’t around to notice & fix it.

~~~
stinkbug9o
You’re describing merges, not commits, or pushes to remotes.

One can commit and push to branches all day.

Merging them to master without a heads up is a bad idea, except where teams
have implemented a process that can handle it

~~~
inlined
Many of us do a “squash merge” (use git rebase to compress to meaningful
points in a CR and again before merging to master or feature branches). This
creates a clean history at the expense of not being able to stalk others work
at high granularity or get as large a score on github’s tracker.

~~~
testvox
Git rebase interactive with fixup or squash will combine the commits into the
first one. So the timestamp will still be somewhat reflective of when work is
done (on average).

~~~
inlined
Though I wouldn’t be surprised if there is at least some biasing. E.g. first
commits happening relatively soon after regularly scheduled scrum meetings. At
least if they’re the type of developer who checkpoints after incremental
changes.

------
codingdave
My gut reaction to this was the same as everyone else - to question the
validity of using commits as a measurement of time worked.

But then I read further and realized that this isn't a research study, it is
just a clever script to output some data from github. So I'm going to go run
it on a couple of my projects, see what it says, and enjoy that someone put it
together.

~~~
nitrogen
I've run similar git stats scripts (I think it was a Debian package actually)
on my own projects, and for me at least, they were pretty reflective of my own
working habits, with a time lag of an hour or two in the mornings.

------
anaphor
From John Carmack:

> I often worked nights and slept during the day, but I almost always got 8
> hours of sleep. There are still 112 hours left in the week!

[https://twitter.com/ID_AA_Carmack/status/932718658366857216](https://twitter.com/ID_AA_Carmack/status/932718658366857216)

~~~
simplify
Happy to see this being pointed out. Sleep is the single most important factor
in code quality & correctness
[https://twitter.com/hillelogram/status/1119709859979714560](https://twitter.com/hillelogram/status/1119709859979714560)

~~~
darkmighty
Sleep is a very technical thing, it's a 'Brain maintenance time'. It's not
about saving energy or anything that could/should be bypassed (otherwise we'd
be tired awake at night, useful for defending against predators in the
wilderness -- nature accepts a great cost for this shutdown). I find my memory
improved significantly once I started being more careful with my sleep, for
instance. I wish I had come into contact with this instead of the bragging 'I
barely need any sleep!' culture.

------
wiradikusuma
I'm a forgetful person, so I commit very often but with label "tmp", and later
I squash them all into 1 proper commit before pushing. I'm sure I'm not alone,
so commit time can't be used as barometer.

~~~
samhh
I dislike the apparent inability to label groups of changes with `git stash`,
so instead before leaving a branch with in-progress changes I'll commit them
all as "WIP". Then, when I return to the branch, I'll check if the previous
commit was WIP (`git log -1`), and if so will reset it (`git reset HEAD~1`).
It's the best workflow I've discovered for dealing with this problem, and it
means that I don't lose my commit history which is otherwise very clean.

~~~
Sharlin
Temp branches or tags are probably the "proper" way to stash a history of
changes in git. `git stash` is mostly a convenience feature for when you want
to quickly clean up your working tree to eg. pull latest changes from a
remote.

~~~
rurp
I like the approach of creating a new temporary branch for changes I need to
stash. When I come back to the work I usually bring the changes back to the
branch I'm working in with `git cherry-pick -n <commit hash>`. The -n flag
cherry picks the changes over without making a new commit, so I can finish
whatever I was doing and then make a proper commit.

~~~
smcameron
I use stgit for this kind of thing.

------
wyldfire
To those asking about whether time zones are considered, the author responded
in [1]:

> The script uses the time the author saw on his wall clock when doing the
> commit. I can't imagine better time to use for such graphs

[1]
[https://gist.github.com/bessarabov/674ea13c77fc8128f24b5e3f5...](https://gist.github.com/bessarabov/674ea13c77fc8128f24b5e3f53b7f094#gistcomment-2971934)

~~~
JCharante
What does wall clock mean? How do they know the geographic position of the
authors at their time of commit? I have my laptop's time set to my SO's
because if I want to know my current timezone I can just look down at my
watch.

------
hmottestad
I think the calculated wall time incorrectly.

>> The timestamp is the number of seconds since 1st January 1970. If we
convert 1563188141 to more human date we'll get "2019-07-15 10:55:41" — that
is the time in UTC timezone. Then we add "03" hours and "00" minutes to that
time and get "2019-07-15 13:55:41" — that is the time the commit author can
see on his wall clock when he did commit.

Usually the +0300 indicates that the times tamp is at +3 hours from UTC. Eg.
the timestamp is already in local wall time. The offset can be used to convert
it to UTC.

So if the author did what they wrote. Then I reckon all the data is actually
in UTC and not local wall time.

~~~
vomitcuddle
Unix time is always the number of seconds since 00:00:00 Thursday, 1 January
1970 UTC time. Git records the committer's time zone, since the time would
normally be converted back into a human readable form.

~~~
Etheryte
This is a good example of the ages old falsehoods about time. You're mostly
right, but you're missing leap seconds.

------
tshanmu
There is a possible issue though - would they commit immediately after coding
- how long do they need to work on a commit before actually committing it?

~~~
glandium
Another issue is that when you travel to a different timezone, you don't
necessarily update the timezone of your system.

~~~
cptskippy
Aren't most devices configured to adjust automatically these days?

~~~
franciscop
In the blog post it specifies that it uses the Unix timestamp, which doesn't
account for timezones.

~~~
cptskippy
Yes and that's most irrelevant because we were discussing the device offset as
users travel between timezones.

Unix Timestamps are always expressed as UTC/TUC which remain constant
regardless of device offsets.

The origianl comment's assertion that users don't typically adjust their
offsets is moot since commits are stored in UTC anyways. I was just pointing
out that many devices automatically adjust offsets.

------
segmondy
Every time of the day, it's like asking at what time does a musician compose,
or an artist paint or a author write. Surely, we can consider the physical
activity work, but the mental activity is also work and precedes the physical.

The brain churns on the problem at hand most of the time even when we are away
from the computer. I would even be bold to say, more so when we are away from
the computer and not distracted by typing.

~~~
gwern
> Every time of the day, it's like asking at what time does a musician
> compose, or an artist paint or a author write.

That's a pretty useless way of seeing things. You might as well define eating
or going on the toilet as 'writing' since hey, they _might_ be thinking about
it while they're doing it. If you look at actual writers talking about when
they write ([https://www.gwern.net/Morning-
writing](https://www.gwern.net/Morning-writing)) many of them are quite
explicit about taking breaks to do other work like correspondence or
family/friends in order to not think about writing.

------
flr03
It's difficult to draw any conclusion since we don't know their work pattern.
If you commit at 12 it probably means you were working between 9 and 12, or
between 11 and 12 or maybe it's just yesterday's work ? Who knows.

~~~
panpanna
I usually work 9-5 and commit before going home. I might pick it up again at
home and commit my changes before I go to sleep, around 11.

According to this study I would be working 5 to 11pm

------
tuna-piano
As someone who generally works a 9-5 job at a company where most people are
expected to work 9-5, can anyone explain if there are any norms or rules that
enable someone to work such abnormal hours at their companies?

Do companies like Google not care as much about work hours? I can't imagine
anyone showing up at 2pm at any of the places I've worked, regardless of how
productive they were.

~~~
paco3346
I think this really depends on the attitude of the company and specific
managers. Each quarter I'm given a list of projects and just need to have them
done by the end of the quarter.

Thankfully my boss has seen that I'm much more productive with my abnormal
schedule so I'm inclined that this type of freedom probably comes on a case by
case basis.

~~~
inlined
I know a former Technical fellow at Microsoft. He told me people gave him crap
& joked it must be nice to be a TL and have the power to leave at 3P. On the
other hand it had been years since he hadn’t watched the sun rise drinking
coffee at the office. He told me he tries to make sure he doesn’t get out of
bed till he hears his coffee machine go off at some time like 4A.

Also, at google I’ve known people to work part of the day from home or have
moderately shifted schedules to avoid traffic. Though there are often team-
wide “core hours” where you are expected to be available for a meeting.

------
compumike
I graphed this for myself a while ago in my work as a technical founder of
CircuitLab (YC W13): [https://imgur.com/37mbya5](https://imgur.com/37mbya5)

Two striking findings emerged (and FYI I'm a "frequently commit small logical
changes" person):

1\. My work patterns seemed surprisingly self-consistent, with a notable gap
2am-10am for sleep and around 1pm for lunch and exercise. (Plus a markedly
lower average in the evenings after 7pm for seeing friends, just relaxing,
etc.)

2\. The intersection between my curve and the window of 9:00am-6:00pm is only
53%. If a "conventional" employer were to constrain my productivity to that
window, that's at least some first-order measure of how much inefficiency that
constraint would likely produce for me personally -- 47% reduction.

------
anticensor
Fabrice Bellard apparently merges commits to Qemu between 21 and 22, and to
FFmpeg between 22 and 23.

------
IloveHN84
I always code between 8 and 16 o'clock, sometimes until 17, but then stop.

Programmers and engineers have family and hobbies too.

Stop making the myth of the endurance programmer more and more inflated. It's
proven and true that shorter working Hours have major bursts of productivity
against longer ones.

------
mikorym
> and timezone information (+0300)

> to filter only the commits by one person get the local time of that commit
> and aggregate it by hour when the commit was make

So these are all in local time of the computer doing the commit, if I am not
mistaken.

------
pgcj_poster
I wonder how much this is related to age.

~~~
8fingerlouie
Quite a bit i'd imagine.

I used to write lots of code at all hours of the day, 8 hours at work, 6+
hours at home. Then i had kids, and while i still write code 8 hours a day at
work, i rarely find the time to write anything in my spare time anymore.

Every now and then i have "some project" that i'm working on, but it's mostly
in bursts of 2-3 days, followed by 3-5 days of "doing nothing". The 2-3 days
are _not_ weekends, and i usually end up losing sleep over it.

Kids are relentless, and no matter how late you stayed up, they still get up
at 6 AM, and needs to be taken to kindergarten/school, and requires you to be
(mentally) present in the afternoon/evening.

I guess you could talk about a "soft burnout" happening from the 2-3 days
burst.

I'm trying to change the burst periods into more frequent, shorter periods of
1-2 hours, hoping the increased frequency will reduce the "ramp up" time while
getting "into the zone".

~~~
inlined
And there are other things that distract us with age. Eg I recently bought a
house. Now I’m always coming home to do housework instead of coding. Also
burnout can happen from acute events which we are more likely to run into over
time. I hit a specific conflict at work and mostly lost the will to work OT
for years after that.

------
lionix
Check for yourself in case you’re interested:
[https://gist.github.com/bessarabov/674ea13c77fc8128f24b5e3f5...](https://gist.github.com/bessarabov/674ea13c77fc8128f24b5e3f53b7f094)

------
neves
Nice graphs. It is interesting to note that the scale changes. In each graph,
an asterisk represents a different number of commits. Especially of note is
that Brad Fitzpatrick made a small number of commits in Memcached.

------
k__
The work patterns would be more interesting.

Does Bellard think the whole project through for days and then simply hacks it
down in a few hours?

Does one of them use TLA+?

Do they use iterative approaches, where the first few versions are really
buggy?

~~~
anaphor
From the projects they mention, the only one I can see really benefiting from
TLA+ would be memcached. For most things it doesn't make a whole lot of sense
to use it, unless you're writing a potentially distributed app. If you just
want to model a regular program, then you'd be better off looking at PlusCal,
which is more oriented to regular programs that aren't designed to be
distributed. It compiles down to TLA+ so you get the same benefits, but with
an easier to understand syntax.

Edit: Also if you want to learn about how famous programmers work, then
there's no better source than the book Coders at Work by Peter Seibel.
[http://www.codersatwork.com/](http://www.codersatwork.com/)

------
alexrbarlow
Does this take into account timezones?

~~~
cptskippy
4th paragraph.

------
herf
Maybe maintainers commit "early", merging other people's work that piles up at
night, while contributors commit "late", at the end of the workday?

------
euph0ria
I code a lot at evening/nights but I almost always let it rest until the next
day after waking up and do a review and then commit.

------
donatj
It's interesting to me hearing people in the comments talk about committing
after hours of work. I instinctively commit after every maybe 30 loc,
especially if I feel it has value. I'll sometimes squash them down if the PR
turns out particularly noisy. It would be interesting to compare the average
size of commits as well I'd imagine.

~~~
nottorp
I don't know, I commit logical units. Changes that do something. If they're a
one liner, that's it. If it's 500 lines, that's it.

If it's more than a day of work I might commit and push unfinished stuff
before i stop for the day, but otherwise no.

Edit: although the latter happens very rarely. IMO if a unit is a whole day of
work, maybe it needs splitting.

~~~
rightbyte
I would like to do that at work but the code review and Jira ticket adds to
much overhead so we mash stuff together to umbrella commits.

That is probably becouse we use Perforce where you don't do local branches by
default.

------
njharman
How does got get "local" time zone. I sometimes commit on systems set to utc.
And I'm unsure how many people accurately set time zone in online tools like
github. And many devs esp famous ones travel a lot. Not to mention moving.

All this to say, there's too many unknowns for me to trust this "study"

------
davidnog
I've made a breakdown on a daily basis as well (statistics on
#commits/hour/day) :

[https://gist.github.com/davidalbertonogueira/dfc1b114285523c...](https://gist.github.com/davidalbertonogueira/dfc1b114285523cf4367351a7ab92896)

------
cujo
No one should care. Seriously. There is no super secret work time that will
make you a super-programmer.

------
dcchambers
Cool information! I've always thought that I am more productive in the morning
- but now I'm interested in crunching the numbers to see what it actually
looks like. Obviously you can be productive and not make commits to a project,
but it would still be fun to know.

------
oauea
I write a lot of code at night, then commit during the day after a double-
check.

------
aerovistae
Are the times localized to the timezone they're in?

------
kurtisc
I've been meaning to do something very similar to this for a while to see what
hours people at large tech companies are committing at

------
newsreview1
But do you trust that commit time is going to actually be accurate? There si
no telling how many off commit hours go into a pre-merge

------
samirm
I don't get why so many people here are up in arms about commits not actually
representing real work or when it was done. The author never stated what he
thinks a commit represents and yet so many of you try to find some kind of
flaw with his method and ascribe your own meaning to words he never said. Just
enjoy this for what it is - a simple histogram for commits in a project.

------
hendry
Travel would totally mess this up. I don't bother to update `timedatectl` when
I am on the move.

------
ekianjo
Should be interesting to also check if people work during weekends or not, not
just the time of day.

------
noddingham
Who cares? Why does it matter?

~~~
rvz
Exactly, no-one cares. This industry is creating a culture of celebrity
programmers and worshipping and glorifying the code they write.

It does not even remotely matter. What matters is who is going to maintain all
of this after the years to come. (Or they could be even obseleted or
superseeded anyway.)

~~~
throwaway3627
For-profit clickbait items reinforce unhealthy and unrealistic digital
hallucinations to stay in business, and celebrity developer bloggers do much
the same in order to advance their careers. You don't know how they are to
work-with or if they have even earned their chops. Worse, the celebrity effect
tends to ruin most people as they become insufferably entitled and/or
uncooperative. These sort of people are often vastly overrated and can
absolutely annihilate the morale of teams.

------
mapcars
But why you interested in famous ones instead of the productive ones? :)

------
miguelmota
Are the commits represented in UTC time when using the script?

~~~
mikorym
It's in local time as an offset of UTC. So, if you pool by repo then you could
have two commits at 13:00 even though they were commited at different times of
the day, but in different time zones.

------
flatline
Do all these individuals work from a US time zone, or does fit report the
user’s local time zone from which the commit was made?

~~~
dabei
It is local time zone. The commit log has time zone info.

------
btucker
It's unfortunate that the author chose to only include male programmers in the
post.

~~~
numlock86
Why is it unfortunate? Or am I missing some sort of implication here? And what
about black programmers? Does it matter? If so, why?

~~~
inlined
Hypothetically the author thought of “epic programmers” and only came up with
white males. Women and PoC have given great contributions in our industry and
are underrepresented. This could have been an opportunity for the author to
learn about some and give them a bit of credit.

~~~
xwkd
Can you give us some examples of programmers of "epic" repute that are women
or people of color? (Or both?) I'd like to be able to bring them up when I
find myself reading something that doesn't include them.

~~~
inlined
As a google employee the first person who comes to mind is Sanjay Ghemawat.
Jeff Dean is upheld to mythical levels within Google but he pair programs with
Sanjay who is almost unknown.

Jess Frazelle is pretty famous for her work on dockerization as well.

[https://en.m.wikipedia.org/wiki/Sanjay_Ghemawat](https://en.m.wikipedia.org/wiki/Sanjay_Ghemawat)

------
Cannibusted
All day and all night!

------
seanhandley
tl;dr Rob Pike eats lunch at noon

------
barce
Let's cargo cult the advice on this ftw. Also let's piss off our managers by
saying, "Yeah, I heard this on Hacker News." Here for the downvotes to get
back to 666.

~~~
throwaway3627
Lmao. OP items like these reek of people looking for shallow poser shortcuts
rather than digging in.

------
naltun
> Linus is the author of the Linux operating system

Hmmmm... Not quite. Albeit I am a massive fan of the Linux kernel, though
Torvalds is _not_ the author of the Linux operating system (if we assume that
Linux is the equivalent of GNU utilities + the Linux kernel).

~~~
z_open
Why would we assume this? A kernel is absolutely an operating system.

------
AdmiralAsshat
Author is probably a non-native English speaker, so, gentle correction: "At
what time of day _do_ non famous programmers work?"

~~~
zcrackerz
The original article was written in Russian, so I'm assuming this is an
automatic translation.

------
artur_makly
TIL who the hell these 'famous' folks are!

~~~
smudgymcscmudge
Who would you consider famous among currently active programmers that aren’t
on this list?

I knew about half of the list (mainly the authors of software I use). I could
probably name a few who are equally famous, but not many who are more famous.

edit: I went back and counted. I recognized 4 of 7 names.

~~~
toyg
To be fair, every community has its own heroes. Somebody like Bellard is
probably completely unknown to most people living in the MS ecosystem, for
example.

