April 5, 2007

...Learn TDD with Codemanship

Growth Curve Applies To "Living" Code

I'm wondering today about the software aging process (what, again?!)

The more I look at it, the more convinced I become that this is more than a simple analogy. If we were to plot the growth curve of a software system, I suspect it would bear a resemblence to the growth curve of many living things - like people, for example.

If I live to be 80, I will have done most of my growing in the first 20% of my life - well, if you only consider upwards growth, of course.

If we were to plot a graph of my height over time since my birth, it might look like this:

And if we plotted a graph of software size (e.g., lines of code or function points) over time, the curve might look much the same. Most of the growing that software does happens in it's "youth". And the underlying causes for the shape of these curves might be kind of, sort of the same.

At a fundamental level both me and software are big bunches of information, and over time processes act on this information to transform it. In the case of a human being this process is called metabolism. We ingest "stuff" (more information) and we process it and create new information (cells, hair, teeth, DNA etc).

In a sense, we ingest order, and this new order balances the other ongoing process, which is the arrow of time itself - our tendency towards disorder.

When we're young we take on order much faster than we lose it, and so we grow. But as we age the picture slowly reverses and we start to lose order faster than we can take it on and we turn to mulch! Much of the disorder in our bodies is ingested, too. So as much as we're beneficiaries of our metabolism, we're victims of it, too.

The same may well be true of software. It has a metabolism of sorts: we inject order and disorder into the code as we add features, change code, fix bugs and generally noodle with it. And the faster we inject new code, the quicker the software becomes harder to maintain. It too is a beneficiary and a victim of its metabolism.

In both cases - living organism and code - we wind up with something "fully grown"; an adult, if you like. Then it's all down hill from there.

Interestingly - although somewhat morbidly - this process of decoherence speeds up massively after an organism has died. This might give us to some clue as to the process of life - what it means to be "alive".

As Richard`Dawkins puts it, life is "that which seeks to maintain itself out of equilibrium with its surroundings". The sudden shift from self-maintaining to rotting - in a matter of hours - suggests some kind of phase transition.

More than ever, this gives me cause to wonder if we shouldn't view code as essentially organic.
Posted 14 years, 11 months ago on April 5, 2007