Programming and State of mind.

This is a discussion on Programming and State of mind. within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Originally Posted by ulillillia What I usually do is I plan out everything to a fine level of detail. I ...

  1. #16
    Registered User
    Join Date
    Oct 2008
    Posts
    75
    Quote Originally Posted by ulillillia View Post
    What I usually do is I plan out everything to a fine level of detail. I then go over my plans looking for potential problems and fixing them. Once done, I begin the programming, if relevant. I use a stage system, sort of like a video game, where I split functions into stages, describing the basic routine that should be followed, the write the function following this, starting with the basics then adding the extra complexity needed for the full effect one bit at a time. This way, I avoid the headaches though I still run into occasional problems.
    I must also do that.
    Usually I have the craving, MUST CODE NOW. Bad habit.

  2. #17
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Yarin View Post
    Seriously though, it is kind of nice to know that I'm not the only one who exhibits 'obsessed' behavior over code at times.
    Definitely. My inner monkey tells me it would be much more difficult to maintain a satisfactory level of concentration if you were not like this.

    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.
    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

  3. #18
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Holy crap - where was that? Military?

  4. #19
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by sean View Post
    Holy crap - where was that? Military?
    No, "on the street"; I think they can do similar things in the military, for whatever reason, and using the exact same chemicals*. Basically you acclimatize yourself to regularly staying "up" for 36-48 hours, and if you don't stop, it slowly gets easier and the duration increases. I didn't force myself, but if I had a place to crash I'm sure I would have. I usually didn't intend to, either -- the first time, the 4th night was an outdoor rave, and I remember thinking repeatedly, "HOLY! I CANNOT BELIEVE I have not slept since last week!"

    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.
    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

  5. #20
    Always learning
    Join Date
    Apr 2009
    Posts
    25
    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.

  6. #21
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,272
    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.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  7. #22
    The larch
    Join Date
    May 2006
    Posts
    3,573
    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...
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  8. #23
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    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.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  9. #24
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,272
    Quote Originally Posted by anon View Post
    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...
    It does go away with experience, at least for me. Kind of like dreaming about your job when you've just started as a new employee -- after the first few weeks, that seems to stop.

    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.
    Last edited by brewbuck; 04-16-2009 at 03:50 PM.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  10. #25
    The larch
    Join Date
    May 2006
    Posts
    3,573
    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).
    Last edited by anon; 04-16-2009 at 04:22 PM.
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  11. #26
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,272
    Quote Originally Posted by anon View Post
    However, I don't think the brain is completely idling away during sleep. It may well be doing some problem solving
    I'm absolutely convinced that this is the case.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  12. #27
    Making mistakes
    Join Date
    Dec 2008
    Posts
    476
    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.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why C Matters
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 136
    Last Post: 01-16-2008, 09:09 AM
  2. Serial port programming in Linux
    By g4j31a5 in forum Linux Programming
    Replies: 20
    Last Post: 11-06-2006, 10:44 PM
  3. current state of game programming
    By Laserve in forum Game Programming
    Replies: 1
    Last Post: 04-28-2005, 06:12 AM
  4. Replies: 0
    Last Post: 07-22-2003, 12:29 PM
  5. Independent & Effeciency :: Programming Concepts
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 06-08-2002, 06:08 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21