Constraints are good

In a conversation with Michael Feathers at SDC2010, he mentioned something which I found very interesting. It was a very simple statement.

Constraints are good.

To me, that statement sounded rather odd. Constraints is a negative word to me, so intuitively I want to remove constraints. Thus, I asked him to clarify. And here’s what he said (or rather, my interpretation of it).

A night shot of a high way.A big advantage of software development is that we can build virtually anything. However, that same fact also represents one of the biggest problems. “Anything” includes all the great things that we envision, but also all the crappy things which we typically produce. :-P

Since the possibilities are endless, in theory nothing prevents us from creating something truly great. But — and here’s the thing — by adding wisely chosen constraints, we can eliminate some of the undesirable outcomes. That means, that even if we screw up a bit, we’re more likely to create something which is at least not half-bad because we’ve eliminated the really bad outcomes. If we stay within the constraints, that is…

Another way to see it is that just as any society needs some laws and rules in order to function smoothly, a software development team does too. Whereas an example in the first case may be “do not kill”, an example in the second could be “do not commit code which breaks the build”.

There are no comments on this post

Leave a Reply