Saturday, March 13, 2010

The Pattern

Anguished from tackling with a bug for a few hours, a novice had been idly browsing when he saw the reflection of a shadow flit by on the monitor. It was the Master Programmer coming in, late as usual.

The novice turned around and asked: "I come in early every day and code many more hours than you do, whereas you come late and attend unimportant social events. How do you manage to get any work done?"

The Master Programmer drew a flowchart on a screen. It was two boxes, each with an arrow pointing into a funnel, with another rectangle pointed out from under the funnel. Then, he drew a much larger third box, again pointing into the funnel, but as quickly as he had drawn it, he erased it off the board.

"Behold, the Pattern! This first square," pointed out the Master Programmer, "represents all my daily chores. The second one is my work. They are the inputs."

"The funnel is my capacity, and the rectangle is the useful code that I produce. It is the output. As long as there is balance, the Pattern surrounds me and my being. Being a programmer, I can easily manipulate both the inputs and outputs to my wishes."

The novice was impressed by the ease in which the Master Programmer had explained to him the Pattern. But he was curious for more, "Pray, Master, but why did you erase the third box?"

The Master Programmer looked stoically at the novice. "That represents Emotion. Emotion lives outside the Pattern and occupies infinite space. If you channel it into the funnel, it will obstruct the output."

"But why can you not manipulate this box, just as the other inputs?" inquired the novice.

"Because Emotion can not be programmed." said the Master Programmer, and the novice was enlightened.

4 comments:

Sasidhar said...

wait, what?

Gapa said...

Never be angry at your testcases. They bite back!

Vinay said...

Wow, you should have tried to make it Shorter, it would be a Zen story .

Gapa said...

What did the celibate zen monk say? There is no poon.