Tuesday, October 16, 2007

Programming Lesson 2: Switch On Switch Off

Thanks a lot for the emails that I received as replies to the previous story!! In the previous lesson (You are the bug. You are the solution), we talked about how thought process creates bugs and how it can be reduced. This is second-part of the seven stories that I'm going to use to improve programming skills

Programming Lesson 2: Switch On Switch Off
Two monks were traveling together, an older monk and a younger monk. They noticed a young woman at the edge of a stream, afraid to cross. The older monk picked her up, carried her across the stream and put her down safely on the other side. The younger monk was astonished, but he didn't say anything until their journey was over. "Why did you carry that woman across the stream? Monks aren't supposed to touch any member of the opposite sex." said the younger monk. The older monk replied "I left her at the edge of the river, are you still carrying her?"

The story is a great lesson that teaches us how to switch between different projects. The old monk breaks the rules of his religion, but then he doesn't carry that event of his life through him.

When we are working on a project, we need to think only about that project and what it requires. Objectivity is the keyword here and extremely important to understand what goals we wish to achieve. We can bring all the nice features of our previous project and add them to our current project, but we need to understand what we wish to achieve with our new project. Just bloating every project with every innovation that we have done till date doesn't make much sense!!

But the lesson in the story is not to forget the past. Past success & mistakes teach us lessons, but the idea is not to be affected by those success or failures of the past. Also, we all play different roles in projects. Sometimes as a developer, sometimes database designer, sometimes tester on the same project. We need to objectively play each role and behave in a non-attached manner on all these roles.

For eg. My 2 current projects on MobileATM and Distributed Video Encoding, both require network optimization and peer management. But the requirements and devices on the projects are completely different. If I were to be attached to one technique that I discovered for intelligent load management and use the same in both the projects, I know either of the project would fail miserably in performance and scalability.

So the lesson to be learnt from this story is of detachment and to be unaffected by past success and failure. We need to learn to Switch On-Switch Off between different roles that we play. And this does not just apply to programming, but to life itself, where at times we are parents, friends, colleagues, students, kids...


* Here unaffected means "remembering & feeling" but not lingering and doing actions based on those feelings

No comments: