Live data from Hacker News

Ask HN: Do you struggle to sleep after coding all day?

news.ycombinator.com

11–20 of 77 posts

Re: Ask HN: Do you struggle to sleep after coding all day?

#12
Sleeping takes practice like any other skill. If your bedtime is erratic, if your sleep pattern is erratic, if your environment is erratic, your brain isn't sure when it's time to go to bed.

Pick a time for a week and go to bed then regardless of anything else. Try to limit light exposure for the hour before sleeping (no phones in bed) and see if that helps. The more consistent you can be, the more consistent your sleep will be.

Re: Ask HN: Do you struggle to sleep after coding all day?

#13
I often struggled to sleep, I would sometimes lie in bed from 2AM to 6AM, only to fall asleep after sunrise, get a couple hours and then limp into work around 10.

Now I just take Melatonin in the evening ( http://www.gwern.net/Melatonin ) and sleep somewhat normally.

EDIT: I also use the flux app, and I reduced my coffee consumption significantly, now down to zero, but melatonin had the quickest and most observable effect.

Re: Ask HN: Do you struggle to sleep after coding all day?

#16

Sleeping takes practice like any other skill. If your bedtime is erratic, if your sleep pattern is erratic, if your environment is erratic, your brain isn't sure when it's time to go to bed. Pick a time for a week and go to bed then regardless of anything else. Try to limit light exposure for the hour before sleeping (no phones in bed) and see if that helps. The more consistent you can be, the more consistent your sl…

I hate the "no phones in bed" rule, and literally everything I do is PC-based or phone-based, so I stare at one screen or another right until I sleep. The f.lux and Twilight (Android) apps have been very helpful at making me feel more naturally tired when I should be.

Additionally, the Sleep as Android app makes for a great way to track and log sleeping patterns, and has a nice adaptive alarm.

Re: Ask HN: Do you struggle to sleep after coding all day?

#17
When I find my mind won't settle down, I'll do 1 of 2 things. If I'm concerned about a list of actions I need to do the next day, I'll write down the list on paper. This allows me to relax and know I won't forget anything. Otherwise, I'll write in my journal about what ever my thoughts are. This allows me to slow my brain down the my writing speed. It lets me process my thoughts. Its helped immensely.

Re: Ask HN: Do you struggle to sleep after coding all day?

#18

Sleeping takes practice like any other skill. If your bedtime is erratic, if your sleep pattern is erratic, if your environment is erratic, your brain isn't sure when it's time to go to bed. Pick a time for a week and go to bed then regardless of anything else. Try to limit light exposure for the hour before sleeping (no phones in bed) and see if that helps. The more consistent you can be, the more consistent your sl…

I hate the "no phones in bed" rule, and literally everything I do is PC-based or phone-based, so I stare at one screen or another right until I sleep. The f.lux and Twilight (Android) apps have been very helpful at making me feel more naturally tired when I should be. Additionally, the Sleep as Android app makes for a great way to track and log sleeping patterns, and has a nice adaptive alarm.

I have found that f.lux is not enough. Better than nothing, but not nearly as good as avoiding screens.

Re: Ask HN: Do you struggle to sleep after coding all day?

#20
Last night for me was particularly tough. Coded essentially all day, struggled with a bug for hours, and was still on a caffeine high past midnight. The game plan for me should just be to wake up even earlier and wear myself out through more exercise.
Post reply on HN