Usually I have the craving, MUST CODE NOW. Bad habit.
The longest I have gone without sleeping is 4 nights, 5 days, but I did not have a computer (or a home) at the time...I've done 3 nights a bunch of times and IMO, by day 3 or 4 the world starts to take on certain dream like qualities -- it does not seem like the normal real world anymore (which if you enjoy dreaming, that's kind of neat). Recommended.
Holy crap - where was that? Military?
So, no doubt under certain severe conditions that's happened to people at war. I shudder to think about the "dream-like" qualities there.
* I'm over all that now, just to be clear, but feel no shame.
Almost everything I come across to reminds me of something programming oriented. For example, someone on MSN yesterday called me mr T, and the first thing that came into my mind was "template <class T>".
I wake up and think about programming for about a minute. One time I solved a particularly nasty bug that made me feel like a genius. Another time I got an idea to speed up an algorithm of mine.
I use adjectives like "sexy" to describe code, and I treat my own code as if it's a work of art.
I keep dreaming about the things I'll code in the future when I'll be a more advanced programmer.
Speaking of which, I must learn something new every day. If I don't, I feel the day has gone to waste.
When I'm working on something I haven't done before, and I spend a lot of time on it in a single day, I'll usually wake up during the middle of the night in a half-dream state with my brain looping over and over on some silly aspect of the problem.
It's really annoying, and it doesn't stop unless I actually get out of bed and walk around the house a little bit. It usually takes about 30 minutes before my sleepy brain realizes what's happening (stuck in an infinite loop), so I lie there and suffer for a while.
I had that when I started but doesn't it go over with experience? A bug-fix may occur to you any time but you just don't have to get out of bed to try it out...
Thing like that don';t go away. I have the same thing, the only thing that makes it stop is to actually fix whatever I'm fixated on, even if its nonsense, the mere act of coding that nonsense lets my mind move on to other things.
Either that or just start ranting and raving at the neighbors cat, while its still next door.
I don't dream about code in general, just when I'm working on a type of problem I haven't seen before. And when I get out of bed I don't go write code... I just need to walk around a bit, drink some water, clear my head and go back to sleep.
My brain obviously churns away on problems even when I'm not consciously thinking about them. If I spend an entire day working on something and get nowhere, I feel fine with just stopping for the day and thinking about something else. 9 times out of 10, the next morning the answer will pop into my head.
EDIT: By the way, this doesn't just happen with code. When I started out brewing beer, I'd get stuck in similar kinds of loops. Same thing when I was teaching myself how to cultivate fungus (no, not the trippy kind). Waking up in the middle of the night dreaming about hyphal aggregates is a weird thing.
Yes, that seems to be rather typical with anything you do.
I used to play chess a lot. Guess what my mind was going over before falling asleep...
Nowadays I sometimes try to think about code or design issues in bed but I just fall asleep. However, I don't think the brain is completely idling away during sleep. It may well be doing some problem solving - perhaps free from the awaking pre-conceptions that just don't let you see things in a different light, so you may indeed come up with completely new and fresh solutions when you wake up (or perhaps you are just rested).
I like programming. Every day I try to solve at least one problem. Maybe another one. I don't really like debugging, especially those cased by pointers (anyone not sharing the same thought?). And if I'm bored, I imagine some new things I could add. It can't be any simpler.