8 ms·
Disclaimer: I'm going to reference a product I built. The science of sleep is a strange thing. Sleep is ubiquitous (after all, everyone needs to sleep), and al
by david_shaw 14y ago
Disclaimer: I'm going to reference a product I built.
The science of sleep is a strange thing. Sleep is ubiquitous (after all, everyone needs to sleep), and almost everyone I know complains of being tired, or constantly groggy, or stressed due to the limited amount of sleep that they get every night. I know this particularly well, because I suffer from mild insomnia that keeps me awake far later than I should be. I try to use this time well, to create projects, or to learn new things, or to read books, but after a certain time in the night, one's brain starts to become mostly useless -- knowledge isn't retained.
All of that is background for an experience I had in late 2010. As usual, I had been sleeping badly -- getting about 4.5 hours of solid sleep per night for several weeks -- and was feeling pretty terrible, as you might imagine. That night, however, and for whatever reason, I slept beautifully for eight hours... but when my alarm clock went off, I felt terrible. I felt worse than I'd felt on four and a half hours' sleep. How was this possible?
It really bothered me, especially because I'd been so happy that I finally slept a "normal" night's sleep. Did I have some other sleep disorder, maybe one that produced insomnia as just a symptom? I researched, and tried to figure out what was really happening. I couldn't stand the grogginess I felt every morning.
During my research, which lasted probably about a month, I realized that something that made a major impact on me was the stage of sleep during which I woke up. Since sleep cycles last about 90 minutes, I felt better waking up between cycles (4.5 hours is about 3 complete cycles) than waking up in the middle of a sleep cycle (8 hours is 5.3 cycles). It turned out that this phenomenon was called "sleep inertia."
For awhile, I'd try to time this myself. I'd take a piece of paper, and count backwards from the time I needed to wake up in between cycles, then add on some time to fall asleep. I started to notice incredibly less grogginess in the morning. My new technique was amazing.
I tried sharing it with some of my friends and colleagues whom I knew also had problems getting up in the morning (who doesn't?), but it turns out that doing even simple math (subtraction) was not an activity people wanted to do right before bed. I'm not a math guy myself, so I couldn't really blame them. The timing happened to work out that I was teaching myself jQuery at the time, so I figured I'd create a little webapp for myself and my friends to use. That's how http://sleepyti.me http://sleepyti.me was born.
In November 2010, when Sleepyti.me first launched, I asked HN and later Reddit's /r/programming for advice related to design and usability -- I am not a web design guy. That helped, but I ended up keeping the minimalist design in place. This choice was partially because I think it looks nice and clean, and partially because I'm not very good at design... at all. Anything more complicated and it probably would have looked terrible, knowing my design skills.
The site, much to my surprise, caught on very quickly. Social networks (Twitter & StumbleUpon, mostly) as well as traditional media found it effective and intriguing. I ended up giving several interviews about the site, being featured in LifeHacker, and being overall far more popular than I'd ever imagined. For example, I received 300,912 visits to the site last week.
I don't allow donations, and I haven't released an official mobile app yet, but the single banner page on the site has done very well for me -- I've earned $1500-$2000 per month since early 2011. It's not a startup by any means, but it's certainly a nice way to bring in some extra income from a side project.
I think the point I'm trying to make is that the article is right: the science of sleep is strange, and at times counter-intuitive... but in my opinion, it's also an untapped market. After all, we all just want a good night's sleep, don't we?
- nhebb 14y agoRe http://sleepyti.me http://sleepyti.me: One small issue is that sleep schedule is calculated after setting the hour and minutes, but before getting a chance to set the AM/PM.
- ashray 14y agoJust wanted to say that I use sleepyti.me a few times a week to decide my alarm time. It's really great and the only reason I use it lesser now is because I can just calculate the sleep cycles in my head (yeah programmers/math people aren't your target audience :P). But hey! Thanks for a brilliant tool and an eye opening insight into sleep patterns.
- mikeash 14y agoI use an alarm app called Sleep Cycle, which basically monitors my movement and tries to wake me up at a good time. Similar idea to what you're showing, but a bit more dynamic (which could be good or bad, I suppose). Any thoughts on the two approaches? For anyone who cares, I recommend Sleep Cycle most highly, or anything that gets you awake at a time more suited to your natural rhythm than an arbitrary alarm clock, whether Mr. Shaw's solution or something else. The difference really is remarkable, just as he says.
- peterjmag 14y agoWhen you first posted about sleepyti.me here on HN, I was enduring a long phase where I was having a particularly hard time falling asleep at night. I would often lie in bed for two or three hours before I finally drifted off. Compounding the issue was my tendency to constantly measure and analyze how long I'd been trying and how much sleep I would (not) get if I fell asleep "now", always comparing those figures with factoids from articles I'd read about how much sleep we need, sleep cycles, etc. Then I came across this line on sleepyti.me's results page: "The average adult human takes fourteen minutes to fall asleep, so plan accordingly!" Now, instead of measuring my sleeplessness by the hour or by the sleep cycle, I started measuring by multiples of fourteen: "Okay, it's only been 28 minutes since I got in bed. That's only two times the average." "Now I'm at ten times the average. This is ridiculous." I started harboring a grudge towards all those "average" people who could fall asleep so quickly. I wondered if I was enough of a statistical outlier to skew the average up to fifteen or even sixteen minutes. I even began to begrudge _you_ for including that seemingly innocent statistic on a website intended to help people sleep better. I had no idea who you were, but I hated you for lodging that figure in my subconscious. These were the racing, irrational thoughts of my addled, sleep-deprived brain. At the same time, in part because of that bit of trivia on your site, I started realizing that I had a real problem. My lack of sleep was affecting my concentration, my work, my relationships, pointing inevitably towards a long downward spiral that I desperately wanted to avoid. I began to critically examine my sleeping patterns, my sleeping environment, what I did every night and every morning, my diet—my whole life, in fact. Over the course of the next few months, I experimented with every variable I could think of. I'm proud to say that today, I'm sleeping better than ever. I'm able to fall asleep much more easily, and my overall mood and outlook has improved considerably. It's by no means perfect though—it's very much an ongoing, concerted effort. For those of you enduring a similar struggle for sleep, here are a few of the things that made the biggest difference for me: - Don't get hung up on numbers. Stop counting the minutes that you're not sleeping. Easier said than done for many of us, I know, but it's huge. Place digital alarm clocks and the like out of sight from your bed, and resist the urge to check the time on your phone. - If you're on the computer late at night, use f.lux to automatically adjust the color temperature of your screen. The bright light of your LCD screen can mess with your body's natural rhythms, and f.lux helps to counter that. It took me a little while to get used to it, but once I did, I noticed a marked decrease in the "racing mind" syndrome when I used my computer right before bed. Here's the link: http://stereopsis.com/flux/ http://stereopsis.com/flux/ - Avoid caffeine after lunchtime. (This one will vary widely for different people, but since I'm a caffeine lightweight, it's pretty early in the day. Find your own cutoff.) Also try different caffeinated drinks. For instance, if I drink coffee at any time of the day, I'll likely have trouble sleeping that night, so I drink black tea almost exclusively. - Don't go to bed on an empty stomach. I can't fall asleep if I'm hungry. - Read! I started reading in bed every single night about a year and a half ago, and it's my favorite way to shut my brain off at the end of the day. Of course, certain books are better to fall asleep to—the best ones will keep you interested without being so engaging that you can't put it down. (I made the mistake of starting the Hunger Games at about 1:00am a couple of weeks ago, and I ended up reading the entire thing that night. I only got two hours of sleep before work the next morning.) Find what works for you. - If I'm still having trouble falling asleep after reading, I will often "replay" the last couple chapters of whatever I read in reverse. See if you can remember everything that just happened and work your way back to where you started that night. I read about this trick somewhere on the web (amongst a bunch of other tips that didn't help), and it seems to work wonders for me. If you don't read at night, try recounting your day (even the boring stuff) backwards instead. - Don't beat yourself up if you still struggle to sleep. It's okay, and it _will_ get better. (On that note, please consider seeing a doctor if your sleeplessness persists!) Finally, to David: Thank you for building sleepyti.me. It serves a simple but significant purpose, and it does so elegantly. And while it fed my irrational, sleep-deprived hatred of non-insomniacs for a little while, it also became a catalyst for real change in my life.