Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Sleep!

 Sleep!

My presentation from Railsberry 2013, in which I talked about the effects of sleep loss on the brain and on the biology behind our sleep cycles.

Alex Koppel

April 22, 2013
Tweet

More Decks by Alex Koppel

Other Decks in Technology

Transcript

  1. Me

  2. Sleep in Rails • Rails 4 on Ruby 2.0 refines

    Kernel#sleep • Accepts negative argument in controllers • Only known use for refinements
  3. Sleep in Rails around_filter :deliver_request_fast def deliver_request_fast received_at = Time.now

    yield # go back and deliver the results immediately sleep(received_at - Time.now) end
  4. We are thinkers! • Our job is to solve problems

    • Sleep directly impacts the brain • How we sleep affects how we code
  5. We have a problem • Huge population suffers from insufficient

    sleep • Estimated 20%+ of Americans affected • Wanting more sleep, not getting it • Frequently tired Source: [10]
  6. tl;dr • Lack of sleep impairs your thinking • Our

    natural sleep cycles arise from biology • Therefore: we must support sleep
  7. 0.hours.sleep • Sleep deprivation hurts your ability to think •

    “This deactivation is greatest in those brain areas sustaining higher cognitive performance and situational awareness.” • Not a surprise Source: [3]
  8. Less sleep, less brain • Sleep restriction reduces brain function

    • Cumulative effects over time • Proportional to how much sleep lost
  9. Science! • Let's quantify this • Common test in sleep

    research: PVT • Measures reaction time, sustained attention • See appendix A
  10. Source: [1] Charts and Graphs Y axis: failures to respond

    to visual prompt inside time window X axis: experiment time
  11. Other tests agree • Higher-level tests also show similar effects

    • Proportional, cumulative effects • Impaired learning • See appendix Source: [1]
  12. Apparently not • The brain adapts to less sleep •

    This persists at least several days after restriction stops • Recovery sleep is physically different Sources: [2], [4], [9]
  13. Analysis • Even the 7 hour group wasn’t back to

    original state after 3 nights of full sleep • A weekend isn’t long enough • Obviously you recover eventually Sources: [2], [4], [9]
  14. It’s hard! • Even knowing all this, getting to sleep

    is tough • Why are we so bad at staying rested?
  15. Sleep disturbed • Many things can affect sleep • Alcohol

    and other drugs • Exercise • Stress and emotion • Diet • Willpower • Kids • Sex • Webcomics
  16. Put those aside • Let's just look at natural sleep

    rhythms • Healthy, drug-free people don't get enough sleep either!
  17. Chronotypes • A way to group sleepers • The mid-point

    of our natural1 sleep cycles • Regardless of length • For most, 3.5-4 hours into sleep 1 Imagine a quiet 3 week vacation at home, sleeping and waking when you want.
  18. Alternately put Source: [6] p. 13 Over 50% of the

    population wakes btw 8 and 11 AM Only ~33% naturally wake up before 8 AM
  19. Especially for us Sleep midpoint (hour) Source: [6] p. 101

    Younger populations tend to later sleep
  20. • Much of society starts up between 8 and 9

    • We're asked to live contrary to our biology Yet
  21. Social Jet Lag • Society time != body time •

    Expressed through sleep loss • Like traveling by plane every day • 40+% of Central Europeans off by 2+ hours Source: [6] p. 149
  22. No • Our bodies sync their clocks with the sun

    • Most people run longer than 24 hours • This “entrainment” tends toward later sleep • Sleep cycles are hard to change Source: [6] p.117-128
  23. To repeat • Sleep cycles arise from biology • (In

    an otherwise constant environment) • We can't (easily) control / change this
  24. Managers! • Encourage your team to sleep enough • Let

    people follow their rhythms • Don't worship crunch time
  25. Science is fun • “Some evidence suggests...” • Hard conclusions

    are hard • Explanations, like this, can be preliminary • Moar studies! • But the basics presented here are solid
  26. A possible mechanism • Effects of sleep restriction and deprivation

    postulated to share a common trigger [1] • Cumulative excess hours awake • How much longer you’re up in a given period than you should have been • Deprivation effects likely =~ restriction effects (in proportion) • Not the only proposed theory Source: [1]
  27. Science time! • Psychomotor vigilance test (PVT) • Subjects respond

    to a visual stimulus • Measures attention and response time • Also lapses (response > 500ms) • Used by NASA and sleep researchers Source: [12]
  28. Other Test Results • Sleep restriction impacts shown on other

    tests • Higher-level functions tested than just response time • Tests with learned skills Source: [1]
  29. Matching digits to symbols 8 hours: learning bonus 6 hours:

    no learning 4 hours: got worse Source: [1] Digit Symbol Substitution Task
  30. Analysis • Sleep restriction effects more manageable with complex tasks

    • BUT no gains from learning • We need to learn to succeed • Interesting question: would gains appear after recovery sleep? Source: [1]
  31. Internal Clocks • All humans (organisms) have internal clocks •

    Few run exactly 24 hours per cycle • On average slightly longer Sources: [11], [6] p. 1, 118-127
  32. Light • Our bodies use light to sync with the

    world • Light at different times shifts our sleep/ wake cycle • Longer days lead to later sleep patterns Source: [6] p.117-128
  33. Internal Day • We each have an internal "day" •

    From one waking up to the next • Light affects us differently at different times of our days
  34. Entrainment • Light in the inner morning shortens the day

    • You sleep earlier • Light the in inner evening lengthens it • You sleep later • The body mixes both to get the right adjustment Source: [6] p.117-128
  35. Example • Your day is too long (say, 24.5 hours)

    • You want to compress your day (sleep sooner) • So...what do you do?
  36. Solution! • Wake later • Your inner evening happens in

    the dark! • Compression > expansion • A shorter day (24 hours)
  37. More proof Waking times among a homogeneous population (Germany) in

    1 time zone are controlled by the Source: [6] p.158
  38. Bringing it all back home • Most people have a

    longer clock • So most people ought to wake later • And that's what we saw earlier!
  39. Ryan North on sleep What's your sleep routine like? When

    I was a kid I had to get up at 6 to catch a 7 AM bus into school, and once I started grad school I relaxed that to 7 AM. So I'm usually up at 7 sharp (alarm set so I can hear the news) and then in bed when I start to get sleepy, which is normally between 11 and midnight. I really value my sleep. And I wish it were somehow super awesome to say "I really value my sleep." [emphasis added] http://lifehacker.com/5986982/im-ryan-north-creator-of-dinosaur-comics-and-this-is-how-i-work
  40. Sources 1. Van Dongen, H. P. a, Maislin, G., Mullington,

    J. M., & Dinges, D. F. (2003). The cumulative cost of additional wakefulness: dose- response effects on neurobehavioral functions and sleep physiology from chronic sleep restriction and total sleep deprivation. Sleep, 26(2), 117-26. Retrieved from Source: Van Dongen, etc., UPenn Study, 2003 [1] 2. Belenky, G., Wesensten, N. J., Thorne, D. R., Thomas, M. L., Sing, H. C., Redmond, D. P., Russo, M. B., et al. (2003). Patterns of performance degradation and restoration during sleep restriction and subsequent recovery: a sleep dose-response study. Journal of Sleep Research, 12(1), 1-12. Retrieved from http://www.ncbi.nlm.nih.gov/pubmed/12603781 3. Belenky, G. (1997). Sleep , Sleep Deprivation , and Human Performance in Continuous Operations, 1-13. Retrieved from http:// isme.tamu.edu/JSCOPE97/Belenky97/Belenky97.htm 4. Alhola, P., & Polo-Kantola, P. (2007). Sleep deprivation: Impact on cognitive performance. Neuropsychiatric Disease and Treatment, 3(5), 553-567. Dove Medical Press. Retrieved from http://www.pubmedcentral.nih.gov/articlerender.fcgi? artid=2849789&tool=pmcentrez&rendertype=abstract 5. Robinson, E. (2005). Why Crunch Mode Doesn’t Work: 6 Lessons. IGDA Retrieved Feb, 1-6. Retrieved from http://www.igda.org/why- crunch-modes-doesnt-work-six-lessons 6. Roenneberg, Till. Internal Time: Chronotypes, Social Jet Lag, and Why You're so Tired. Cambridge, MA: Harvard UP, 2012. Print. 7. Popova, M. (2012). Internal Time : The Science of Chronotypes , Social Jet Lag , and Why You’re So Tired. Retrieved from http:// www.brainpickings.org/index.php/2012/05/11/internal-time-till-roenneber/ 8. Roenneberg, T., Daan, S., & Merrow, M. (2003). The Art of Entrainment, 18(3). doi:10.1177/0748730403253393
  41. Sources 2 9. Fackelmann, K. (2007). Study: Sleep deficit may

    be impossible to make up. USA Today. Retrieved from http://www.usatoday.com/ news/health/2007-11-25-sleep-deficit_N.htm 10. Hublin C, Kaprio J, Partinen M, Koskenvuo M. (2001) Insufficient sleep: a population-based study in adults. Sleep, 24: 392–400 cited in Wikipedia, replace w other data 11. Toh, K. L., Med, M. I., Uk, M., & Genet, H. (n.d.). Basic Science Review on Circadian Rhythm Biology and Circadian Sleep Disorders, 662-668. 12. Psychomotor vigilance task. (2012, June 11). In Wikipedia, The Free Encyclopedia. Retrieved 10:24, June 22, 2012, from http:// en.wikipedia.org/w/index.php?title=Psychomotor_vigilance_task&oldid=497069857 13. Alternative Sleep Cycles: You Don’t Really Need 6-8 Hours! Retrieved April 11, 2013 from http://www.highexistence.com/alternate- sleep-cycles/ Image credits: • welu-berlin. Brandenburger Tor. Retrieved April 21, 2013 from http://www.flickr.com/photos/welu/1345394487/ • Daj12192. Willis Tower. Retrieved April 21, 2013 from http://commons.wikimedia.org/wiki/File:WillisTower11.jpg • Mills, Dan. Hard at Work. Retrieved April 21, 2013 from http://www.flickr.com/photos/thunder/98937190/ • Munroe, Randall. Science. Retrieved April 11, 2013 from http://xkcd.com/54/. • Munroe, Randall. Hallucinations. Retrieved April 21, 2013 from http://xkcd.com/203/ • People in a meadow. Retrieved April 21, 2013 from http://www.yourwealthforlife.com/blog/how-to-enjoy-life-more/