Wednesday, April 19, 2006

Creativity in Programming

Programming is a very creative art, no matter how technical it seems on the outset. Programming is pure-thought stuff. It's the closest thing to transcribing the contents of your mind. Learning how to be an innovator is all about being creative. So the question is, "how can we be creative?" While I don’t have the silver-bullet answer to this question, I’ll try to share a little insight from my 20+ years of experience and give some tips for increasing creativity.

It's not all that surprising how many programmers are musicians. I would say roughly 40% of the developers I know are significantly musically inclined in some manner, but that's just me. I wasn't able to find any official study, but I would guess that this isn't far from the norm among programmers, which seems to be a much higher ratio than the general population. Playing music is sometimes like solving a puzzle. We ask ourselves questions like “how loud do I play this crescendo”, “how fast do I speed this section up”, “how long do I hold this note”, and “how much contrast do I have between these two sections?” How we answer these questions really set us apart from anyone else who plays the same piece. All of the answers to these questions combined come up with a solution that we typically find pleasing. It just so happens that programmers love solving puzzles as well. Solving puzzles is a very left-brain task.

On the other hand, people love to express themselves. Some do it through fashion, some do it through sports, and some do it through music. Programmers often do it through code. Sometimes, it's the little things like brace placement or naming conventions. Other times, it's the intricacies like object representation or control flow. I can look at a piece of human-generated code and learn quite a bit from the person who wrote it. I can also look at a piece of code generated by any one of my coworkers and usually tell you who wrote it without cheating and looking at the comments. My whole point here is that most people have their unique coding styles which express themselves, styles which typically reflect a little about the personality and a little about the creativity. Self expression is a very right-brain task.

It just so happens to turn out that some of the best programmers I know are active musicians. Is there a link? Probably. I’d love to say for sure, but I haven’t done a formal study. I do know that musicians use the “right side” of their brain in an increased amount compared to your average Joe whereas programmers use the “left side” of their brain more than the average Joe. Combine them together and you got someone who, well, uses their brain more than the average Joe. The right side of the brain is responsible for a lot of abstract thinking, creativity, and pattern recognition. To improve creativity in our programming, it seems that we should focus on improving the right side of our brain.

So here are some tips to doing just that.

- Try drawing or writing a story using your non-dominant hand.

- Learn to juggle. Studies have shown that learning to juggle (and keeping the skill active) actually increases the amount of gray matter in your brain.

- Pick up an instrument and make your own melody and play that melody several times. Write it down.

- Pick up an instrument and practice over and over again. Studies have shown that practicing an instrument has several benefits, such as improved hand-eye coordination, improved memory, improved concentration, improved hearing, improved eyesight, etc.

- Look at a three-dimensional object and draw that object.

- Write a short fictional story. Try restricting the setting to a unique time – “The year was 1492…” or “He closed his eyes and braced himself as he pushed the warp-speed launch button..”

Studies have shown that when one side of the brain is significantly more developed than the other side, people have problems in learning. My guess is that a lot of programmers have a dominant left-side of the brain. Improving the other side will bring about a lot of change in abstract thinking, creativity, and etc.

One other aspect that a lot of people often forget is diet. Eat right. Have a glass of orange juice in the morning instead of that Dr. Pepper. Eat a salad for lunch. Have an apple as a snack instead of that bag of chips. A healthy diet and proper sleep actually improves awareness, memory, focus, and even intelligence.

Improving the right-side of the brain and eating right will be a huge step to sparking more creativity in your programming.

1 Comments:

Anonymous Anonymous said...

I can play the guitar a little and I’m pretty good in graphic design which gives my right brain a workout. I love to design and I love to program but I would say if I had to give one up it would be design because I can't imagine life with out programming.

I used to think that my abilities in design were a hindrance to my programming abilities. I always imagined there were wars going on in my head between the left and right side of the brain.

Recently I’ve been seeing how my creative thinking pushes my programming to new levels. If I wasn't creative I wouldn't be able to think of new features for my programs and new and better ways of doing things and I would end up being a lazy programmer just making sure things worked.

Now about coding style... My way is the best! And for all you programmers that put the starting brace for a new code block on a newline, you need to wake up and smell the coffee! A.) It creates more lines in your code. B.) It looks silly esthetically!

10:04 AM  

Post a Comment

<< Home