February 16, 2007

...Learn TDD with Codemanship

A Short Story About Goals

The elders of Goaltown and Metricsville met one dark winter's evening to discuss a problem that had been plaguing the peoples of both their villages. The people of Goaltown made excellent apple pie, which they would sell to the good people of Metricsville at their Saturday market. And the people of Metricsville made fantastic lemonade, which they would supply to the inns and cafes of Goaltown.

But the journey between Goaltown and Metricsville was long and arduous, with swamps and mountains and deserts and lakes and rivers - yes, the terrain was very variable around those parts. By the time the Goaltownians reached the Metricsville market, their apple pies were cold, and by the time the Metricsvillians got their lemonade to Goaltown it was warm and flat.

Currently, the journey from Goaltown to Metricsville took about 2 hours. "If we could get that down to just 30 minutes", agreed the village elders, "the pies would still be quite hot and the lemonade would stay cool. And if we could make the journey less bumpy, the lemonade would not go flat."

The elders resolved there and then to solve this problem once and for all. They would build a road that ran straight from Goaltown to Metricsville, draining the swamps, cutting through the mountains, bypassing the deserts and bridging the rivers and the lakes so that a cart could easily make the journey in less than 30 minutes, with the minimum bumps and thumps along the way.

They appointed the Great Project Manager, who had successfully managed all of their big building projects in years gone by, to oversee the construction of this road. The Great Project Manager went to the village halls of Goaltown and Metricsville and asked for the strongest men to join the construction team. He then asked the Wise Old Architect, who lived in a tower made from the tusks of elephants at the gates of Goaltown, to draw a map showing them where to build the road.

The Wise Old Architect got on his donkey, the same old donkey he'd ridden for the last 20 years, and - with pen and parchment in his bag - made the long and windy journey to the very summit of Mount Grady. From this lofty position, he could see Goaltown and he could see Metricsville, and he could see everything in between. He began to sketch the shortest, most direct, least bumpy route between the two villages. When he was done, he came back down the mountain and presented his plan to the the Great Project Manager.

This, they could all see, was a truly great plan. It had everything they needed. It was short. It was flat. It wasn't windy. It wasn't bumpy. Surely, if they built this road then their problems would be solved forever!

And so the monumental project began. They broke the plan down into sections of 1/4 of a mile - each section potentially cutting through a different kind of terrain. So they would plan and build a mile and a quarter through swamps, then the next two miles through mountains, then the next quarter of a mile was a bridge over the River Rumbaugh. Some 1/4 mile sections took much longer than others to complete. Tunneling through mountains takes much more time than building bridges, for example. Luckily, the Great Project Manager had factored all this into his plan. He had his team provide rough estimates for how long each section would take, and so as each was completed the Great Project Manager was able to produce a much clearer picture of their progress.

It was 3 years before the road builders, who had started in Goaltown, could see the spires of Metricsville from the end of the road they had built so far. They knew the day would soon come when the road was finished and they could come and go as easily as if they were living in the same village.

"How long will it be?" they asked the Great Project Manager.

"By my calculations", he proclaimed "we have completed 92% of the work in 3 years. This means the road will be finished in just 3 months."

And with that, they let out a great cheer, for this was good news indeed.

In the Spring, the last brick was laid by the Mayor of Metricsville in a grand ceremony attended by all the dignitaries from both villages. A fanfare was played as the lemonade makers of Metricsville set off in their carts, the first villagers to be able to travel from Metricsville to Goaltown in under 30 minutes. The villagers ran behind them, with more celebrations planned - and free apple pie for everyone- when they reached Goaltown.

Along the way they passed a local simpleton who lived by himself in a cave in the rocky mountains through which sections of the road were cut.

"Good day to you", said the simpleton as they passed.

"Good day to you, simple fool", replied the Mayor.

"This all looks very jolly", said the fool. "What are you all celebrating?"

"We have completed the road that will enable us to travel between our two villages in under 30 minutes, so now our apple pies won't get cold and our lemonade won't get warm and flat on the way."

"And how long did this road take to build?" asked the simpleton.

"It took 500 men 3 1/4 years to build it. It cost half the combined wealth of our villages, but in the end it will be worth it." boasted the Mayor.

"So you took 500 men, 3 1/4 years and half of everything you own so that when the apple pies get to the market in Metricsville they're not cold, and so that when the lemonade gets to the inns and cafes of Goaltown it isn't warm and flat?"

"Exactly!" exclaimed the Mayor. And on he went, dancing a merry jig towards Goaltown on his perfect new road.

"Just one more question..." the simpleton called after him.

The Mayor stopped and turned back. "Yes?"

"Why don't the apple pie makers of Goaltown take their apples and their pastry and bake their pies at the Metricsville market so they can be served fresh and hot straight from the oven? And why don't the lemonade makers of Metricsville just take their lemons and their sugar to the village square in Goaltown and make their lemonade right there, so it can be drunk cool and fizzy straight out of the jugs it was made in?"

"Er... " said the Mayor. "Er, well, because... er...". The Mayor couldn't think of a logical, reasonable answer. Of course, that's what they should have done. It wouldn't have taken 500 men, it wouldn't have cost half their wealth. And they could all have been eating hot apple pie and drinking cool, fizzy lemonade for the last 3 1/4 years instead of breaking their backs in the swamps, mountains, lakes and rivers between the two villages. DAMN! How will I tell the villagers?, the Mayor thought to himself.

And then he had another, rather more dastardly thought. He attracted the attention of his guards, pointed at the simpleton and shouted "Arrest that man!"
Posted 13 years, 10 months ago on February 16, 2007