Wednesday, March 02, 2005

Justifying my illogical aversion to UML :-P

Here's a set of essays by someone named Jack Reeves on the topic "The Code is the Design." I think I agree with the man. Somehow, drawing complex UML diagrams to design your code (or, as I found to be even more frustrating, learning how to draw complex diagrams to design code) seems to be akin to planning a whole essay by drawing dozens of sentence diagrams first. It's an utter waste of time. The exception might be UML class diagrams, which might help when a program gets too complex. But even class diagrams are mere intermediate designs. As Reeves says in What is Software Design: 13 Years Later:

Personally, I think a person with his feet on the desk staring at the ceiling can be "doing design" just as seriously as someone playing with UML diagrams in ROSE. I have always known that you are better off if you put some real thought into what you are trying to do before actually doing it. People differ widely in what helps them think, however. Some people use pencil and paper. Others like white boards or even computer tools. Some people like to bounce ideas off of other people, others like peace and quiet. Some people feel comfortable with diagrams like UML. Others prefer CRC cards.

What approach they choose doesn’t matter; until someone starts insisting that these intermediate designs should be products in their own right. It’s the code that matters. If you get good code, does it really matter how it came about? If you don’t get good code, does it really matter how much other garbage you made people do before they wrote the bad code?