Wednesday, January 12, 2011

Bruce Lee and Software Development - Part 1

So what can a software developer learn from Bruce Lee? Well, surprisingly, a whole lot. It's funny how the state of software development today is a lot like the state of  martial arts during the last quarter of the 20th century. Just as martial arts practitioners would be partial to a particular martial arts style, we have programmers who are partial to a particular programming concept (functional, object oriented, etc.). However, software practitioners are beginning to go through the same transformation that the world of martial arts has experienced in recent decades. We are beginning to realize that in software development too much emphasis on  purity is counter productive. Languages such as Ruby, Scala, Ocaml, and others are coming into popularity mainly because they indiscriminately attempt to combine some of the best features from various schools of computation and programming languages. Continuing with the analog of martial arts; one of the first proponents of mixed martial arts was none other than Bruce Lee himself. But as many know (or may not know) Bruce Lee was also a Philosopher and in his philosophy you can find ideas that serve to further this analogy. Bruce Lee's Jeet Kune Do was but an application of his broader theory which can be applied to many things such as software development. Through the studying of the philosophy of Bruce Lee we will rediscover many aspects of the current trend of agile software development yet through a much richer and more developed theory.

To wet our appetite we begin with a few applicable Bruce Lee quotes.

"All fixed set patterns are incapable of adaptability or pliability, The truth is outside of all fixed patters."

Now the word 'pattern' immediately brings to mind the concept of design patterns. Design patterns are indeed useful when one already knows the nature of the software he is developing. Design patterns can also act as a guide which can help discipline a software engineering effort. However, you don't have to look to hard to find literature illustrating examples where an over reliance or too strict of an adherence to such patterns has lead to calamity. Blindly using design patterns in the face of  varying environments and polymorphic design concerns is not at all agile. The world of software development is replete with patterns -- practice them and know them and let them spring from you mind formlessly and adaptively.

"Obey the principle without being bound by them"

Indeed. There are a lot of software best practices floating around out there. Sometime not having a best practice to guide you can be a bit unsettling. Other times, best practices bar you from easily accomplishing something that would otherwise be easily accomplished. This is where "you" have to decide what is best. No law is general enough to cover every situation or combination of events. Obeying the principles are default but you must know when they become limiting.

 "If you spend too much time thinking about a thing, you'll never get it done. "

Need I say more?

"The less effort, the faster and more powerful you will be."

I always tell other programmers to practice typing. Imagine not being able to type and yet trying to program. Your thoughts can't even flow to the editor without great effort. Using an editor that lets you easily navigate your code. Use a framework that is flexible and yields results quickly. These things take practice but this sort of thinking will make you a much more "powerful" and productive software developer.

"To me, the extraordinary aspect of martial arts lies in its simplicity. The easy way is also the right way, and martial arts is nothing at all special; the closer to the true way of martial arts, the less wastage of expression there is. "

Replace every occurrence of the phrase "marital arts" with the term "software development" then think about some of the concepts embodied in the agile methodology. Think about the conciseness of languages such as Haskell and the ease of use of frameworks such as Rails. These are the ideas that the preceding quote embodies.

"Take no thought of who is right or wrong or who is better than. Be not for or against."

It has never been about right or wrong. It has never been about one idea being better than another. There is a time and place for everything. Know "when" -- the path of least resistance guided by the foresight of education is usually a good indication.

That is all for this part. Next we will dig a little deeper to see what we can learn from the more formal writing of Bruce Lee. In closing I leave you with on last Bruce Lee quote.

"...put water into a cup, it becomes the cup, you put water into a bottle, it becomes the bottle, you put it in a teapot, it becomes the teapot. Now water can flow or it can crash. Be water, my friend.”


No comments:

Post a Comment