View Poll Results: Do you dream in code?

Voters
11. You may not vote on this poll
  • FALSE -- this never happens to me

    5 45.45%
  • FALSE -- it's not code, you just think that it is

    4 36.36%
  • TRUE -- and very irritating

    2 18.18%
  • TRUE -- hilarious and/or inspiring

    4 36.36%
  • TRUE -- but seek help ASAP

    2 18.18%
Multiple Choice Poll.

Thread: Dreaming in Code?

  1. #1
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300

    Dreaming in Code?

    I haven't decided myself how I feel about this. I cannot say it never happens, but on the other hand I'll admit it is probably not really code, it more like me conceptualizing and forgetting I am asleep. The more bizarre episodes occur I think in late deep sleep and I wake up from them but they are irrational, so not really true code. Other times I have gotten straight up, turned on the nearby computer and felt pretty happy about it, with little difference between dream and reality.

    On the other hand I wonder if there isn't some nice prescription medication someone might be aware of that could just eliminate this, as I am not sure if it is really a productive experience.
    Last edited by MK27; 06-07-2010 at 06:13 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  2. #2
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    Can it be that you are not actually dreaming but code is the first thing you think about?

    I don't think that they have a medicine for passion.

  3. #3
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    I've never dreamt code before, but I have spontaneously thought in code. A couple of times, structs and macros (even a function once, that I now forget) just popped in my head (it always looked more like pseudocode than C though) while trying to figure completely unrelated things out. It's kinda' cool, I think, it's never happened enough to annoy me.

    The one I get the biggest kick of, is, once a Trinitarian was trying to explain to me how the Trinity works, when boom, I get
    Code:
    struct God
    {
       Father;
       Son;
       Holy Ghost;
    };

  4. #4
    Programming Ninja In-T...
    Join Date
    May 2009
    Posts
    827
    Quote Originally Posted by Yarin View Post
    I've never dreamt code before, but I have spontaneously thought in code. A couple of times, structs and macros (even a function once, that I now forget) just popped in my head (it always looked more like pseudocode than C though) while trying to figure completely unrelated things out. It's kinda' cool, I think, it's never happened enough to annoy me.

    The one I get the biggest kick of, is, once a Trinitarian was trying to explain to me how the Trinity works, when boom, I get
    Code:
    struct God
    {
       Father;
       Son;
       Holy Ghost;
    };
    Good one...
    I totally agree with that. Its a good representation of God in code. Of course, I don't really think there is any known datatype suitable to represent God. That would imply that you know everything about God, and that can't be done.

  5. #5
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    Wouldn't that have to be a union, rather than a struct?

  6. #6
    Programming Ninja In-T...
    Join Date
    May 2009
    Posts
    827
    Quote Originally Posted by rags_to_riches View Post
    Wouldn't that have to be a union, rather than a struct?
    Hahaha, yeah that's true too. I guess union would be more accurate than struct.

  7. #7
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    The gods must be crazy.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  8. #8
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Quote Originally Posted by rags_to_riches View Post
    Wouldn't that have to be a union, rather than a struct?
    Yes. Which leaves us to conclude that Yarin is an awful programmer or he wasn't listening to that Trinitarian. Or his brain is just still sane enough and didn't bother with the details.

    Haven't dreamed of code, but occasionally "dreamed" about algorithms. Though it was like half dreaming, half being awake.

    The weirdest thing I have when sleeping that I completely confuse reality with imagination. I am a very light sleeper so I wake up all the time. So when I wake up I have in my head "oh, it was just a dream". But eventually, because of that thought, I dream that I dream and wake then up (even though I am sleeping). So the waking up part of my dream is registered in my brain as real. So when I finally wake up for real, I have categorized dreams as real and imaginary. I have to sit and get the facts straight like "oh, that cannot have been real" in order to distinguish between reality and "real dreams".

  9. #9
    In my head happyclown's Avatar
    Join Date
    Dec 2008
    Location
    In my head
    Posts
    391
    The funny thing is, there are 8 replies, and noone has voted.
    OS: Linux Mint 13(Maya) LTS 64 bit.

  10. #10
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    Nice poll, especially the possibility to vote for more than one option at the same time.
    I've voted once for every option. My answer makes about as much sense as the question :P.

  11. #11
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    This one time I remember dreaming in code, I was slightly feverish and getting those deeply annoying dreams when you are half awake and images or scenes just get repeated in your head, even though you try to fight it. Bad.

    The rest of the time, not that I can recall. I dream of many things. Just not code.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  12. #12
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    Quote Originally Posted by rags_to_riches View Post
    Wouldn't that have to be a union, rather than a struct?
    Glad I'm not the only one who thought that.

  13. #13
    Registered User jdragyn's Avatar
    Join Date
    Sep 2009
    Posts
    96
    Quote Originally Posted by rags_to_riches View Post
    Wouldn't that have to be a union, rather than a struct?
    Depending on one's belief:
    Code:
    union God
    {
        void Father;
        void Son;
        void Holy_Spirit;
    };
    I remember while I was in college I had a dream where the results of my code (specifically a bug - a flaw in my logic) caused a disaster that killed a bunch of people, including me. I had a few variations of the dream over the course of my college life... perhaps a contributing factor to my current non-programming occupation?
    C+/- programmer extraordinaire

  14. #14
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    I do not literally see or write code in my dreams but I think about certain kinds of programming problems. Only when it's something new I'm trying to pick up. It's very disturbing because my mind loops over and over through the same thing, and even waking up isn't enough to stop it. I have to physically get out of bed, walk around and do something to reset my brain before I can sleep properly.

    I am convinced, though, that my brain does accomplish useful things while I sleep, at an unconscious level. Not directly as dreams, but in the mornings I'll sometimes sit down to pick up a difficult problem from yesterday and the solution just pops out like I already knew it.

    EDIT: I think it's because you're learning C++, MK. Vast new world for the brain to reel on.
    Last edited by brewbuck; 06-08-2010 at 11:20 PM.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  15. #15
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by brewbuck View Post
    EDIT: I think it's because you're learning C++, MK. Vast new world for the brain to reel on.
    It tends to involve whatever I was doing the day before, or the past few days -- which the more days in a row I work on something in particular, the more clearly the dreams become focussed on some aspect of that. They are not really in proper code, but unlike other dreams that may involve recent memories, they are completely abstract, there is no physical world in which they take place. It's like I'm dreaming about contemplating, altho there's often a sense of adding/changing text Ie, I'm clearly programming.

    Usually the content is non-sensical, obeying a "dream logic" -- after I wake up I'll realize what I was "contemplating" makes little or no sense. Sometimes after that I'll hit snooze (figuratively, I rarely use an alarm) while thinking about what I am supposed to do today, and that seems to be a potentially productive point from which I get up with real ideas. I do lose consciousness during that time tho.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extended ASCII Characters in an RTF Control
    By JustMax in forum C Programming
    Replies: 18
    Last Post: 04-03-2009, 08:20 PM
  2. Enforcing Machine Code Restrictions?
    By SMurf in forum Tech Board
    Replies: 21
    Last Post: 03-30-2009, 07:34 AM
  3. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. Replies: 0
    Last Post: 02-21-2002, 06:05 PM