Last Comments

Emily Bache (Coke machine proj…): It seems very agile to me…
William Pietri (Coke machine proj…): Interesting! I’m not clea…
Amber Shah (WeVouchFor): What a great idea, I only…
William Pietri (Looking for consc…): Interesting question! I…
Keith Braithwaite… (WeVouchFor): Zombie project or zombie …
halmac3 (Quality, Safari a…): People treat “quality” as…

Archives

01 Oct - 31 Oct 2009
01 Jun - 30 Jun 2009
01 May - 31 May 2009
01 Nov - 30 Nov 2007
01 Oct - 31 Oct 2007
01 Jul - 31 Jul 2007
01 Jun - 30 Jun 2007
01 May - 31 May 2007
01 Mar - 31 Mar 2007
01 Jan - 31 Jan 2007
01 Oct - 31 Oct 2006
01 Feb - 28 Feb 2006
01 Nov - 30 Nov 2005
01 Sep - 30 Sep 2005
01 Aug - 31 Aug 2005
01 Jul - 31 Jul 2005
01 Jun - 30 Jun 2005
01 May - 31 May 2005
01 Mar - 31 Mar 2005
01 Feb - 28 Feb 2005
01 Jan - 31 Jan 2005
01 Dec - 31 Dec 2004
01 Nov - 30 Nov 2004
01 Oct - 31 Oct 2004
01 Sep - 30 Sep 2004
01 Aug - 31 Aug 2004
01 Jul - 31 Jul 2004
01 Jun - 30 Jun 2004
01 May - 31 May 2004
01 Apr - 30 Apr 2004
01 Mar - 31 Mar 2004
01 Feb - 29 Feb 2004
01 Jan - 31 Jan 2004
01 Dec - 31 Dec 2003
01 Nov - 30 Nov 2003
01 Oct - 31 Oct 2003
01 Sep - 30 Sep 2003
01 Aug - 31 Aug 2003
01 Jul - 31 Jul 2003
01 Jun - 30 Jun 2003
01 May - 31 May 2003
01 Apr - 30 Apr 2003
01 Mar - 31 Mar 2003
01 Feb - 28 Feb 2003
01 Jan - 31 Jan 2003

Pivot Homepage
Pivot Forums
Pivotstyles
Pivot Help

To change the links in this list, edit the file '_aux_link_list.html' in your Pivot's templates folder. You can do this by directly editing the file, or you can go to Administration » Templates in the Pivot interface.

Miscellany

Powered by Pivot - 1.40.6: 'Dreadwind' 
XML: RSS Feed 
XML: Atom Feed 

« Of types and classes | Home | After Sobig, Swen »

Models shmodels

I can't spend one day without reading some article, blog entry, web page about the unified modeling language (UML), model-driven architecture (MDA), or "modeling visually" as a best practice. But I've been unable to find background documentation which says anything useful about the role of models and modeling in software development.

I've only ever had two real insights regarding models and modeling, but they are relevant and perhaps important enough to share here. A small preamble first.

If I think about what the term "model" evokes in general, outside of its software-specific meanings, I come up with two things. One is "scale model" - some physical, made-of-atoms object which in some way stands for another object. A cardboard model of a cathedral, a rods-and-balls model of an atom or a molecule. The other meaning is "conceptual model" - some set of abstract statements which in some way is about the real world or some aspect of it.

On the face of it, the meaning which is more appropriate in the context of software development is the theoretical one. Software is not physical, the kind of "modeling" which involves actual atoms does not seem to apply, except perhaps in one kind of situation. We do sometimes write software which "stands for" some other software that will be built on a different scale - we call that "prototyping".

Other than that, modeling in software must for the most part consist of conceptual modeling. A conceptual model is a set of statements about something, a description of the world; it is a set of symbols with a definite structure, which can make sense to someone. But then, so is any descriptive statement. What's different about a model ?

Insight number one, which I got from a colleague keen on UML, is that a model generally discards most of the information available about what is described. A model is a good one if, with what little information it retains, it still lets us derive useful statements about what it describes. A Newtonian model discards just about all the knowledge we have about physical objects: their color, texture, taste, fragilty, chemical properties, etc. All it retains is mass and location in some coordinate system. Yet it can be used to predict planetary motion to great accuracy.

In other words (George Box's words) : "All models are false, but some models are useful."

Insight number two is about the way we use models - and it's not one that can be explained in one short sentence. I owe it to Betty Edwards' "Drawing on the Right Side of the Brain". I bought the book because I'm not a very visual person, which perhaps explains my lack of excitement about UML documentation in general. It hasn't turned me into an artist or a UML fanatic yet, but I took at least one thing of great value from it - a splendid metaphor for how models work. This is the "viewfinder" tool Edwards introduces at some point, a clear pane of glass or plastic with horizontal and vertical guidelines drawn across its center.

Most models work precisely the way the viewfinder works. They are something interposed between our unaided sight and reality. The lines they draw permit us to make distinctions; this thing is in the upper left quadrant, that thing in the lower right. These statements are not literally "true" of the things we see; they are only true statements about the relationships between the model and reality. But by using the viewfinder we can find out important structural relationships between things in the scene we are trying to draw. These two simple lines let us achieve what Edwards says is the key to drawing well: drawing what we actually see, not what we think we see, after having processed the scene through a variety of symbolic filters loaded with all sorts of preconceptions ("faces are round", "ceilings and walls are at right angles to each other").

Another parallel: most people, once they draw well, rely less and less on the viewfinder. (Or so I'm told. I still can't draw worth a red cent.) So it is with models: the more useful ones we "internalize" until we come to rarely, if ever, use them consciously.

For a great example of an actual model that looks very much like a viewfinder, see this entry by Brian Marick.

Taken together, these bits of insight make me extremely puzzled that we call a "model" a UML document, or more generally a picture which can be transformed to any extent into code. (This isn't to say that a UML diagram has no value. In particular, I think UML can be good for learning one's way around a given piece of software. Perhaps UML makes for good maps. A map can with some justification be called a model, but certainly not all models are maps, and we should use the more precise term.)

Perhaps there is some confusion resulting from the "discarding most information" aspect. It's true that design diagrams discard most of the detailed (and nevertheless important) information about code, just as it's true that a model discards most information about what it describes. This is the property of abstraction. But just because diagrams and models have abstraction in common isn't enough to call diagrams models.

Abstraction is important, and something I've thought about as well - but that'll have to wait until later entries.

No comments:


No trackbacks:

Trackback link:

Please enable javascript to generate a trackback url


  
Remember personal info?

Emoticons / Textile

Comment moderation is enabled on this site. This means that your comment will not be visible on this site until it has been approved by an editor.

To prevent automated commentspam we require you to answer this silly question
 

  (Register your username / Log in)

Notify:
Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.