Sleep?

Started by
17 comments, last by Kosherdude 19 years, 5 months ago
Okay I will admit that I am real tired @ time of writing this. Too many late nights, or not-sleep methods to kick my sleep pattern back into something more reasonable have been tried. Once again I'm tired but I don't want to sleep. This is my first post & also seems to be my first deluded moan but erm.. it's not. Does anybody else that codes find it hard to slow down your mind @ night & actually get some sleep? My brain doesnt seem to wake up till after 11, & time seems to pass very quickly during the early hours of the day. Hmm maybe I should just sleep all day; But somehow I just think I'd still end up pushing my sleep cycle round & ending up just as tired. A programming related post (no really it is) (somebody sedate me)
_______________________________ ________ _____ ___ __ _`By offloading cognitive load to the computer, programmers are able to design more elegant systems' - Unununium OS regarding Python
Advertisement
I have an offset circadian rhythm. I am predisposed toward staying up late and waking up late, too. Consequently, all my classes start at 11:45 AM or later. That said, I am able to make adjustments for responsibility. If I have to be at work at 7 AM, then I'll be up at 5 AM and therefore go to bed earlier.

If you can't go to sleep, take a walk. Do some push-ups. Do something that is slightly active to help tire yourself out. Alternatively, try the following relaxation exercise:
  1. Lie flat on your back, your arms at your side. Close your eyes.

  2. Breathe in deeply, then try to relax your limbs as you exhale.

  3. Repeat the previous step as many times as necessary.

  4. Wake up the next morning. [smile]
:o) <looks at clock> me too.

For temporary relief, Nytol (available from most UK pharmacies) works pretty well to get your patterns back to normal (if you also make an effort yourself in addition!) - but if you haven't sorted out your sleep patterns after you've finished a pack of that, a trip to your GP may be in order.


General tips I've picked up over the years - with varied success:

1) As Oluseyi says, light excercise and then relaxation helps if started 20 minutes before.

2) No tea, coffee, etc after 8:30pm.

3) Eat regular meals at regular times. No food after 8pm.

4) A friend's wife found reducing intake of milk and other lactose based things helped significantly.

5) More excercise - my sleep is much better when I go to the gym that day.

6) If, after an hour of trying to get to sleep you can't drift off, get up, go to another room and sit in silence for half an hour trying relaxation techniques - then go back to bed.

7) Avoid all mental "input" for at least 30 minutes before you go to bed - no reading (even fiction), no TV, no music, etc - at most, just think vaguely about tomorrow and don't try and solve any problems or dwell on them.

8) When trying to drift off, think to yourself about doing the exact opposite, staying awake, "I'm not going to sleep, I'm going to stay here and stay awake all night". Always works for my girlfriend, and has sometimes for me!

9) One day when you have had a good sleep, get as much non-computer stuff done in the day as possible (shopping, work, gym, anything you've been putting off for a while).

10) Sometimes, if you've been slipping into a vicious circle where you're only getting out of bed at like 2pm, as a one off, keeping yourself awake (WITHOUT stimulants) all the way through one night and not doing ANY computer/technical related stuff and then going to bed at a "normal" time and doing all of the above stuff can work.

Good luck, I'm off to bed now! [smile]

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Quote:Original post by S1CA
10) Sometimes, if you've been slipping into a vicious circle where you're only getting out of bed at like 2pm, as a one off, keeping yourself awake (WITHOUT stimulants) all the way through one night and not doing ANY computer/technical related stuff and then going to bed at a "normal" time and doing all of the above stuff can work.
Seconded. I can never concentrate on any programming or anything the following day anyway. But if you're up all day and goto bed/sleep (You'll be dead as soon as you lie down) at 8pm or something, you'll probably wake up at a reasonable time the following day.
Which reminds me, I need to do that. I've been up till 5am, sleeping till 2pm lately...

And now I'm going to watch Futurama. At 3am. My parents will love me for this...
Yes, if you are active directly before going to sleep (either physically or mentally) you WILL have more difficulty sleeping. This is one of the major reasons that 2/3rds of Americans have a sleep disorder of some type (usually chronic fatigue coupled with insomnia). Too much TV.

You need to exercise better discipline, and MAKE time for sleep. Missing too much sleep lowers your life expectency, so get the sleep.

How much sleep do you need? "6-8 hours". Actually, it depends. I know people that are perfectly fine after 4 or 5 hours of sleep at night. Personally, I need closer to 9 or 10. "Early to bed, early to rise, makes a man healthy, wealthy, and wise".

Unwinding before going to bed is very important. First, you need to get off the computer. Some people like to read a book before bed, personally I always found a good story compelled me to stay awake longer.

If only I would take my own advice.

[Formerly "capn_midnight". See some of my projects. Find me on twitter tumblr G+ Github.]

You know what I've found actually works really, really well is to do pretty much what Oluseyi said, but while doing that, think think the following phrase: "I am asleep".

It sounds corny, I know. But it puts me to sleep before I even know it.
daerid@gmail.com
yay for being an insomiac code monkey!

exercise did the trick for me when i was at uni/holidays - i just used to run round the oval near my house till i was nearly dead then that night i'd sleep great. Once I got a job though and had something todo all day though I found I didn't need the excercise to make me sleep it just happened. Having a set routine makes it easier, if you have to getup at 8am every morning and work for 9 hours then sleep is the best part of your day ^_^
You could put sleep(32400000) into your code and do a test run. I'm sure you'll fall asleep waiting for it to finish...

.. or you could always do the five finger shuffle. [totally]
Don't program before bed. If you are the kind of person who likes programming a lot then you're probably thinking 24/7. You need to train yourself to not do this. It isn't normal.

That said, lay off the caffine entirely if you can, or ease it off - I limit myself to one a day. Drink lots of water and try to exercise somehow. If you can get to bed on your early night circadian rhythm then try to take it - for me it can be around 9:30pm sometimes. My next one doesn't seem to come around until about 11 or 11:30 unfortunately.

Quote:.. or you could always do the five finger shuffle.

If this is what I think it is, I'd be careful, cause you can wake up feeling zapped the next day. Also you don't want to be dependent on this to fall asleep.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
Hey guys thanx a bundle ;]
I have tried the stay-awake-&-then-goto-bed-@-like-8 method, but my body refused to get up in the morning. I didnt gain consciousness till late in the afternoon.
No, I don't drink coffee or any kind of stimulants.
Brain ticks 24/7 code code code...
Well knowing what to do is one thing (thanx for all the advise), now I've got to apply it. Anybody know any willpower inducing drugs? ;]

But for now - Lots of loud music & more coooode
_______________________________ ________ _____ ___ __ _`By offloading cognitive load to the computer, programmers are able to design more elegant systems' - Unununium OS regarding Python

This topic is closed to new replies.

Advertisement