Wednesday, July 22, 2009

 

Three Kinds of Measurement and Two Ways to Use Them

In the testing business, we've been wrestling with the measurement problem for quite a while. I think there are two prongs to the problem. The first is the aphorism that "you can't control what you can't measure". The second is the confusion between measurement (which can be either quantitative or qualitative) and /metrics/, which are mathematical functions of measurements, and therefore fundamentally quantitative, /only/ quantitative.

I don't know if you can't control something that you can't measure, but you can certainly make responsible, defensible choices control things based on non-quantitative measures. For example, I'm hungry right now, and the non-bald parts of my head are a little shaggy. I'm not really comfortable with the keyboard on my new ThinkPad, but I like the display even though the default fonts seem to be a little on the small side for an astigmatic guy approaching his 50s. I can measure and manage all of these things without applying numbers.

I'm going to go grab a bite after I've finished this note; I'll get my wife to give me a haircut before she heads out on the canoe trip, and I'll trim my beard on my own. I can't do much about the keyboard, although I can measure it by saying that I liked my old machine's keys better. And I can grow the fonts in the browswer by pressing Ctrl-+ until I'm happy again. In each case, I'm measuring to manage just the effects that I want, even though I'm doing it without quantitative measures. (Thanks to Matt Heusser for pointing out the haircut example to me; and thanks to Cem Kaner for pointing out the significance of the fact that I griped about the keyboard before complimenting the display.)

Apropos of all this, another of my Test Connection columns has been posted on StickyMinds. This one is about measurement and metrics, and the way that people use and confuse them. You can read it by clicking here, or by going to http://bit.ly/fwFUZ.

I'm grateful for the guidance and compliments given to me by Jerry Weinberg on this one.

I'm also delighted by the appearance of a recent article by Tom DeMarco in IEEE Computer, in which he re-evaluates his thoughts on metrics as expressed in early and influential book, Controlling Software Projects: Management, Measurement, and Estimation (Prentice Hall/Yourdon Press, 1982). He also questions his thoughts on software engineering, as evinced by the title of the piece, "Software Engineering: An Idea Whose Time Has Come and Gone?". It's brilliant, and high time that some of Mr. DeMarco's stature raised these questions. You can read the article here, or by going to http://bit.ly/pRrkd.

Monday, July 06, 2009

 

Testability

On Twitter, Kindly Reader@jrl7 (in real life, John Lambert at Microsoft) asks "Is there an example of testability that doesn't involve improving ability to automate? (improved specs?)".

Yup. If testing is questioning a product in order to evaluate it, then testability is anything that makes it easier to question or evaluate that product. So testability is anything that makes the program faster or easier to test on some level. Anything that slows down testing or makes it harder reduces testability, which gives bugs an opportunity to hide for longer, or to conceal themselves better.

Testability is enabled, extended, enhanced, accelerated or intensified by initiating or improving on some of the things below, either on their own or in combination with others. That suggests that testability ideas are media, in the McLuhan sense. Thus each idea comes with a cautionary note: As McLuhan pointed out, when a medium is stretched beyond its capacities, it reverses into the opposite of the intended effect. So the following ideas are heuristic, which means that any of these things could help, but might fail to help or make things worse if considered or applied automatically or unwisely.

In accordance with Joel Spolsky's Law of Leaky Abstractions, I've classified them into a few leaky categories.

Product ElementsUsability

Things that make a program faster or easier to use tend to make it faster or easier to test, especially when testing at the user interface level. Any time you see a usability problem in an application, you may be seeing a testability problem too.
Oracles

An oracle is a principle or mechanism by which we might recognize a problem. Information about how the system is intended to work is a source of oracles.
Equipment and Tools
Build, Setup, and ConfigurationProject and Process
Want more ideas? Have a look at James Bach's Heuristics of Testability. But in general, ask yourself, "What's slowing me down in my ability to test this product, and how might I solve that problem?"

Postscript: Bret Pettichord contacted me with a link to this paper, at the end of which he surveys several different definitions of testability.

This page is powered by Blogger. Isn't yours?