Friday, December 26, 2008

Software Velocity as a Physical Observable

The Math Professor

I had a Mathematics professor who once said, “You’ve been using numbers for quite a while, so it’s about time you learned what they really are.” This was in an analysis class where we were learning about real numbers. There are a couple of ways to define real numbers: an axiomatic approach and a construction-based approach. In the former, you write down the fourteen or fifteen properties of real numbers and presume that a set containing such elements exists. In the latter, you build real numbers out of rational numbers.

It’s almost true that real numbers are merely sequences of rational numbers. It’s well known that pi or the square root of two are not rational, but there are sequences of rational numbers that converge to these real numbers. However, the sequences are not unique. There are lots and lots of sequences whose limit is pi.

For example, just take any sequence that converges to pi and prepend any integer to the beginning of it. Since you have an infinite number of integers to choose from, you have at least an infinite number of sequences that all converge to the same real number. If that strikes you as too much of a cheat, consider that different algorithms exist for approximating pi. Some converge faster than others, but if you could run them forever, they’d all produce pi.

So, an individual sequence doesn’t correspond to a real number, but the set of all sequences with the same limit does. In other words, real numbers are equivalence classes of sequences of rationals. On the one hand, we could have a totally abstract definition of real numbers, based on axioms. (Multiplicative commutativity, the distributive law, and so on.) But on the other hand we could have a more pragmatic definition rooted in equivalence classes of simpler, more mundane objects.

There’s something magical about equivalence classes. Consider again that two different algorithms can generate sequences of digits that both converge to pi. If you’ll pardon the pun, pi must be, well, real, if you can arrive at it in different ways. Equivalence classes of concrete things agree with the abstract real number concept, which is otherwise described by axioms alone.

The Physics Professor

I had a Physics professor who advanced a compelling definition of mass. “Mass,” he said, “is that property of a substance that makes the law of conservation of momentum true.” We all found this delightful. It was a rigorous step up from the circular pseudo-definitions we had seen before. (Mass is quantity of matter. What is matter? Matter is anything that occupies space and has mass. What then is mass, again? Ugh.)

As curious Physics majors, the professor’s axiomatic approach to mass appealed to our inner Euclid. First, demand that the something like the law of conservation of momentum works, and then see what follows from that. But, in time, I came to feel that it was dangerously abstract. Sure there’s this elegant concept, but why should the real universe obey it? Yes, it was the apparent utility of mass and momentum that made them worth studying, but were we doing Physics (where we’re never sure that we’re right) or doing Mathematics (where we’re right but we don’t know what we’re talking about).

Anyway, there are a number of operational definitions of mass. By “operational,” we mean measurements that rely directly on experiments, even if those experiments are only gedankens. For example, if you pull on an isolated body with a rubber band stretched to a fixed length, then the object’s mass can be operationally defined as the reciprocal of the resulting acceleration.

Other operational definitions are possible. Imagine tying a body to a test mass and spinning them about each other in zero-g. The location of the axis on the rope can be used to measure the ratio of the two masses. You could also imagine a mass-measurer made out of an asymmetrical tilt-a-whirl, where the units surprisingly turn out to be seconds-squared.

You could repeat many experiments, and the results would -- if you’ll pardon the term -- converge on the true mass as operationally defined. Moreover, different methods of measurement will agree. The different operational definitions produce consistent measures. You know where I'm going with this. I'm about to suggest that they form an informal equivalence class.

The abstract definition of mass is real, and it’s complemented by the equivalence class of all operational definitions of mass. This same line of reasoning sheds insight into other physical observables, such as charge, temperature, and so on. I’m struck by the analogy to the two complementary ways to define real numbers. Equivalence classes of operational definitions marry real world phenomena to abstract models, where we can flex our mathematical muscles and do interesting work.

Software Velocity

When tracking progress on a burn-up chart, agilists concede that the units of velocity are not important. They could be person-days, story-points, or whatever. Nevertheless, the velocity concept has meaning. I imagine that each team is like its own custom experimental apparatus, providing its own operational definition of velocity.

But is software velocity real? Yes. It’s an abstract concept whose complement is the equivalence class of all operational definitions of software velocity. The difference between physical mass and software velocity is that the experimental equipment needed to operationally define physical mass is very simple, at least in principle. But the analogous equipment for a software development project lives in the deep structures of the developers’ brains, drawing upon whatever arcane magic causes them to choose which Fibonacci number corresponds to the heft of any given feature.