PDA

View Full Version : Programming and State of mind.



jordanguyoflove
04-01-2009, 10:14 AM
Is it only me or when writing programs you are highly susceptible of going absolutley nuts?

Because if it's only me then I must change how I program.

Thanks.

matsp
04-01-2009, 10:17 AM
It can be quite frustrating when things aren't working. You have to be very persistant and quite a pedant/detail oriented person to be a good programmer.

--
Mats

jordanguyoflove
04-01-2009, 10:25 AM
It can be quite frustrating when things aren't working. You have to be very persistant and quite a pedant/detail oriented person to be a good programmer.

--
Mats

I must be more detail oriented then.

Thanks

laserlight
04-01-2009, 10:38 AM
You also have to be good at ignoring the details that are just distractions in a given context, i.e., you need to be good at creating and using abstractions.

CornedBee
04-01-2009, 01:15 PM
And if you're not careful, you begin speculating about the implementation of the real world just after waking up.


... yes, that has happened to me.

sean
04-01-2009, 01:33 PM
you begin speculating about the implementation of the real world just after waking up.

The other morning I woke up, said good morning to my wife, and thought, "wait... don't I need parentheses after saying hello?"

BuzzBuzz
04-01-2009, 01:53 PM
The other morning I woke up, said good morning to my wife, and thought, "wait... don't I need parentheses after saying hello?"

Depends whether it was a variable or a literal string, so you need to ask yourself - what did you actually mean when you said hello.

Shakti
04-01-2009, 02:17 PM
Im very often like a square wave when i program...."damnit why isnt this working....damnit damnit damnit damnit" then after a while (pointing in random directions in the air or at the screen where the offending code is is usually involved during this time) I usually figure out how to solve it and thus get very happy and start coding like a madman. Then just repeat said process and you have me programming pretty much.

A friend of mine says its very entertaining to watch me program.

ulillillia
04-01-2009, 03:40 PM
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.

happyclown
04-02-2009, 09:09 PM
When I started programming, I found myself starting to do the oddest things. :D

1. Thinking about a problem 16/7.

2. Trying to debug a program in my head while I am lying in bed, waiting to fall asleep. This does not help in trying to fall asleep.

3. Waking up at 2am or some other ungodly hour, turning on the computer, modifying some code, then trying to debug it. An hour or 2 later(time really flies when you're debugging), turn off the computer and getting back to bed.

4. Try to program 30 seconds after waking up. But my mind is still in bed, so everything is a challenge.

5. Trying to cram my head full of programming related stuff that are way beyond my current capabilities, and that I will probably never ever need to use.

I could go on and on, but you already get the point. ;)

ulillillia
04-02-2009, 11:13 PM
5. Trying to cram my head full of programming related stuff that are way beyond my current capabilities, and that I will probably never ever need to use.

Ah, the classic case of what I call "the law of rapid ability-learning". "One gains experience the fastest and easiest by doing things at their own level". It's a principal I've used for a while. My main weakness with programming right now is pointers. I also get a few of those items you've mentioned, but even if I haven't done any programming in a long while (mostly with planning, figuring out how to resolve an obstacle or trouble spot I encountered).

abachler
04-03-2009, 01:42 AM
Is it only me or when writing programs you are highly susceptible of going absolutley nuts?

Because if it's only me then I must change how I program.

Thanks.

After awhile you stop going nuts and just stay that way, it's more efficient. Once i get 'in the zone' as they say, I'm a machine. I think like a machine, I work like a machine, 16, 24, 36, 48 and sometimes even 72 hours straight without drugs or sleep. I'm bipolar you see, so when these little brainstorms hit, I can get years of work done in a few days. The down side is when they end it can be weeks or months of soul crushing insanity with little or no productivity before another one hits. I once told my psychiatrist its a blessing and a curse. I wouldnt wish it on my worst enemy, but I wouldnt give it up for anything in the world. I find self-flagellation helps sometimes.

Yarin
04-07-2009, 08:42 AM
Programmers are messed up people, with messed up problems. :rolleyes:

Great, I fit right in. :D

Seriously though, it is kind of nice to know that I'm not the only one who exhibits 'obsessed' behavior over code at times.

jordanguyoflove
04-16-2009, 04:01 AM
Hahaha


One gains experience the fastest and easiest by doing things at their own level". It's a principal I've used for a while.

I thought about the same thing the other day.
MUST NOT look at very tempting out of your league stuff.
BAD, mmkay.

jordanguyoflove
04-16-2009, 04:02 AM
After awhile you stop going nuts and just stay that way, it's more efficient. Once i get 'in the zone' as they say, I'm a machine. I think like a machine, I work like a machine, 16, 24, 36, 48 and sometimes even 72 hours straight without drugs or sleep. I'm bipolar you see, so when these little brainstorms hit, I can get years of work done in a few days. The down side is when they end it can be weeks or months of soul crushing insanity with little or no productivity before another one hits. I once told my psychiatrist its a blessing and a curse. I wouldnt wish it on my worst enemy, but I wouldnt give it up for anything in the world. I find self-flagellation helps sometimes.

I heard about that, but 72 hours is just out of my reality.
I can't even go 24 hours without sleeping unless I am on something.

jordanguyoflove
04-16-2009, 04:05 AM
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.

MK27
04-16-2009, 08:39 AM
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.

sean
04-16-2009, 08:50 AM
Holy crap - where was that? Military?

MK27
04-16-2009, 09:02 AM
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.

Mr.Pointer
04-16-2009, 09:07 AM
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.

brewbuck
04-16-2009, 10:50 AM
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.

anon
04-16-2009, 02:40 PM
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...

abachler
04-16-2009, 02:45 PM
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.

brewbuck
04-16-2009, 02:47 PM
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.

anon
04-16-2009, 03:14 PM
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).

brewbuck
04-16-2009, 03:35 PM
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.

Brafil
04-18-2009, 10:41 AM
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.