Elegance, Katana and Baby Teeth

Deciduous Teeth – Skeleton view –  Gray's Anatomy

Coders always strive for elegance; while the concept is quite elusive, there are a lot of physical objects whose design is elegant: watches, or katana swords. Yet, very often, once a program is finished the result is not elegant at all, but some contorted abomination. Many are quick to point out that this lack of elegance is the result of the coder’s shortcomings, they are probably using the wrong language, or the wrong paradigm, or wear the wrong type of t-shirts.

Designing programs that are as elegant as a watch is easy, as long as the program has a very well defined specification and is easy to deploy. Deploying a new watch is very easy: you give it to the user, she might have two watches or no watch for a short amount of time, but that is all right.

Things get complicated when you have deploy something over a running system, while some gods just whip up their world in seven days, when time comes to patch, things get complicated, you need prophets, large boats, weird weather, and you realise at the end of the migration that the unicorn did not make it.

Even mother nature has trouble coming up with elegant design when a new system needs to be deployed over an existing one. Take for instance the human version of knifes: teeth. The problem is simple: a new set of teeth needs to grown and deployed while the existing set of baby teeth is still being used. As the picture shows, the process is a hack: the new ones are grown wherever there is space, and there is not a lot of space. The old teeth cannot simply fall out and the new one grow in the space because the kid has to eat the whole time. If this picture does not convince you that the process is scary, there is a much more impressive one on flickr.

Most large scale system have the same problem: they are not started in-nihilo, but need to be deployed over an existing system, while both are running at the same time and sharing some of the resources (time, space, energy, users), then, things get complicated.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.