Tuesday, October 11, 2005

Hit it with a hammer

There are two ways to get something done.

First is the skillful way, a way of finesse that takes into account all of the minute details. The resulting solution is a thing of beauty in itself, worthy of praise and admiration. All hail this solution, the archetype of problem solving!

The second (and more common) way is to hit it with a hammer.

Case in point, a computer program. You have a wonderful design, you know what each part is supposed to do.

You take input A and give back result B.

You are sure there is a wonderful way to get from A to B. A single line of code that is staggeringly powerful and beautiful.

But you can't figure it out. You search the online forums, beg from genuises you know. Offer a ritual sacrifice but STILL the elegant solution is nowhere to be found.

But you know it exists. Even if you do find it in the end, your search will have taken weeks.

Hitting it with a hammer is the process of breaking it down and writing a hundred lines of code that does exactly the same thing (albeit messier and maybe less efficient).

"Mongo like programming."

In another example you are in a foreign country where you do not speak the language. You have accidentally broken your hand and you need medical attention.

Do you study your guide book and put together a treatise on how excruciating the pain is, how silly you feel about how the accident happened, how your Mother had warned you to wear clean underwear?

Do you not do anything until you have this beautiful essay ready?

Or do you walk up to someone who looks like they might know the area and hold up your bloody, shattered hand and say the local equivalent of "Hospital. Please. Ow."?