I was watching Dr. Stuart Reid talk about model-based testing, some months ago. During the presentation, he complained that so few people used UML for model-making. Why don’t more people use UML, he asked the audience?
I suppose his question was rhetorical, but I couldn’t help myself. I called out “Because it’s clunky!”
“It’s better than nothing,” he replied.
Think about that. Think about that phrase. A comparison is offered between something and nothing. Who could prefer nothing? Nothing is a void. It’s scary and black. It makes us think about death. Ick. But wait a minute, the comparison that matters is not between something and nothing, it’s probably between something and some other thing.
An affliction of people who promote best practices is aversion to alternatives; a passion for monoculture. A desire to have one and only one solution, instead of a spectrum of solutions, to the problems that beset us.
As soon as Stuart said “[constructing state models using the UML formalism] is better than [NOT constructing state models using the UML formalism]” I immediately thought of an alternative which I suppose occupies the “nothing” category in his mind: an alternative to making models in UML is to make models in our heads.
This is not nothing. Our brains are amazing instruments. Don’t pretend that your brain isn’t there or that it does nothing important. Come on, Stuart. I do lots and lots and LOTS of modeling in my head. So do you. A tiny portion of that will we ever commit to any kind record-keeping system.
Another alternative: Pencil and paper. I make little boxes and arrows on paper. It works. Try it.
Yet another alternative: source code. Computer software source code is a modeling language. When I write my software, I am encoding my state models.
What Stuart may have wanted to say is that he believes things would go better in projects if programmers chose to create visual models of software in a specific formal system called UML (to which he may believe there is no viable alternative formal system of visual modeling) prior to writing code, instead of making the leap directly from mental modeling to coding.
It would have been interesting to hear him say that. It’s a debatable sentiment, but at least it’s a way of speaking that doesn’t shut down dialog before it even gets going.
Personally, I find it absurd that a few people would invent an awkward, overly formalized system of making pictures and then hold in contempt the great majority of productive working programmers who choose to ignore it. Remember, just because a consultant wants to take your money doesn’t mean you have to give it him.
Leave a Reply