Live data from Hacker News

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

news.ycombinator.com

31–40 of 77 posts

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

#33

I've tried melatonin, cutting out alcohol, f.lux, not looking at a screen for an hour before bed, but the one thing that has had the most influence on my sleep (for the better) is cutting out caffeine after 4pm. (relevant study: http://www.aasmnet.org/jcsm/ViewAbstract.aspx?pid=29198 )

All of the above + regular exercise.

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

#34
Are you working, or staring at a bright screen, right up to bedtime? That seems to make sleep harder for me.

A few things I've found that help me: - Exercise. I work out 8-12 hours/week. Being physically tired makes sleep easier. - Eat dinner >2 hours before bed and avoid late snacks. - No alcohol (I do have an occasional drink, but it always impacts my sleep) - No TV in bedroom. I either read for 30-60 minutes or talk to my wife until we doze off.

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

#35
I actually find that using my phone while in bed increases my tiredness. I'm not sure if it's related to when I was really young and I would read books before sleeping or not, but it's interesting since a majority of people say the opposite effect is more common.

Maybe try reading before sleeping- or something that can take your mind off the day's activities (that's probably what winds up happening with me).

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

#36
Is anyone else going to admit sex in public?

Err ... to proactively eliminate parsing errors:

Is anyone other than me going to suggest sex as a strategy on this public internet forum?

Unless your workplace is much more interesting than mine it is a change of pace from day to day work, I guess it counts as light exercise, its fun and stress reducing unless you're doin it wrong.

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

#37
Nowadays I've taken to creating a to-do list before setting out to code and I always make sure to add a couple of tasks that are somewhat simple and I'm sure I can usually complete before bedtime. That way, even when I haven't run through the entire list, I feel like I've gotten something done and the day has not been completely useless. It usually takes some of the edge off any worries I have.

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

#40

I've tried melatonin, cutting out alcohol, f.lux, not looking at a screen for an hour before bed, but the one thing that has had the most influence on my sleep (for the better) is cutting out caffeine after 4pm. (relevant study: http://www.aasmnet.org/jcsm/ViewAbstract.aspx?pid=29198 )

melatonin supplements only go so far. f.lux is indeed awesome. 4pm seems a bit late for me but he has a good point. Also exercise helps a lot ! unfortunately, it also requires the most effort.
Post reply on HN