Musings of a code junkie

Bruce Lee, Water, and Programming

Tagged adaptability, bruce lee, and thoughts
Empty your mind, be formless, shapeless – like water. Now you put water into a cup, it becomes the cup; you put water into a bottle, it becomes the bottle; you put it into a teapot, it becomes the teapot. Now water can flow or it can crash. Be water, my friend.
Bruce Lee in an interview

When Bruce Lee said this, I’m sure he wasn’t thinking about programming. He was a great martial artist who knew his shit, but little did he know that us programmers can also apply his wisdom to our craft.

Now that I’ve finished my Programming Language Pragmatics class and discussed programming languages like Algol, ADA, Lisp, Scheme, Prolog, Smalltalk, C, C++, Java, C#, etc., I’ve come to realize that there are a shit load of languages out there, each with their own set of pros and cons. Some thrive, others perish. Having this in mind, we can’t put all our eggs in one basket and only learn one language. What if it flops?

If there’s any one constant thing about the IT industry, is that there is no such a thing as constant. We can rely on its unreliability. What’s awesome and great today, can suck and disappear tomorrow.

So what is a programmer to do?

Bruce Lee has the answer: be water, my friend.

Empty your mind – we shouldn’t treat any programming language like a religion. Just because it’s Turing Complete, it doesn’t mean it should be used everywhere. You could build a web app in C++, but that would be like taking your teeth out with a hammer.

We need to learn more than one language. More than two even. The more different, the better! It will help us to make informed decisions about the most suitable tool for the job, plus it will also help expand our minds and teach us to think differently. Be formless, shapeless – like water. Confining ourselves to one language will only make us stiff.

Notice that the stiffest tree is most easily cracked, while the bamboo and the willow survive by bending with the wind.
Bruce Lee

We need to adapt, be dynamic, and have more than one language under our belt. We need to become a cup when we’re in a cup; become a bottle when we’re in a bottle; become Ruby when we’re in Ruby. Be able to flow or crash when need be.

This doesn’t mean we should learn every language under the sun, jumping on the latest technology fad bandwagon like a dog after a frisbee.

We need to learn at our own pace – we’re all different. It doesn’t have to be one language a year; maybe one every two years is more suitable.
When we start to feel comfortable in a language, maybe that is a sign we should try another one.

The most important is not the language you learn, it’s what you learn from the language.

Program a lot in Java? Try C.
Sick of C++? Try Ruby!
Tired of juggling objects all day? Try something more functional like Scheme, Lisp, or hardcore Haskell.
Hell, be strategic about this: go for Clojure for something lispy; Scala or Erlang for something akin to Haskell.

At the moment I’m focusing on improving my Ruby-Fu, but afterwards I would love to look into Haskell or Scala.
What about you? What languages do you plan on learning? Drop me a comment, lets have a chat.

Whatever you do, remember to bend with the wind and

Be water, my friends.

Posted on 26 January 2010 under Programming
blog comments powered by Disqus