$ cat posts/sayings-madmen-and-trains.md

Sayings, madmen and trains

the principle of sub-optimization of the parts

es Leer este post en español →

I learned the principles of agile (and of the best process for developing software) many years ago from the popular saying that goes: “you have to kill the lice one at a time, before the lice kill you.”

The art of managing projects starts from simple things, from knowing what you want and steering efforts and resources toward that goal: Direction+Organization+Method. But we don’t always have all the resources, or all the pieces, or there simply isn’t enough time to reach the goal. That is when you need to apply the principle of the sub-optimization of the parts for the sake of the whole, also known as the principle of the madman and the flat tire.

If you didn’t read it in my previous post, here is the story that lays out this important management principle once again:

It was a day of pouring rain, and Marcos gets a flat tire right in front of an insane asylum. He pulls over, gets out, shelters from the rain as best he can and starts removing the lug nuts that hold the wheel. He leaves them carefully on the ground in a little pile. He takes the wheel to the trunk of the car to swap it for the spare, and when he comes back he accidentally kicks the lug nuts, with such bad luck that they roll away and drop down the storm drain.

“What rotten luck!”, Marcos exclaims, “now what am I going to do?”

At that moment, one of the madmen who was watching the scene from the window calls out to him: “Hey, buddy! Easy! Take one lug nut off each of the other wheels, put those three on this wheel, and drive like that to the next gas station, where you can buy lug nuts and fix the wheel.”

Marcos is astonished, and after hearing the madman’s ingenious proposal he can’t help but thank him enthusiastically: “What a great idea, you nut! How did you come up with it?”

The madman’s answer was immediate: “Because I’m locked up in here for being crazy, not for being stupid!”

The madman knows the principle of sub-optimization of the parts, which says:

“For the goal of a system to be met, the parts must necessarily sacrifice or minimize the achievement of their own goals. What matters most is the whole (the system). The principle of sub-optimization says that the parts must sub-optimize their goals so that the overall goal can be reached.”

The problem with many managers, and it is more common among younger or less experienced leaders, is that they expect to optimize the goals of all the parts. They always complain that they don’t have enough resources, because they are seeking the optimization of their own unit. They will always look swamped with work and over-demanded, but sometimes you have to realize that it is not possible to reach the optimum for your unit, because there is a larger goal (which is sometimes ignored by the members of the sub-unit, or they simply don’t know about it).

What matters is achieving the goal set by management, the success of the whole, over the success of the individual part. It is one of the keys to the worse is better principle that we have already discussed here before.

The bad thing about over-optimizing is that it leads us into ridiculous situations and into stagnation, and therefore to the failure of the project (delays, budget overruns, or simply never finishing it). And it is such a frequent mistake, especially in technology projects and in software development projects in particular.

It turns out software is so malleable that it gives the impression that we can always optimize that routine a little bit more, or hunt down the very last vulnerability and add all the preventive code to keep us from getting hacked, or from losing consistency in our database, or from going down at the most critical moment, forgetting that it is not possible to have consistency, high availability and fault tolerance, all at the same time.

All this business of planning for every possible scenario reminds me of The Melania Principle, which comes from this old story:

This is the story of a Chilean countryman who was a railway switchman, like the one in the photograph below. In the old days, and perhaps on some railways it is still like this, certain sections of track, where the lines crossed for example, required the coordinated operation of the switch by means of a lever, known as the aguja (the points).

This is the story of Pedro, a “huasito”, a Chilean country fellow, who looked after a railway switch and lived with his wife in a shack near the tracks.

One day a curious tourist stops and asks him what he does for a living:

– I’m a switchman, I am – answers Pedro
– And what do you have to do? – asks the tourist
– Well, I grab ahold of this here lever, they call it the switch, and I move it, like so, see?
– But what do you move it for? – the tourist inquires
– ‘Cause when the train from the south wants to go up north... I move the switch inwards. And if the train from the north comes along wantin’ to go down south, I move the switch outwards.

The tourist looks at him, amused, and decides to put him to the test:
– And what if both trains come at the same time?
– Well, in that case I call Melania, don’t I!
– And who is Melania? – asks the surprised tourist
– Melania’s my wife, and I call her so she can come see the almighty mess this is gonna make!

And that is the Melania Principle :-) have a good end of the year.

Comments

comments powered by Disqus