Skip to main content
gamedev.net
🔒 Locked

Sleep?

Started by ProPuke 17 replies 1.9k views
Original Post
ProPuke
ProPuke
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
Oluseyi
Oluseyi
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]
S1CA
S1CA
: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
Evil Steve
Evil Steve
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...
capn_midnight
capn_midnight
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.
daerid
daerid
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
kaysik
kaysik
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 ^_^
retard
retard
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]
antareus
antareus
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
ProPuke
ProPuke
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
antareus
antareus
You have to get yourself on a schedule. Just try going to bed 15-30 min earlier a night until you are where you want to be. You cannot recover from a lack of sleep in just one night usually.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
capn_midnight
capn_midnight
Force yourself to go to bed at the same time every night, like 10pm. DO NOT get up until you wake up the next morning. If, after a week or so you still have a problem, go see a doctor, you probably have insomnia, in which case no amount of behavioral modification will work, you'll need medication (insomnia is usually tied to mild clinical depression, and vice versa). Say hello to prozac!
capn_midnight
capn_midnight
Quote:
Original post by antareus
You have to get yourself on a schedule. Just try going to bed 15-30 min earlier a night until you are where you want to be. You cannot recover from a lack of sleep in just one night usually.

Actually, this is untrue. You CAN recover from lack of sleep in one night, unless you have had a life time of sleep problems (like my father, who has gotten up at 2am to go to work for the past 15 years).

Mild sleep deprivation (I would say upto 2 months) definitely can be recouped in one night. You just end up sleeping for a long time on that one night.
ilian
ilian
If im programming at work and getting some good stuff down, then I get up and drive directly home. I find myself running red lights, running stop signs, etc. Its kinda scary, but I am just comepletely still zoned into programming.

Or if Im at home I wont be able to sleep, or cook, or other things that require specific concentration.

I have found I need to do SOMETHING to relax my brain after I finish programming if I expect to be able to concentrate on somehting else. Now, before I go home, I chat with some co-workers, or browse the web, or play some videogames.
kaysik
kaysik
Quote:
Original post by antareus
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.


Are you kidding? Thats such an untrue myth (although if it takes you 5 hours then maybe, but thats more todo with being up for 5 extra hours than with getting off). The whole "sex drains your energy" myth was started by sports coaches who didn't want their players loosing interest ... getting laid is way more fun that kicking balls round fields! Its been disproven time and time again by study after study and so far most studies actually come up with positive results (ie. lower blood preasure, lower depression rates and other benifits). I'd google some of them to back up my point if I wasn't at work and worried about what porn links i'd get by accident ... my boss has a habbit of being round at exactly the wrong moment!

I can safly say after years of empirical testing that its totally untrue [grin]
DarkNebula
DarkNebula
When I'm trying to fall asleep I think of the days events like mixed in with programming and my brain somehow mixes them all together for a very weird and unsettling feeling. lol I think I think too much (see?) ;P
ProPuke
ProPuke
DarkNebula. Been there, gone further. I completely blanked out once. Everything just jumbled in my head lost sense of reality. It was really weird. That was during my school years. & school was really messing with me @ the time: stress & such. Those were pretty bad times for me.
Luckily I managed to pull myself out of it. My mother was having a go @ me for some reason @ the time & my mind kinda rejected life or something. It just stopped makign sense (sensory overload?) I tried mumbling but I couldn't decypher what was real & I collapsed. She kinda freaked & chucked a bucket of water over me & pulled me up. I came back a few moments later.
& no I don't do drugs. Some people don't need them
____ _ ___ ___ __ _`By offloading cognitive load to the computer, programmers are able to design more elegant systems' - Unununium OS regarding Python
antareus
antareus
kaysik, that was just my experience. I suspect I have a slightly dampened libido from zoloft anyway. I didn't know that was started by coaches, either.

I also can't stress enough how nice it is to go for an hour or so without so much a conscious thought. It usually occurs in the gym when I am doing cardio. I can just zone out to the world and run.

OP: I'd step back and re-evaluate your entire life to try and figure out what is wrong. I suspect you are trying to fix a symptom of what is wrong rather than the real problem. Are you unhappy? Or lonely? Just take some time to reflect and listen to yourself.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
Kosherdude
Kosherdude
I hardly ever get sleep... at least not the kind of sleep I need. I guess I never really get to the REM stage, and it makes sense; I keep my eyes glued to one position for too long, maybe.

On top of that, spending a lot of time on the computer has probably ruined my eyes. Another factor in the deterioration of my eyesight is my failure to recognize details. See, I have great peripheral vision, but I fail to see the small things. In fact, I can't even look at a pebble... really. I see the pebble and the huge area around it. But I can't just look at the pebble itself. My eyes can't focus on a small area. And because of this, I keep messing up in my programming. I'll miss something like a semicolon in a C++ program or a table ending tag on my web page, and then spend several months searching through the code before I find out what I missed.

As you can see, it's a vicious circle. It might also be another reason why I don't get any sleep. :p
Fox-Two!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.