Wednesday, January 9, 2008

Operational Complexity

I was reading a blog post by Paul Homer discussing complexity and containing it via encapsulation.

One important part that may be overlooked in his discussion is talking about the different types of complexity: design, implementation and operation.

The complexities of design, implementation and operation are very different from each other. I've seen a few large projects that have managed to contain the implementation complexity, only to lose it all by allowing the operational complexity to get out of hand. Each part in the process requires its own understanding to control its own special complexity. Each part has its own way of encapsulating the details.


We, as programmers, can understand design complexity - our job constantly puts use in battle against it, trying to keep it under control. Similarly, implementation complexity is usually tied to code complexity, and hence we recognise the risks and dangers of ignoring such complexity, and (hopefully), move to remove it.

However, I believe operational complexity to be completely ignored as a source of problems, which can be just as dangerous.

From my own personal experience, on joining a new programming team, and getting help from the version control manager in getting set up with the version control system, I was told "NOT TO WORK OUT OF THE WORKING DIRECTORY". That really put me on pause.
Don't work out of the working directory? Isn't that why they call it a working directory? Because you work out of it?

No, she told me. You might accidentally retrieve something from the version control system and overwrite, and hence lose what work you are currently doing.

Then, she proceeded to show me a round-about procedure of interacting with the version control system without actually working out of the working directory. (This 'procedure' involved copying stuff from one place to another, making your changes and copying them back). I was skeptical, not wanting to rock the boat, I fell inline. After all, things were always done that way.

However, after a few months of jumping through hoops just to check in my changes and losing some of those changes along the way, I had enough. The operational complexity was making life too difficult.

It turns out that the risk of losing code changes while working out of the working directory was real... because the settings in the version control client were off.

Now, a check-in, something that used to be a 10 minute affair of copy-pasting and diff-ing a number of files, is now a 20 second, stress-free affair, as it should be.

No comments: