I recently found out that programming late at night causes sleeping problems, so what are the best hours for 'after-job' programming? Maybe there is some time interval that should be set after finishing programming and going to bed, or some activity involved?
|
closed as not constructive by Jim G., gnat, Walter, Matthieu, Karl Bielefeldt Sep 11 '12 at 22:01
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.
I think the best time is in the early morning, at the day break, right after waking up and when your mind is fresh... It doesn't cause any sleeping problems either; it encourages sleeping early... Remember:
|
|||||||||||||
|
|
Listen to your body. It knows when you should take rest and when you should be coding. |
|||
|
|
|
For me, right before dinner. Hunger provides pressure and helps me code faster and more efficiently (think of it as a project milestone deadline). It also forces me to stop well before midnight so that it doesn't negatively impact my health. |
|||
|
|
|
I tend to find that programming late will keep me from sleeping. Anything that I find stimulating will tend to prevent my mind from winding down, I'll be laying in bed visualizing what I want to do with code or figuring out how things will work. I also find that if I push myself too long, my code needs revision the next morning. I find I need to put things down at least an hour before I intend to head to bed. I tend to watch reruns (M*A*S*H in particular) that I've seen a million times and won't try to stay up to finish :) That's me... hope you figure out what works for you. |
|||
|
|
|
Many years ago I was coding something and checked the watch. It was around 7pm and I thought "ok, two more lines and then eat dinner". After those two lines (?) it was 2am... Every now and then I find myself sleeping and thinking about code, what to do with, how to fix a bug or wake up in the morning and having/making plans for coding later on. IMHO, it's all related to how much you identify yourself - not literally - with your profession/hobby and how much you like it. If the above happens it means that you are doing something that you like. You don't need to force yourself to think about coding. It comes naturally. In general that's a good thing. To keep this in non-excessive limits I made some rules for myself:
You can also try to set up a daily routine that you do before going to bed to draw your brain's attention away from the code, like writing mails, reading newspapers, doing the dishes, separating laundry, going for a walk, go to supermarket (if it is open that late), call or talk to somebody, ... The time you need really depends on yourself. For some it takes a few minutes, some need an hour or more. In other words it's important to get your sleeping pattern right. If you can't come up with one, don't code for a week or two and set your focus onto something else. THEN - and only then - you can think about your productive hours. Why? Because then you have slept properly and wake up fresh in the morning. Otherwise you end up with relaxing from your more or less bad sleep and thus run into another daily time pattern of your organism. Usually your body tells you what's good and what's bad. If it conflicts with other people's habits, well, it's nobody's fault, it's just the way it is. We are all different after all :). Early bird vs. night owl. There's no right or wrong on this question. What works for others doesn't necessarily work for you. So whatever you read here can only be suggestions. |
|||
|
|
|
Any activity that promotes relaxation can be used to bridge from working to ready to sleep mode. I usually watch some TV, but whatever floats your boat. |
|||
|
|
|
I'm still somewhat struggling with this issue myself, but here are some of my findings:
Some possible causes (YMMV):
For me, lowering caffeine intake helped with sleeping when I planned, and eating regularly helped with waking up when I want (this later one had especially dramatic effect on me). I also experienced a "critical point" in exhaustion, meaning that if I stay up too late, my body will prevent me from sleeping for 2-3 additional hours. |
|||
|
|
The light from computer screens is typically very good at keeping you awake. For this reason, you should have a gap between computer use (of any kind) and trying to sleep, and you should be wary of staying up past your bedtime to "just do a little bit more". Otherwise, you may end up lying awake at night, unable to drop off. The duration should be reached by experimentation, as everyone is different, and the kinds of computer usage vary. You may find some success using f.lux to allow you to keep coding right up until bedtime. |
|||
|
|