views:

708

answers:

13

There have been a few posts around the place as to what is the best music for coding, etc. While music can certainly make coding more enjoyable, I don't believe it actually makes me more productive and in fact probably distracts me more as I want to mess around with iTunes playlists, ratings and find good music to listen to.

I find that the best way to increase my code output is to get my brain active. Moderate exercise say at least a good run once per week keeps my brain "refreshed" and when i need to code hard core I find that Red Bull helps a LOT.

Coke is a second and Coffee is third in line with how effective I am when programming. Red Bull for me is like some magic crazy juice that unleashes my brain to do some super coding. I probably sound like a drug addict Artist who does his best work when on Cocaine or something, but it's oddly true. I have a friend who is the same, except his drug of choice is V.

The thing that isn't good about this is that I would imagine that drinking Red Bull all the time is not good for my health, since it's loaded with caffeine, sugar and food acid so I try to drink it only when I absolutely must, which is around the time when projects are due.

So what healthy alternatives do you use in order to increase your coding output and stimulate your brain activity?

+3  A: 

I usually just sit back and stretch for a minute or so, or get up and take a short walk. Just something to clear the mind ... sort of a brain "reboot".

I've also taken a few minutes just go to out and surf on the web for something that interested me at the time. Poking around wikipedia and reading about anything that strikes me.

Scott Vercuski
+3  A: 

Daily swimming and yoga for me.

The most important thing for me is getting into a flow and minimizing interruptions.

duffymo
+1  A: 

When I still smoked, a quick cigarette always cleared my mind. After I've quit, I still have the habit of going to the patio/outside and just wander around for a few minutes. I think the key lies in the change of environment.

Bartek Tatkowski
+3  A: 

Kinda related:
http://stackoverflow.com/questions/434464/what-do-you-do-to-take-breaks-from-programming/434539#434539

So I'll repeat my answer: I take a walk with my dog :)

Daniel
+11  A: 

Exercising my body seems to make my brain work better.

So cycling to work. Or going for a swim before work. Or both! All effective.

Also NOT having stayed up till 2am with a PS3/Xbox tends to help me stay awake at work.

Yes that's an admission :)

Iain M Norman
+6  A: 

Stay fit and exercise, and get enough sleep.

Chad Okere
+4  A: 

Take a short walk!!!

Dhana
Or go up/down a couple flights of stairs. Anything to get the blood pumping and increase blood flow to the brain.
Ryan Graham
I would have thought running up and down the stairs would increase blood flow to the legs and reduced blood flow to the brain.
andynormancx
+7  A: 

Turn off email alerts. It may be neutral to your health, but it will increase your productivity.

Bill the Lizard
+6  A: 

Number one is most definatly:

DRINK PLENTY OF WATER

I literally live be this, and it makes a massive difference!

Adam Naylor
Thanks, that's a great answer. I used to do this and forgot over time. I'll be getting back to drinking lots of water asap! :)
Brock Woolf
+1  A: 

In order of effectiveness:

  1. Getting enough sleep the night before
  2. Not drinking significant amounts of alcohol the evening before (i.e., more than a pint, less than a riotous hangover inducing frenzy)
  3. Not being hungry or thirsty.
  4. Not feeling guilty about web surfing for an hour whilst you were mulling the problem over in your head, all that subconscious decision making malarky, etc.
  5. Getting away from the computer if you've got a mental/work blockage

Now I know that healthy fit people are meant to be more effective thinkers, so I am certain that a minimum level of exercise will help a lot (at least 30 minutes brisk walking a day, and eating healthily). Swimming, running, cycling to work, too.

Coffee I find counter-productive in the long run, although that doesn't stop me drinking it. However if you find yourself lurching from coffee to red bull to coke all day long, I think you've actually become addicted to caffeine and any concept that you are working better because of it is probably in your head. Heresy, I'm sure!

JeeBee
I don't drink Caffeinated drinks all day long. Like I said above, mainly when projects are due because it makes by brain super, super clever. I have done some of my best coding while under the influence of caffeine :) Apart from that your comments are excellent. ta
Brock Woolf
It does increase the rate of work you do, that's for sure. Oddly enough coffee makes me sleepy sometimes, so it's counter-productive for me :)
JeeBee
Yes, Coffee can do that. I think it's because of the milk. You can feel sick if you drink too much coffee
Brock Woolf
+2  A: 

Avoiding opening SO helps increase my code output...

andynormancx
Also turning Twitter off helps!
Iain M Norman
A: 

Work in a quiet setting if possible.

I worked on a contract for two months where I had my own "office" (when I say office, I mean a small room with a door, desk and computer). When I compare my productivity at that place to the other places I have worked in an open setting, the difference is remarkable.

I also like to take a short 2-5min stretch break every 30-45 minutes. There have been studies that show that people's focus starts to drain after about 40 minutes of working on a task.

Then every two hours or so I take a 15 minute walk. So if I start work at 8:30, I will generally go for a walk at 10:30, eat lunch and walk around 12:30 and then have another walk around 2:30-3.

Matt McCormick
+1  A: 

Music @ work & Work out seems to the trick for me...oooh yeah and most of the times stay of the junk food...

rupert0