Ask HN: Do you struggle to sleep after coding all day?
61–70 of 77 posts
Re: Ask HN: Do you struggle to sleep after coding all day?
#62Re: Ask HN: Do you struggle to sleep after coding all day?
#63Are 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 ta…
Same here, unless I'm extremely tired then sleep comes minutes after staring at a bright screen. When do you exercise though? I find exercise before bed makes it easier for me to sleep but others I've spoken to seem to get too pumped up!
Re: Ask HN: Do you struggle to sleep after coding all day?
#64I'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?
#65Doctor says I don't get enough exercise.
Re: Ask HN: Do you struggle to sleep after coding all day?
#66Sleeping 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.
If you have trouble sleeping then it is a very good rule.
Re: Ask HN: Do you struggle to sleep after coding all day?
#67Re: Ask HN: Do you struggle to sleep after coding all day?
#68When 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.
Thinking about what I want to do the next day is a terrible idea for me.
Re: Ask HN: Do you struggle to sleep after coding all day?
#69When 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?
#701) your bed is for sleeping and sleeping only. Not all of us are lucky enough to have a separate room for work and sleeping but at the very least, don't even think of taking work to bed. Be it laptop, or phone, your bed is sacred. It is for relaxation only. Which is generally why using a phone before sleeping isn't a great idea. Our phones and our activity on it have become part of our daily routines. The whole idea of going to bed is to separate from the rest of the day.
2) exercise. Your body can only go so far. Exercising well ensures that come night, your mind will be telling you to just go the f* to sleep.
3) time block yourself. Do not operate with flexible time slots. Set a routine, and set the times. I've found that 1 hour focus time (turn off the internet if you have to) will see yourself getting more done than if you were to kind of free flow for 3 hours just because you have 3 hours available to yourself. Our brains our crap at sticking to something unless given very specific parameters to operate within, so set those boundaries. Ideally, your time slot should end 30 minutes before bed latest. It doesn't matter if you haven't finished the problem at that time, write a comment which has the set of steps you want to try out, and switch off. No buts. This practice will not only help your brain get trained to switch off, it'll also train yourself to focus better (I guarantee the latter)
4) if you find yourself mulling over what to do tomorrow, follow what others have said. Write your stuff down, and turn over. No googling. Nothing. Got something to google? Write that down too. Your brain will eventually recognise that it doesn't need to take on the overhead of tracking tasks. Or be like me. Forget about what you have to do and wait for someone to remind you :D :D (the latter is NOT for real. Don't try that at home or anywhere else :D )