UML Fever
CowboyRobot writes "Queue has a couple of articles about UML:
Death by UML Fever by Boeing software architect Alex Bell
describes the problems that can result from over-reliance on modeling tools, with lighthearted lessons for the software development process in general and numerous illuminating quotations, such as: "Good judgment comes from experience. Experience comes from bad judgment. - Jim Horning."
Then, one of the developers of UML, Grady Booch of IBM, follows with The Fever is Real, in which he explains the motivations for creating the language, how it's used today, and where he expects it to go soon."
This is true, but note that the UML/patterns/OO newbie is in no position to determine that. One common mistake is to read the book, discard the parts you don't think is necessary, and then proceed with your design work. The rules that you chose to ignore were put there by pretty smart people, and there's a good chance they were put there for a good reason. When the design finally fails because you were missing something, the egotistical designer then blames the method.
The point is, I think the parent post was suggesting that the programmers in question may simply have broken the rules, and not actually found some instance where the methods really apply poorly. It's ego-boosting to think that what you do is unique and beyond the reach of old stuffy rules, but the truth is that most of us are doing things that have been done before.
This isn't to say that those cases don't exist, but that they're probably rarer than you think, especially if your team of programmers is trying it out for the first time, especially if you don't have a senior engineer already experienced in the method guiding your team. For the first time, at least, the instructions should be followed to the letter and strictly enforced. They should be dogma until you've at least went through a complete product life cycle with them.
What you suggest we've already tried for decades. The result is prevasively poor documentation and fragile designs.
-- BSD or Bust
Who uses UML? The designers or the programmers?
/.'ed.
I should imagine the designers wouldn't be very good at it, and I should imagine that programmers would have better ways to express themselves.
Sorry, this has just been a question I've wanted to know the answer to. And the story has been
- Jax
I found a significant design flaw with a pattern that they were using everywhere and raised it as an issue. Turns out they knew about the flaw but didn't want to fix it since they would have to redo all their UML diagrams for the bulk of the project.
Then they had the nerve to ask me to signoff on the design. Further they had the nerve to ask me to use UML on my next project!
UML is really great for communication of designs. But if you invest too much into the UML you end up "coding" the proposed design and it becomes too hard to modify.
Where UML really shines is in HUGE projects, where systems analysts design the system in UML and programmers write the code. Anything else it's a little bit of overkill and a little dangerous.
The moral: There are no magic bullets.
One facility I think is particularly absent from UML is modelling of error conditions. In most cases it's awkward to indicate that an error might exist and how to handle it if does occur. Also, UML notation seems incredibly basic (gulp!) and simply can't tackle algorithmic modelling for complex applications like memory management or software interrupt handling in an operating system.
If not already underway, the open source community should step forward and come up with a more advanced alternative to UML and then perhaps demonstrate its usefulness by applying it to a complete modelling of say.. oh.. umm... Linux ;)
OK, that's not really two words, but two words with a colon after it is much funnier than one word with a colon after it. Anyway, folks from the Kansas City area are familiar with Sprint, for whom we've all worked occassionally. It's your typical environment where management is non-technical but deluded to the contrary and they overcommit to things like RUP, UML, and code generation toold. Some people will tell you there should be sequence diagrams for every single bit of logic in an application and so on. It's all been said before and I'm sure there are many Sprint's out there. The applications work eventually, but at great cost, delay and frustration.
In my rarely humble opinion, UML is misused as just another management crutch, like powerpoint and outsourcing. Managers want to wow their uppers with charts and graphs and a few simple innovative ideas rather than than be hands on and make the tough decisions required to bring a project in on time and on budget. They put all their faith in an ideas like UML and RUP that they themselves don't fully comprehend and expect the world to magically change.
I was recently in a working group meeting for an insurance standards body called Acord. Somebody whipped out an interaction diagram and all these MBA's thought it was the second coming of Christ(or the first coming if you're Jewish).
What is the justification for the 'L' in 'UML'. I realize that in the loosest sense, UML is intended to be a means of communicating ideas, but it feels extremely primitive, like cave drawings. There's not even a standard machine-parseable representation for UML so that various programs can generate/manipulate/transform UML models without reverse-engineering some proprietary cryptic file format. And as for communicating person-to-person, I find it much more practical to use design-pattern language and a few terms from The Jargon File to improve communication with my team. Think about the jargon used between surgeons and their assistants -- to me, that's the kind of language that actually improves communication where it matters...UML seem to take the part of the development cycle that proceeds at the most frustratingly glacial pace and make it even slower. And that seems to make it different from all of the other languages that I've learned.
The "cue the foo posts in 3, 2, 1..." posts will commence with no subsequent foo posts in 3, 2, 1...
What I would like to see instead is an Open Source command line tool uml2code that will generate source code or patches to an existing code base from an XML description. This would not work unless there is a reverse tool code2uml to analyze code changes, with necessary markup of cource, and generate a change to the XML description. There are some work done in the area but no tools that I know of. This aproach would give the benefits of a common XML interface between the GUI and the code generation and also the freedom to work with any normal set of compiler and tools on the output. Hmmm, just dreams though...
I have used UML in the past, but it is an overkill for most projects. Here is a quick altenative which works and can be applied mechanically:
1) write all functionality down as text
2) scan the text and:
a) note all nouns
b) note all verbs
3) make the nouns as objects
4) make the verbs as methods
5) write a dictionary.
6) discard what's left.
7) find the common parts between classes (find base classes)
8) draw an inheritance diagram.
9) draw an ownership diagram (the object model).
10) make up some examples and act them out (either by yourself or with a team) to see if anything else is needed.
It has worked for me quite well in the past for most cases. You can also repeat any number of steps any number of times desired, if cyclic developement is required.
What book is that?
Thanks.
Bush and Blair ate my sig!
That's certainly true, but the "usual problems" can be mitigated with careful thought and good design. I've built lots of software from inadequate specifications. It's possible to do a good job if you take the time to understand the problem domain, even if the specification is poor or nonexistent.
Neither of the following examples involved me, but I was an interested contemporaneous observer of both.
Case study #1: Web application (buying portal). The app was designed with J2EE tools, and the Architect allowed the tools to automagically generate the schema that supported the app. Problem: The Architect did not consider that reports would need to be generated from the schema, some day. When it came time to write them, the task was horrific and nearly impossible, and the team almost failed. Who is guilty, management, for not specifying all the reports up front, or the architect, for not anticipating the need for reporting? The Architect, of course, blamed management; management, naturally, blamed the Architect.
Case study #2: A very arge commercial bank wanted a system for loan portfolio analysis. The Architect endured management displeasure over his long-ish timeline by designing a pseudo-language first, in which the team ultimately wrote the portfolio analysis package. The Architect did this because he envisioned massive downstream changes to the specification. Numerous changes to the specification then occurred over a two-year period, just as the Architect had predicted. Result: The Architect's company pocketed huge sums by bidding half of what the competition bid on the same project, and incurring almost zero cost, because the pseudo-language changes were so trivial to make.