13

Brain games? A special diet? Exercise? Staying drug free? Sex? Abstinence?

What's your secret?

26 accepted

Feeling Good!

The only time I can program is when I feel good enough to program. By not having enough sleep, skipping meals, or loading my body full of caffeine and junk food I reduce my ability to keep up with hectic schedules.

Our bodies were never intended for sitting around in front of a keyboard, so I try to exercise whenever I can. I also ensure that I fit healthy food somewhere into my day, as well as a few litres of water.

Other than feeling good, it is important to keep focused on the task at hand. If I've done well, then I'll reward myself by checking SO or going onto the BBC News and Sport pages.

14

I bike to work every morning (weather permitting, no biking in the snow). The exercise helps to wake me up, and keeps me in good health also.

Healthy body === healthy brain.

13

Proper amount of sleep.

... and mountain dew.

12

I've got one trick to get me back into workflow every morning. I just keep some easy task undone from the evening, so when I get back to work next day, I can do it real quick and get that nice feel of a winning. Works better than energy drinks anyway.

8

Exercise really helps, I feel much more alert for exercising at lunch time. But for some reason it still requires a lot of will power to actually do it!

7
  1. Lots of (or just enough) sleep.
  2. Quiet place to work.
  3. Energy Drinks (my favorites: Full Throttle & Bawls G33k B33r)
  4. (If possible) Something fun to work on (even if it's just a distraction to work on every once in a long while)
5

Coffee is acidic drink in nature and can cause metabolic disorder over long time of use along with other unhealthy nutrition choices.

Tea is a (much) better alternative, especially green and white teas (less acidic, about 1/4 of the caffeine), which have other good health benefits, including rich amounts of anti-oxidants.

Yes, caffeine has been linked with better concentration, although it can cause hyper-activity and other conditions. The affect of caffeine on individuals is obviously dependent on each person. Wikipedia has a good article on caffeine.

Try also some meditation techniques. I can say from my own personal experiences that certain music and sound clips sharpens the state of my mind. Check http://www.i-dose.us/ for those.

Nutrition (food and drink), proper rests and exercise in-between sessions and some memory exercises (puzzles for instance) help radically too.

4

Coffee keeps my brain in shape!

3

sleep, eat breakfast, coffee. Coffee. Lunch. Coffee.

3

No coffee, perhaps tea. Good sleep, big breakfast/lunch. Ambient music, no clock, no internet and other things that might push your break a few minutes more. Exercise, although I have been slacking at that one. Not too funny colleagues. Less meetings. A window, to gaze into the sky and tinker.

2

Proper amount of sleep, caffeine, and and not having a daughter that keeps you up all night...

2

Exercise, juggling, and sudoku.

1

Coding itself keeps your brain limber; that is, the very act of writing code on a daily basis is probably all you need to remain mentally on the ball.

1
  • Coffee
  • exercise
  • having an interesting problem to work on
  • judicious application of pastries
1

Coffee, cigarettes, and code.

I find that coffee and cigarettes have their own calming ritual. Wax on, wax off, and you've got a brief window of zen rivaling any Japanese tea ceremony or yoga contortion. A few minutes to allow your subconscious to spin gears. Making a pot of coffee, or taking a cigarette break, is an inherently constrained form of procrastination.

Then there is the code. You might take a while to get the mental hamsters spinning, but so long as you are coding, you are slipping into the proper mindframe. Before you know it, you are in flow.

1

TopCoder and Project Euler.

1

No freakin joke: Magic the Gathering.

Also helps: Hacker's Delight

And, of course, reading new questions on Stack Overflow

1

This is very related to how do you vent stress as a programmer.

For myself doing sports, eating healthy food and some brain teasers are the way to go.

1

I take supplements as well, especially if I'm feeling drained. Of particular use is DL-Phenylalanine (building block for the dopamine neurotransmitter) and Lecithin (building block for the Acetylcholine neurotransmitter). Also almonds and turkey are good (building blocks for Gaba neurotransmitter). Cottage cheese is also a good source of various neurotransmitter building blocks.

1

Adding to the other things already mentioned:

  • Fresh air at lunch time, just a quick brisk walk outside.
  • Some kind of creative physical work at home, fixing the house, building stuff. Zipping beer on a porch you've built yourself in summer time is the shit.
  • Playing an instrument or making music.
1
  1. Learning something new and really interesting every day ;)
  2. Trying to speak with customers and other people as often as possible - get away from the computer screen.
  3. Enough sleep.
  4. Coffee.
  5. Holidays.
1

I'm surprised no one mentioned my fave

Reading

1

When at work I tend to drink LOT of coffee. It keeps more more focused and it makes the work day go faster. On the work days I don't drink coffee it goes by unbearably slow and I have a harder time working and keeping focused.

1
  1. Lot's of sleep, I get 8 every night.
  2. Project Euler, good brain exercise.
  3. Gatorade, keeps me nice and hydrated.
  4. Lots and lots of fish.
  5. A good book and/or whatever is on RMPBS.
0

Although I havent been actively programming for a while. I remember yoga/meditation helped a lot. Sometimes you need to completely forget everything so your brain can reboot.

0

"Brain games?" -- yes, also known as programming. "A special diet?" -- yes, also known as caffeine. "Exercise?" -- yes, the commute. "Staying drug free?" -- nope, see my special diet, above. "Sex?" -- if followed by sufficient sleep then it's OK, hmm, why didn't I answer that in the exercise question. "Abstinence?" -- mu.

0

Project Euler. Try to finish, or at least make progress on, one problem a day.

0

A nice brisk cup of tea and some good techno, works wonders...

0

Exercise, good nutrition, and supplements.

alt text

GNC Fish Oil

0

The biggest thing is to make sure you don't overdo it. When you find yourself saying "let me try just ONE more thing to fix this bug," then you should probably at least take a break.

0
  1. Staying away from the screen during my lunch hour
  2. nice cup of tea
  3. getting enough sleep
  4. music. if it wasnt for the fact that I listen to music at work I think I'd go mad.
  5. the previous point goes with a good (quiet) working environment.
  6. healthy diet, as previously mentioned.
0

I find getting up early and walking into work is a superb way to wake up and get my brain into gear. Quite often I find that solutions to programming problems just pop into my head while walking. I also listen to technical podcasts and old BBC comedies as I walk.

Sadly this morning I overlaid and had to catch public transport to get in on time. As a result I feel half asleep and am finding it very difficult to do anything.

0

I listen to development related podcasts, and read books to keep myself professionaly up-to-date.

0

A pack of Camel or Malboro and caffeine

...its a shame nowadays the law prohibits you from smoking indoors

I don't wanna sound like bad conscience, but cigarettes sure help me keep my cool and focused at the task at hand.

oh yea, and sex helps as well ;-)

0

1.lots of excercise 2.sleep 3.healthy diet nuts are always good 4.LOTS OF WATER 5.meditation 6.memory excercises 7.reading 8.listen to music

You might not be able to do all of these things in 1 day but try to do as much as possible !!!

0

Yeah you just got to keep healthy. Here is some of what I do.

  • Drink lots of water or my favorite, Arizona Tea.
  • Exercise at least twice a week.
  • Read the Bible
  • Read some books just for fun.
  • Have a community outside of work.
0

Proper diet- I'm on South Beach. Exercise - I bicycle at least 125 miles a week.
Sleep - If I don't get enough sleep, I'm a zombie.

0
  1. Workout
  2. Coffee
  3. Read stack overflow
0

My friend i keep my brain sharp for daily programming by giving complete rest to my brain and body when in work.