Friday, March 16, 2007

Applying Control Theory to Software Development

Many moons ago I learnt control theory - possibly the hardest final year engineering paper at Cambridge. And it had the following to say:

Every system can be treated as a black box with inputs and outputs - ok no revolution here, but I need a starting point!

It also said:

Observability is a measure for how well internal states of a system can be inferred by knowledge of its external outputs - thank you Wikipedia.


Controllability denotes the ability to move a system around in its entire configuration space using only certain admissible manipulations - Wikipedia's entry is not so helpful a translation would read how much of the output can we control using the inputs

So, Observability is the ability to deduce whats going on inside by whats coming out - a bit like the stool analysis and Controllability is the ability to configure the system via inputs - the equivalent of the atkins diet.

Now in software systems, we can apply the same ideas. Namely, when I write a chunk of code it is a black box system - stuff goes in and stuff comes out!!!!!

In fact several programming techniques are based entierly on this principal, namely, Inversion of Control Design pattern, Test Driven Development and large chunks of Functional Programming concepts.

In fact, my normal gripes with any framework (Java or .Net) typically occur when the code in the framework is not Observable or Controllable enough. In fact code can typically be improved by increasing ones ability to configure it and by providing clear outputs for given inputs!


Post a Comment

<< Home