
Impact of a Night of Sleep Deprivation on Novice Developers’ Performance (2018) - gyre007
https://arxiv.org/abs/1805.02544
======
wallflower
When I was younger, like many people, I thought of all-nighters as a thing to
brag about.

Now, I see sleep deprivation as a serious health debt that you pay nosebleed
compound interest rates on. If you get less than your preferred amount of
sleep, everyday living can become more complicated. Simple tasks can become
dangerous. Do not walk down stairs without holding the hand rail if you are
tired!

Also, my sleep tracker confirms that, on average, it takes about one hour more
of being in bed to get X hours of sleep. So if you need 8 hours of sleep, you
need to be in bed around 9 hours! I aim for 7 hours (8 hours in bed).

~~~
heymijo
"as a serious health debt"

Except, sleep isn't a debt because the loss can't be repaid.

This is one of many important things I have picked up from Dr. Matthew Walker
who wrote "Why We Sleep" and has been doing the podcast rounds lately.

Not to pick on you at all. It sounds like you have made some big realizations
and are making fantastic changes. Realizing I can't make up sleep to pay off
the "debt" has been eye opening.

~~~
Ntrails
> Except, sleep isn't a debt because the loss can't be repaid.

 _sort of_?

The impact of missed sleep has a half life. A single night of 4 hours sleep,
followed by a year of normal nights sleep will lead to a me that is
indistinguishable from the me that slept 8 hours that same night.

I'm all for sleeping properly, but lets not suggest that it is the end of the
world any time someone doesn't get their standard n hours

~~~
TuringNYC
>> A single night of 4 hours sleep, followed by a year of normal nights sleep
will lead to a me that is indistinguishable from the me that slept 8 hours
that same night.

 _Usually._ Except if the 4 hours of sleep leads you to crash your car, or run
into a pedestrian, or forget your child in a car.

In the usual case, a day of missed sleep is normally OK, but when you are
responsible for other people (rather than just code quality/productivity), why
risk it? And even in the general case...why risk it? It is far better to lead
a normal lifestyle and be at peak performance in all parts of your
responsibility.

~~~
vageli
> Usually. Except if the 4 hours of sleep leads you to crash your car, or run
> into a pedestrian, or forget your child in a car.

> In the usual case, a day of missed sleep is normally OK, but when you are
> responsible for other people (rather than just code quality/productivity),
> why risk it? And even in the general case...why risk it? It is far better to
> lead a normal lifestyle and be at peak performance in all parts of your
> responsibility.

I'm sure most people with responsibilities getting less than their required
sleep are not doing it by choice. When I have had to forgo sleep it was out of
necessity (primarily to work a second job). Of course it is far better to get
the optimal sleep your body needs. It's not about people intentionally
engaging in risky behavior needlessly—oftentimes people are trading sleep for
putting food on the table, for instance.

~~~
Starwatcher2001
I quite agree with the problem of having to trade sleep for other necessities,
but personally I didn't realise the actual cost of that trade, and the serious
long term effects that 90+ hour weeks might have on me.

In my case it wasn't a second job, it was trying to be more productive to help
a fledgling company fly. In retrospect I'd have been a lot more productive
with a good 8 hours sleep in my tank every night.

Walker's book on sleep opened my eyes that much that I bought copies for all
the family. I've never done that before.

------
dakics
I've bought recently one of those cheap wrist bands.

One of the most important features for me was ability to measure sleep quality
in terms of "daily hours of deep sleep," whatever that scientifically means.

Over the course of several months, I've been able to identify things which
affect my sleep quality:

* eating late: bad

* drinking late: one beer... not really that bad

* answering work emails until midnight: REALLY BAD (even while drinking soothing chamomile tea during soft rain) etc.

I'm trying as reduce as many "bad" things as possible as I can feel a _huge_
difference between 30 mins and 3+ hrs of deep sleep, as measured by the
device.

I feel much better during the day, can work more productively and, most
importantly, my "fuse" seems to be much longer.

Probably best $30 ever spent.

(still missing weekend code binges of early 20s, though :/ )

~~~
jdironman
What is the brand of the device? I am interested in getting one. I'm
struggling today after little sleep, but I would also like insight on how much
deep sleep I am getting.

~~~
dakics
Mi Band 3. It appears its sleep quality measurement through
gyroscope/accelerator is accurate enough.

------
anoplus
Programmer in a start-up here. Please do talk about this with your workaholic
colleagues as I did! We need to create an industry standard here.

Sleep is super important to success and happiness, and I just recently found
that sleep is not enough. I need also rest. If I don't have rest and
relaxation often I get tired for several days regardless of sleep time.
Writing this after deliberate 5 minutes downtime.

~~~
bastih
This may just be me, but when I was in charge of hiring a team, I ended up
passing on sleep-foregoing candidates (often that wasn't the only thing, but
it was a big factor for me).

To this day, candidates that don't take care of getting enough sleep just to
get things done, raise a red flag for me.

~~~
GordonS
Curious... did you really ask candidates about their sleep patterns?

------
itamarst
This isn't a very surprising result: there's a whole body of research showing
sleep deprivation reduces cognitive abilities.

So why do programmers still sleep less than they need to? Often it's because
they're working long hours, and to get time for the rest of their life they
cut back on sleep.

If that's you—it doesn't have to be that way. You can set boundaries at work
([https://codewithoutrules.com/2019/04/03/setting-
boundaries-a...](https://codewithoutrules.com/2019/04/03/setting-boundaries-
at-work/)), you can say no to your boss
([https://codewithoutrules.com/2018/08/16/how-to-say-
no/](https://codewithoutrules.com/2018/08/16/how-to-say-no/))... and you'll be
doing your employer a favor because your output will go up.

~~~
flyingpenguin
I think caffeine and other uppers play a large role as well. I am sitting at a
desk doing nothing but I need my brain to be in the state its in when I am
doing harrowing physical activity.

My quality of sleep reflects this.

~~~
mywittyname
I think this warrants a closer look. We do work in a profession that has a
cognitive load that is wildly disproportionate to our physiological load. I
suspect that some of us need heavy physical activity during the day in order
to sleep well.

Anecdotally, when I worked construction I had zero issues going to bed at 9pm
and getting to work at 7 every day. But now that I sit at a desk for 9-12
hours a day, I'm rarely able to fall asleep by midnight and getting to work
reliably by 8AM is impossible. Ironically, I have no issues sleeping "early"
on the weekends when I spend the days out-and-about and doing house work.

~~~
Marsymars
> I suspect that some of us need heavy physical activity during the day in
> order to sleep well.

Yes, this is absolutely the case. I do software as a dayjob, but do an hour or
two of heavy physical activity every day (or more on weekends), and sleep
great nearly all the time.

When I've had injuries that prevent me from my regular exercise routine, my
quality of sleep takes a huge hit. To the point that last time I had a severe
ankle sprain, I'd go to a gym (which I don't normally do) just to use one of
those arm bike machines to tire myself out.

------
jarym
“Our results also show that sleep-deprived developers make more fixes to
syntactic mistakes in the source code.”

That statement, in isolation, could be taken completely out of context.

Of course no sane person would conclude that a sleep deprived developer can
fix more bugs. However there are many executive-level staff that are
definitely not sane.

~~~
mcondit
Yeah curious why more people didn't notice that strange phrasing. Not sure
what the point of it was. Did they make more mistakes and therefore fix more
of them?

------
fredley
Struggling to get to sleep? One thing that really helped me was taking care of
what I was doing in the hour or two before bedtime. Staying up scrolling
through work emails or reddit or news? Your mind's gonna be racing when you
get to bed. Now I watch an hour of TV with my phone in another room - a
completely passive activity that gives my mind time to settle down.

~~~
Void_
This exactly makes all the difference for me.

When I do anything even remotely exciting, I have harder time falling asleep.
Not only that. I will also wake up 1-2 hours earlier and have very hard time
getting back to sleep.

If I do something calming, I have none of this issues.

Watching movies is great. Think about something absolutely unrelated to your
stress for 90 minutes.

And yes, my insomnia is stress induced. If I’m on a holiday, which I haven’t
been for couple years, I have none of those problems.

~~~
tachyonbeam
Reading books (or listening to audiobooks) is probably even better in terms of
reducing exposure to blue light (which tends to suppress melatonin secretion).

Personally: I recently realized that I should make an effort to work out
sooner in the evening. I have an exercise bike at home and I tended to work
out only after everything else was done, sometimes at 11PM, right before going
to sleep. Exercise increases cortisol levels, so it's best to do it earlier in
the day.

------
AstralStorm
Not exactly the best experimental design here. Instead, canadian cross should
be used which would reduce and detect variation between individuals.

(Same devs on multiple occasions, sometimes well slept, sometimes not.
Matching tasks for both groups. Learning effect is controlled by swapping
group order of task execution. This is fully factorial fully crossed design.)

However, the magnitude is indeed big and the results probably valid but might
not quite match up for experienced devs.

~~~
mettamage
IMO, as far as research has been done in this field: the only point they need
to make with experiments at the moment is that it has a huge impact.

Hopefully, they now are able to get amazing grants because of these results to
study it more in-depth.

The politics of science >= doing actual good science [1]

[1] Provided the right intentions are there (advancing truthful knowledge of
humanity)

------
Merrill
With the 996 system (9 am to 9 pm, 6 days per week), this would leave very
little time for anything but working and sleeping.
[https://en.wikipedia.org/wiki/996_working_hour_system](https://en.wikipedia.org/wiki/996_working_hour_system)
[https://www.cnn.com/2019/04/15/business/jack-
ma-996-china/in...](https://www.cnn.com/2019/04/15/business/jack-
ma-996-china/index.html)

~~~
fao_
In most of the civilized world, including the PRC, that system is outright
illegal.

~~~
qvrjuec
Which means nothing unfortunately, as companies are still encouraging
employees to stick to this work schedule

~~~
cardiffspaceman
996 is encouraged _IN PUBLIC_

[https://www.cnn.com/2019/04/15/business/jack-
ma-996-china/in...](https://www.cnn.com/2019/04/15/business/jack-
ma-996-china/index.html)

------
Zekio
did I read that wrong or does it say I can get a 50% code quality improvement
by just sleeping what ever is considered normal?

~~~
luckylion
50% improvement for sleeping vs not sleeping at all.

~~~
davemp
That honestly seems conservative. The times I've missed an entire night I've
been essentially useless or an actual detriment.

~~~
jimbokun
In reality, your "productivity" is likely to be negative, as you will need to
spend even more time fixing the mistakes you made trying to program in a sleep
deprived state.

------
oddie
It's exciting to see specific validation for our industry.

We've seen a similar phenomenon with athletes, which drove us to create a
sleep improvement app, called Rise Science
([https://www.risescience.com](https://www.risescience.com)), for athletes
that tells them what to do to improve their sleep tonight based on science.
It's currently being used by both professional and collegiate teams across the
NFL, MLB, NBA, MLS, and NCAAF.

We're now taking what we've learned from athletes and adapting it so anyone
can engage in a lifelong practice of healthy sleep. If you're interested in
helping test the early beta version of our app sign up here:
[http://bit.ly/hacker-friends](http://bit.ly/hacker-friends)

(for those interested in similar studies, here's a related paper from a friend
of Rise at Stanford, where they quantify the impact of less sleep on cognitive
performance using web search interactions as a proxy:
[http://timalthoff.de/docs/althoff-2017-population_scale_phys...](http://timalthoff.de/docs/althoff-2017-population_scale_physiological_sensing.pdf))

~~~
dimnsionofsound
Is a phone number really required to sign up?

~~~
oddie
It's been really helpful for quickly helping folks who have issues during the
early beta.

It's early, so not everything is perfect—we're working at full speed to make
improvements and roll out new features.

------
Uptrenda
I'd love to see a modafinil, caffeine, and nicotine group added to this study
to see if there's any difference. 50% reduction in quality is a lot!

~~~
GordonS
Sample size of 1. I suffer from chronic fatigue, and caffeine definitely makes
a difference, modafinil even more so. I don't take modafinil ever day, but
when I do there is a definite improvement - I'm more alert, more focused and
more productive.

------
inkydes
Are older engineers put out to pasture because they know better than to get
caught up in all-night-no-break fervors?

Asking employees to do this is like asking them to extend a line of credit
that you can't pay back.

------
CM30
Kinda makes me wonder what the effects must be on those who work under endless
'crunch' type conditions, with 16 hour days/100 hour work weeks. That's pretty
common in the video game development world, with articles saying conditions
like that existed at the likes of Epic Games and Bioware.

Also makes me wonder if it has any connection to how buggy some of these games
are, or whether that's just a symptom of the modern system allowing you to
patch stuff post launch.

------
man2525
I was just diagnosed with severe sleep apnea. My troubleshooting has
definitely declined some in the past five years. I was break-fix, however, for
a good part of it, and a patch that needs another patch is a no-no for me, so
I'm fairly systematic. Maybe I'll be able to make more leaps of faith as I
recover. I certainly could use a productivity boost.

------
mjberg01
Shameless plug - we built a product for orgs to deploy better sleep to their
people. -> [https://puresomni.com](https://puresomni.com)

Our goal is simple - if we can help folks sleep better we can improve their
overall health and ability to flourish.

Happy to chat with anyone who is more interested in any way in what we are
working on, has thoughts/feedback or would like to talk more about sleep in
general.

~~~
hacker_123
As an individual, I had three sets of unanswered questions while visiting the
site.

1) Can I use my insurance for part of this? Even if it isn't directly covered,
would it count towards the max out of pocket? Can I use an FSA/HSA?

2) On the /learn page it isn't clear what happens after 4 weeks. Do I keep
access to sleep tracking? Of less interest to me, what about the marketplace
or sleep course? What is the cost to stay subscribed? The sign up flow
explains the monthly subscription for physical goods, but I didn't click into
that page before I decided to leave a comment and went back to double check
the /learn page's contents.

3) Other than the sleep coach, what are the concierge features? Does the
content pack include articles, videos, podcasts, "homework", or other things?
Is the apnea screening a qualitative questionnaire or does it use data from
the sleep tracking? Are the personalized tools software, psychological
tactics, physical sleep aids, or something else?

It certainly looks like an interesting product, but it's priced too high for
me to buy before understanding it better.

------
liggitt
I want to see the study on the impact of novice developers on senior
developers' sleep deprivation

------
itsangaris
"Why We Sleep" by Matthew Walker is an amazing book and talks about this for
of stuff and a lot more. Having read it, this is not surprising at all to me.
Last year I read ~45 books, this book stood out as one of the best.

~~~
itsangaris
One of the things discussed in the book is how inhumane it is having subjects
in an experiment deprive themselves of sleep (pull all-nighters); it has
lasting effects on the body. As a result it is becoming much less common for
experimenters to do this, so I'm a bit surprised at how this study was
conducted.

------
manmal
I was sleep deprived today (only 4.5h of sleep thanks to catching up on GoT
season 7), and I think I was 30-50% slower than usual. I didn’t notice
throughout the day, but I just didn’t get as much done.

------
z3t4
One positive effect of being tired is that you stumble on more bugs. Add
stress and tight deadline to that and many bugs will reveal them-self in order
to annoy you, or trick you into yak shaving.

------
mettamage
Soooo.....

Where can I do research like this? It seems easy, relevant and I'm
academically equipped to do it (CS master psychology bachelor background).

------
i6mi6
Does it matter what time of the day you sleep or just how many hours?

------
d--b
Yeah, and so we can conclude that sleeping is, after all, useful.

------
chasd00
Three team leads were sitting at an airport bar waiting on a flight. The first
says "my developers are so strong they can code all day without a single
break". The second lead replied "my developers are so dedicated they will work
through the night without rest until the job is done". The third listened
intently and then replied "my developers are professionals, they eat when they
are hungry and they sleep when they are tired".

~~~
dtwhitney
Aww come on! No punch line?

~~~
afturner
I think the punch line is that the last dude doesn't exist

~~~
nicoburns
I have only ever worked for people that take this attitude, and now that I
lead my own team, I am sure to make this clear to them too.

------
rejectedstone
I had to stop at "quasi-experiment"

~~~
AstralStorm
That's just a bad name. This is essentially a nonrandomized unblinded
controlled trial using representative sampling. Only two steps below a full
RCT unless you suspect foul play.

I'm not sure how you'd blind lack of sleep and that's not the point, so the
only issue is lack of randomization.

Much better than an observational study.

