Slashdot Mirror


How Do You Use UML?

christophe.vg asks: "We are currently investigating the feasibility of a new (open source) project and part of this study involves a scope definition of how people/developers currently actually use UML. So there it is: How do you use UML? Do you use it to have nice class diagrams to pin up to the wall so you/it just looks great or do you first model out every little detail into class and sequence diagrams before generating or writing even one line of code? Now for a moment, let's dream the UML dream. Do you think that in the future one could maybe even envisage software development where UML could simply replace all existing coding languages? One could argue that coding languages are merely formatting tools to implement the actual logic, which can be portrayed 'in a Unified way' using UML schemas. What are your ideas regarding the real merits of UML, currently and in the not so distant future?"

219 comments

  1. Code first... by DrJonesAC2 · · Score: 4, Insightful

    ...documentation afterwards. That's logic!

    1. Re:Code first... by chriseyre2000 · · Score: 2, Interesting

      UML is best used for informally descussing the design of existing/proposed code. Alternatively it could be used to document existing code.

    2. Re:Code first... by saden1 · · Score: 1

      UML diagrams is what we create to get ready for PDRs and CDRs. It's all fluff. I generally create a mental picture and jot down some notes of process flow and use cases before I start coding. Sometimes I use UML class diagrams to create my classes but since Eclipse is so easy to use I find myself doing this less and less.

      --

      -----
      One is born into aristocracy, but mediocrity can only be achieved through hard work.
    3. Re:Code first... by was_ms_now_linux · · Score: 1

      I agree - code first. After going through so many large projects where all the up-front dollars were essentially wasted due to the fact that chages are always made in the development cycle. When I think of UML diagramming, I think of the old-school Object Oriented Design approaches to client-server development and how it used to be fassionable to pay a close to a dozen high-rate contractors to philsoophize on the merits of alternate approaches to object design. Back in those days, cost was not an issue and every company thought they had the edge since they had all the OO visionaries huddled together in their conference room. Of course, things have changed and companies don't want to just blow money for the sake of blowing money. IT expenditures rarely increase revenue, so the focus should be on how to cut the cost of the plaform and the cost of the applications. Heavy use of UML is often the cause for outsourced efforts being as expensive as local development - boatloads of UML diagrams are normally required to properly instruct offshore teams. The new modern model is to cut out all non-value-add activities, including UML, and go from business user or func-req directly to source code development. Doug Hettinger www.SoftwareObjectz.com

      --
      http://www.softwareobjectz.com
    4. Re:Code first... by Anonymous Coward · · Score: 0

      don't let the coding standards police catch you.

      they will make you spend your holidays inserting comments.

  2. UML = OO Kool Aid by Anonymous Coward · · Score: 0

    Yeah, the more crap we add to the development process, the more we can slow it down enough to actually squeeze some requirements from the stakeholders before _all_ the coding is done.

    UML, XML, Six Sigma, CMM, yeah that will all help...

    1. Re:UML = OO Kool Aid by tanguyr · · Score: 2, Interesting

      That poor requirements problem is part of what's keeping your job from going to India. Once they've gone through the hassle of writing everything down as use cases ... they might as well fax it offshore.

      Think about that next time some guy from marketing drops by to ask for a new feature.

      --
      #!/usr/bin/english
  3. ANY language isn't 100% efficient... by macz · · Score: 3, Insightful
    There is too much fungibility in expression. I am noticing a trend to standardize on things in languages that is interesting. For instance, there appears to be a trend towards recognizing the differnece between the "assign" operator (=)and the "equality" operator (==). Most (useful) languages use the ! to negate... perhaps we are heading towards a unified syntax at least?

    Wouldn't Parrot, or similar approaches that let you code in whatever idiom you feel most expressive in, while compiling down to efficient, cross platform bytecode be the pentultimate achievement? You could add a module for UML and let those crazy Visio programmers write what they wanted while leaving the C Programmers alone?

    --
    ...But I digress. TREMBLE PUNY HUMANS!ONE DAY MY SPECIES WILL DESTROY YOU ALL!
    1. Re:ANY language isn't 100% efficient... by RAMMS+EIN · · Score: 4, Insightful

      ``Wouldn't Parrot, or similar approaches that let you code in whatever idiom you feel most expressive in, while compiling down to efficient, cross platform bytecode be the pentultimate achievement? You could add a module for UML and let those crazy Visio programmers write what they wanted while leaving the C Programmers alone?''

      Wouldn't really work. There's more to a language than syntax alone. Languages have fundamentally different ways of representing things. Think static vs. dynamic, classes vs. prototypes, objects vs. primitive types, first-class functions, tail call elimination, overloading, ...

      In the context of Parrot, problems are already arising from the way Perl and Python deal with things. We know from history how well calling conventions are adhered to...basically, C and assembly use one, C++ uses a bastardized variant, and beyond there, chaos reigns.

      Microsoft is on the right track with .NET, actually trying to adapt their CLR to languages it wasn't originally intended for, rather than the other way around. Yet, not even all of Microsoft's own languages for .NET adhere to all the specifications for interoperability.

      --
      Please correct me if I got my facts wrong.
    2. Re:ANY language isn't 100% efficient... by tfinniga · · Score: 1

      Are you saying that there's a single calling convention for assembly? Really?

      --
      Powered by Web3.5 RC 2
    3. Re:ANY language isn't 100% efficient... by garbletext · · Score: 1

      Could be wrong, but AFAIK, each type of assembly usually has only one calling convention. If it were otherwise, it wouldn't be much of a convention. Obviously, though, it can't be said that there is only one assembly calling convention, because every ISA is different enough architecturally for this to be impossible. I defy you to show me multiple calling conventions that are widely adhered within a single ISA

    4. Re:ANY language isn't 100% efficient... by Anonymous Coward · · Score: 0

      For instance, there appears to be a trend towards recognizing the differnece between the "assign" operator (=)and the "equality" operator (==).

      But that leaves so much ambiguous. Does = bind a name, or does it mutate a value? (The two have very different semantics, and should be kept separate.) And does == check structural equality or physical equality? (Both are useful tests, appropriate in different situations. Both should be available.)

      If that's the "unified syntax", forget it - I want something much better than that.

    5. Re:ANY language isn't 100% efficient... by Scherf · · Score: 2, Informative

      Actually there is no such thing as a "calling convention" in assembly itself. In x86 machine code a call is pushing the instruction pointer to the stack and jumping to the adress of desired function. I guess it's about the same in other machine codes (anybody know?)

      Deciding how to pass the parameters and the return code (the important things about a calling convetion) is up to the compiler. This can happen on the stack, in registers etc. in any order.

      This is why you have to use such things as __declspec in Windows. It says "This function expects its parameters to be on the stack, in the order they apear in the declaration and puts its return value in eax". The C compiler knows what to do then but assembly is to low level to give a damn.

    6. Re:ANY language isn't 100% efficient... by LWATCDR · · Score: 1

      "Wouldn't Parrot, or similar approaches that let you code in whatever idiom you feel most expressive in, while compiling down to efficient, cross platform bytecode be the pentultimate achievement? You could add a module for UML and let those crazy Visio programmers write what they wanted while leaving the C Programmers alone?"
      That would be bad. A companies depend on software and some type of control must be set up. Standards for languages, documentation, and even how the source code is stored. You never know when someone will leave and you never know when a temporary fix will end up becoming a core solution

      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
    7. Re:ANY language isn't 100% efficient... by jbolden · · Score: 2, Informative

      We know from history how well calling conventions are adhered to

      They are adhered to very well when provided at the operation system level very poorly when left as an option. VMS being a great example where calling conventions and complex datastructures are defined at the OS level. The result is that a C function is callable in Cobol, VAX Basic, Fortran... and vice versa.

  4. UML-ish by rmull · · Score: 2, Interesting

    UML is a language, not so different from C or Java. It's good at representing some things, like structure relationships and certian kinds of high-level sequencing. It's not so good at others, like complicated data stuctures or calculations. It would be silly to write a memory manager in UML.

    I use a bastardized form of UML on the whiteboard when I need it. It's not in any way official, just enough to get the point across. I occasionally will put that on the computer using visio, but again without much regard for form. I'm not one to think in UML itself, so all of the modeling tools that are designed around it tend to slow me down more than anything.

    I'm perfectly happy with my way of doing it, but maybe I just haven't seen the light. Could be that a few weeks of Rational "training" would reverese my opinions entirely. ;-)

    --
    See you, space cowboy...
    1. Re:UML-ish by kinema · · Score: 3, Insightful
      It would be silly to write a memory manager in UML.
      UML was never meant to be used for describing things like a memory manager. Algorithm design and development tools such as Matlab and Simulink are much more suited to this kind of task.
    2. Re:UML-ish by fmobus · · Score: 1
      I use a bastardized form of UML on the whiteboard when I need it.
      Me and some pals something like that, but on paper. We call that "paper modelling language".
    3. Re:UML-ish by mughi · · Score: 1
      I use a bastardized form of UML on the whiteboard when I need it. It's not in any way official, just enough to get the point across...
      I'm perfectly happy with my way of doing it, but maybe I just haven't seen the light.

      You're not alone here. Sounds like you're close to 'UML as Sketch' as touched on in comments here.

    4. Re:UML-ish by mqx · · Score: 1

      "It would be silly to write a memory manager in UML."

      You are just plain wrong. I've used UML to design and implement low level device drivers for embedded platform with C++ autogeneration. There's nothing in UML that causes it to produce bloaty code, and there's quite a lot of richness with the right tools (e.g. Rational ROSE) to customise the C++ code that's generated.

      This has nothing to do with UML, but has more to do with you as the designer: do you know how to design performance device drivers or not ? I've been around long enough to see device driver engineers try to write applications (bad move!) and vice versa (just as bad move) to realise that it's not about the technology, it's about the design approach.

      I don't think that it's about training either: it's about you actually doing some hard work and using the write design principles, which may require time and experience, but definitely does require an ability to make and learn from mistakes.

    5. Re:UML-ish by jgrahn · · Score: 1
      Tried Rational "training". It didn't help. I use UML
      • When they force me to. That has always, for me, ended up in a boring activity that wasted everybody's time without contributing very much to anything but the growth of Rational's bank account.
      • When I'm trying to understand source code. I draw rough sketches of class diagrams in my notebook, and focus on relationships and multiplicity (one-to-one, one-or-none etc). I don't bother with member names and stereotypes and all the thousands of esoteric details.
      • I imagine I could find use cases useful now and then, but only as a set of named textual descriptions of things that could happen, not sequence diagrams and all that pointless crap.
    6. Re:UML-ish by Skjellifetti · · Score: 2, Interesting

      I quit using RationalRose around v 3. It was simply too buggy. In fact, that is my complaint with most of the UML tools that I have tried. So are the UML tool makers using UML to design their own tools? If no, then the shoemaker's kids are going barefoot. If yes, then the bugginess of the UML tools is an indictment of UML. If using UML to design a UML tool doesn't help reduce the bug count in the UML tool itself, then why should we bother to use UML on other projects?

  5. Alphabet soup.... by jnik · · Score: 1, Informative

    Please folks, especially if you're doing an ask slashdot, try to either expand your TLA's early on or make them clear from early context. Until I got to the end of the blurb I thought this was about user mode linux...and now, of course, I have no idea what it is. Background links welcome.

    (this should answer the question of how I use UML...)

    1. Re:Alphabet soup.... by pg133 · · Score: 2, Informative

      From Wikipedia:

      Unified Modeling Language (UML) is a non-proprietary, third
      generation modeling and specification language

    2. Re:Alphabet soup.... by Safety+Cap · · Score: 1
      The general rule is the first time you want to use your Three Letter Acronym (TLA), you spell it out and put the TLA in parenthesis afterwards. From then on, you can use your TLA to your heart's content.

      This is one of the things an EDITOR (the real kind) will point out to the author. This being the Dot, you get what you get, so SDSUAFO.

      --
      Yeah, right.
    3. Re:Alphabet soup.... by coolhoot2447 · · Score: 2, Informative
    4. Re:Alphabet soup.... by mughi · · Score: 1
      Until I got to the end of the blurb I thought this was about user mode linux...and now, of course, I have no idea what it is.

      Well, I'm definitely not trying to troll here or anything, but in this instance I'd be willing to give the poster the benefit of the doubt on the TLA use here. Given the target audience (Slashdot tech-heads), and the prevalence of UML in the tech field (among other things there are literally hundreds of available books on the modeling language, but no easily found ones on User Mode Linux), it's not that unreasonable to assume that most would know the Unified Modeling Language, and that those aware of User Mode Linux would fall in the group that probably 'should' know about the UML.

      Of course, writing it out long-hand is always handy, and a few links sprinkled around could help.

    5. Re:Alphabet soup.... by roju · · Score: 1

      Not only is there a standard way in the English language to do this (using parenthesis after spelling it out), there's an HTML way to do it. Tada, the <acronym> tag.

    6. Re:Alphabet soup.... by mughi · · Score: 2, Interesting
      there's an HTML way to do it. Tada, the <acronym> tag.

      Well... if you want to get into pdeantic details... the <abbr> tag is probably to be favored. The W3C spec spells out the difference down in section 9.2.1. Of course, finding out which versions of which browsers support which tags is another problem altogether.

      BTW, I find the WDG's guides to be more technically accurate and helpful. Much of that could be due to their documentation being machine generated from the official DTD's and such.

    7. Re:Alphabet soup.... by cduffy · · Score: 1

      Not necessarily. UML is mostly useful to app-level programmers (and those who work with them), whereas UML is mostly useful to sysadmins and system-level programmers (with whom UML, to the best of my knowledge, has never really caught on).

      I'm at least a nominal member of all three sets, and I work much more with UML than UML.

  6. UML resources by AndroidCat · · Score: 1

    Starting with the obvious. Any other good places to direct the novice and experienced?

    --
    One line blog. I hear that they're called Twitters now.
    1. Re:UML resources by oostevo · · Score: 1
      I find Borland's tutorial particularly useful.

      (I think it's referenced on the UML website, but I'm not sure - I haven't visited it in a while).

      --
      In soviet russia, You ask not what country do for you, but what you do for country!
      Oh wait...
  7. I use it to select projects by RAMMS+EIN · · Score: 5, Interesting

    The way I use UML is as way to select projects I want to participate in. If it uses UML, I'm out. The correlation of using UML with rigid authoritarian organization and fighting with "productivity enhancers" rather than developing software is too high.

    It's a pity, because visualizing the structure of a program can be a Good Thing. Still, the idea behind UML isn't exactly new, and does not seem to be very successful historically.

    --
    Please correct me if I got my facts wrong.
    1. Re:I use it to select projects by Anonymous Coward · · Score: 0

      Mod parent up, these tools that management, vendors and "authorities" are travelling in a herd and companies like Rational and Niku are laughing their asses all the way to the bank.

    2. Re:I use it to select projects by Anonymous Coward · · Score: 0

      dang
      ... [are currently pushing (without acknowledging that these are mostly reskins of previously failed software development paradigms)] are traveling in a herd

    3. Re:I use it to select projects by Anonymous Coward · · Score: 0

      That's pretty much my opinion on that "six-sigma" philosophy they push on companies like Sun Microsystems.

    4. Re:I use it to select projects by epischel · · Score: 1

      I partly agree. I've seen misuse in various projects : "Put at least one diagram of each diagram type (class, sequence, deployment etc.) in the spec cause we promised usage of UML!", "use case 'Enter street address', use case 'Enter name', use case 'enter birthday' instead of use case 'search for single person'". UML promised to standardize modelling/visualization but to me it seems not two people can agree on its specific purpose.

    5. Re:I use it to select projects by WaterBreath · · Score: 1
      This doesn't really address the hyoptheticals of the original post.

      Yes, UML tends to encumber things right now because so often it's the managers that use it without really knowing what it's for. Or the managers order the developers to use it always, even for projects that don't need that level of architecture (or micromanagement, depending on how it's used). Another part of the problem is that humans are relatively lazy by nature, and if we can skip that extra step of preparation and still get a reasonable result, we will do so.

      However, the issue raised is whether we can turn that preparation step into at least an early development stage. Rather than having management hand down object level designs from on high, or forcing what appears to developers to be extra work with little reward, this would (theoretically) allow documentation and implementation simultaneously. The algorithm representation itself would be its own documentation.

      Sounds great at first blush. Could mean less effort on documentation in later stages. But there is a problem. The languages we traditionally use for algorithm expression (i.e. Java, C++, Python, what-have-you) are tailored for just that: algorithm expression. This need not be in human readable form. Any program language must do this at minumum. When you start demanding more than vestigial documentation from the same medium, however, it can become belabored. The language must perform two functions, and it must perform them both well, or it will not be used. It's the nature of information that if you want to pack multiple dimensions of information into the same representation space, that the structure of the representation is going to become more complex. And odds are that the performance in either of the two dimensions will not be as high as they would be separately. That's the problem. Unless (and maybe even if) UML were rigorously revamped or re-created with this exact purpose in mind, odds are that the documentation ability of the language would not be as robust as we would like it, and more work would still be necessary at other stages. Simultaneously, the algorithmic expression capability would be similarly limited. For example, detailed logic would be very difficult to represent, and process-style algorithms (i.e. algorithms that don't lend themselves better to flowcharts than UML) will most likely be difficult to represent, and ugly when achieved.

      It's a nice idea, but it seems to me like it's probably better to keep the implementation and the documentation relatively separate, so that the advantages of each can be fully realized without belaboring and limiting the use of one or the both.

    6. Re:I use it to select projects by NitsujTPU · · Score: 1

      Here here!

      It's not that there's anything fundamentally wrong with UML, but UML seems to be the lowest common denominator used when slinging around bullshit.

      Hey, if you don't want to learn how to program, but you want to tell a bunch of programmers what to do, learn how to draw squares with arrows off of them and tell those no good programmers what to do anyway!

    7. Re:I use it to select projects by GoofyBoy · · Score: 3, Insightful

      >If it uses UML, I'm out.

      Its a communication tool. Thats all.

      Its like saying "If the business analyst wears a white shirt and tie, I'm out." or "If the specifications are in New Times font, I'm out."

      --
      The surprise isn't how often we make bad choices; the surprise is how seldom they defeat us.
    8. Re:I use it to select projects by Anonymous Coward · · Score: 0
      "If the specifications are in New Times font, I'm out."

      Well, that's a good point isn't ? Except when typing with the monitor switched off, every sane person changes the font to something like verdana. If someone uses New Times, he/she obviously doesn't care for the reader. Do you want someone in your team who doesn't care about producing readable documents? No ofcourse not.

    9. Re:I use it to select projects by dtfinch · · Score: 1

      Unless they're talking about printed fonts. For some reason, serif fonts are generally more readable in print but not on the screen.

    10. Re:I use it to select projects by Anonymous Coward · · Score: 0

      The reason is dpi. Between a high quality monitor and a high quality printer you are looking at about an order of magnitude difference.

    11. Re:I use it to select projects by Anonymous Coward · · Score: 0

      Here here!

      "Hear, hear!".

    12. Re:I use it to select projects by Hognoxious · · Score: 1
      The languages we traditionally use for algorithm expression (i.e. Java, C++, Python, what-have-you) are tailored for just that: algorithm expression. This need not be in human readable form.
      Any high level language is human readable. Whether it's human understandable depends largely on the individual programmer.
      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    13. Re:I use it to select projects by mqx · · Score: 1

      "Its a communication tool. Thats all."

      I think you're wrong: it's a design tool as well (you could be pedantic and say that it this also makes it a communication tool, but come on!). Seriously, UML as an OOA/OOD helps you scope out and bound the size and complexity of the design, so you get a clearer idea of what kind of time/effort it'll take to realise, and what order of magnitude bugs/issues you'll have to deal with later.

      If you're only using UML as a communication tool, you're seriously underusing it. It's like buying a TV and using it to tune into FM radio only.

    14. Re:I use it to select projects by NitsujTPU · · Score: 1

      There's that terrible grammar of mine again.

    15. Re:I use it to select projects by WaterBreath · · Score: 1
      "Human readable" may not have been the most accurate phrase, but I think in the context of everything else I wrote, it was failry clear what I meant.

      It is hard to look at a "large" C++ code listing and quickly get a good idea of the architecture of the program without reading and analyzing the entire listing. Ideally, a UML-ish algorithm expression language would allow this understanding to be achieved quicker by browsing through graph-type representations of the program at each of a few different levels. But as I said, there would be tradeoffs for achieving this level of documentation robustness (or as an old high school friend liked to call it, "robustity").

    16. Re:I use it to select projects by GoofyBoy · · Score: 1

      >UML as an OOA/OOD helps you scope out and bound the size and complexity of the design, so you get a clearer idea of what kind of time/effort it'll take to realise, and what order of magnitude bugs/issues you'll have to deal with later.

      It doesn't to it by itself, like what an compiler does. It takes a person to read it an then extract this sort of information from a standarlized form. So UML is a communication tool.

      What does UML produces? Documentation, which is a communication tool.

      --
      The surprise isn't how often we make bad choices; the surprise is how seldom they defeat us.
    17. Re:I use it to select projects by koreaman · · Score: 1

      /me is using serifed fonts to read /. right now, and I can report that they are easier to read than sans.

    18. Re:I use it to select projects by Bingo+Foo · · Score: 1

      I was thrown for a loop when I saw the code snippets in this book all done in Times Italic, but I quickly got used to it, and I find it very natural now. Obviously I don't use proportional width and/or italic fonts in my editor, but in a book it works well.

      --
      taken! (by Davidleeroth) Thanks Bingo Foo!
  8. What? by fm6 · · Score: 2, Funny

    An "Ask Slashdot" that provokes an interesting discussion? That's not allowed! Are we all out of clueless lame-ass questions, or what?

    1. Re:What? by skinfitz · · Score: 1

      I think people might be getting the message and searching Google first.

  9. What's a TLA? by FreeLinux · · Score: 2, Funny

    You should follw your own rules. I think you are right. But, I don't really know what a TLA is so, I'm just guessing?

    1. Re:What's a TLA? by buysse · · Score: 3, Informative
      A TLA is just another TLA, of course.


      It stands for "Three Letter Acronym."

      --
      -30-
    2. Re:What's a TLA? by spikedvodka · · Score: 1

      of course, then you have the ETLAs
      "Extended Three Letter Acronyms"

      --
      I will not give in to the terrorists. I will not become fearful.
    3. Re:What's a TLA? by Anonymous+Brave+Guy · · Score: 1
      It stands for "Three Letter Acronym."

      Except that most TLAs are abbreviations and not acronyms, including this one...

      See also: SA (shortened abbreviation), ETLA (extended three-letter abbreviation), DETLA (doubly-extended three-letter abbreviation), etc.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  10. I avoid it like the plague by Will_Malverson · · Score: 3, Interesting

    In late 1998, I was working for a small company that decided to explore this new-fangled UML. A group of about 10 of us took a week-long course on it, and learned the basics of it. We decided, as a practice project, to re-implement one of our small subprojects with UML. We spent a few hours a week working on this.

    When I left the company in April of 1999, we had made no signfigicant progress on the project.

    1. Re:I avoid it like the plague by jnana · · Score: 1
      Well, I hate UML as much as the next guy, but a few hours a week is not the way to accomplish anything significant!

      If you put all those hours into x number of 10-hour days, on the other hand, you would certainly have accomplished more.

    2. Re:I avoid it like the plague by Anonymous Coward · · Score: 1, Informative
      You design with UML. You don't implement with it.

      Do you have a clue? Few hours a week doing anything for 5 months doesn't get much done. Believe me.

    3. Re:I avoid it like the plague by mqx · · Score: 2, Insightful

      You admit that this was your first experience with UML, and by the sounds of iy, you didn't get it right. Can you blame UML, or can you say that it was because it was a first project and so on. Without knowing further details, I think your attitude is bad: you had one bad experience and have let it cloud your judgement for the future. Plenty of other people have good experience with UML, whether on first or subsequent attempts, which is testimony to the fact that it does work: but of course, UML is just one part of a whole complexity of issues in a project, and perhaps it was one of those other issues that caught you out. UML isn't a silver bullet, and like most software technologies, you can't expeect it to save the day on first use: time, patience, experience and hard work bring the results.

    4. Re:I avoid it like the plague by Brandybuck · · Score: 1

      We decided, as a practice project, to re-implement one of our small subprojects with UML.

      In the immortal words of former California gubernatorial candiate Gary Colemen: "What the fsck you talking about Willis!" You don't implement anything with UML. Duh!

      --
      Don't blame me, I didn't vote for either of them!
  11. Not so much by miu · · Score: 2, Informative
    Most projects seem to wind up with some UML for the specifications and use cases, high level architecture diagram with no particular modeling language and UMLish whiteboard discussions between teams and individuals working on interfaces.

    The only time I see formal UML is when it is generated by a reverse engineer tool that spits out UML for what has actually been coded.

    If there were some actual useful UML tools I might use it a bit more, but as it stands I don't much care for any of the diagraming tools that are available.

    --

    [Set Cain on fire and steal his lute.]
    1. Re:Not so much by lphuberdeau · · Score: 2, Interesting

      My major problem with UML actually is that the tools to design it are a pain to use. I never saw one that would feel as easy and natural to use as pen and paper is to draw structures. I do plan my structures, patterns, class names, responsibilities before starting to code, but I just hate using UML tools.

      Reverse engineering tools are nice because they are quick to use but the results are either too details or not precise enough. Relations are usually association, extend or implement. UML has a whole lot more details and those tools seem to ignore them unless you set them manually, which is what you wanted to avoid in the first place.

      I remember working on a project where we made the entire structure before writing a single line of code in UML. We made it all as a team and all agreed on it. The first guy to actually started codiing it totally ignored what we made. Great! We simply wasted time!

      As a side note: I'd be very glad to see a UML editor that is actually aware that paper exists. I just love the fact that Rational Rose has no print preview and won't tell you where the page ends. Want to print? Guess and adapt until it looks fine. As a plus, it has no image export. This is really what you get for a few thousand dollars application.

      --
      Qui ne va pas à la chasse n'a pas de gibier
      PHP Queb
    2. Re:Not so much by Hognoxious · · Score: 1
      My major problem with UML actually is that the tools to design it are a pain to use. I never saw one that would feel as easy and natural to use as pen and paper is to draw structures.
      Maybe the tools were designed using UML and they spent more time struggling with the diagrams than thinking about the interface?
      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    3. Re:Not so much by gstoddart · · Score: 1
      I remember working on a project where we made the entire structure before writing a single line of code in UML. We made it all as a team and all agreed on it. The first guy to actually started codiing it totally ignored what we made. Great! We simply wasted time!


      Well, because at that point, unless your UML tool is going to spit out its own code, the poor sod who has to try and write code that matches an UML diagram is in for a very tedious job of defining and structuring in this way. Unless it's going to help you a lot further along, translating into actual code feels like a disconnect.

      I've tried to use UML to define higher-level descriptions of stuff that I have in place, but I simply find when you get all the way down to the nitty-gritty parts of writing code, I find it awfully difficult to relate the UML blobs with for loops and function calls and other practical considerations of writing code.

      It's useful for expressing some things, but I find that it just feels like by the time you get down to the details it's cumbersome and doesn't seem directly applicable to the task at hand.

      Everyone treats it and other things like magic bullets which will suddenly produce clean, precise code which can be maintained. My experience has always been to spend forever playing with the modelling tool and then realize it's been nothing more than mental masturbation, or at best a good starting point to write the actual code.

      --
      Lost at C:>. Found at C.
    4. Re:Not so much by mqx · · Score: 1

      "I remember working on a project where we made the entire structure before writing a single line of code in UML. We made it all as a team and all agreed on it. The first guy to actually started codiing it totally ignored what we made. Great! We simply wasted time! "

      That's not a problem with UML, but with your team: that guy sounds completely unprofessional -- i.e. he agreed to a consensus, and then ignored it, which could happen in any circumstance, not just because UML was there.

    5. Re:Not so much by angel'o'sphere · · Score: 1

      There are several tools which are easy to use:

      Java/Crossplatform
      Together from Borland (for C/C++/Java)
      ObjectDomain from www.ObjectDomain.com, for C++/Java/Python
      MagidDraw/UML from www.nomagic.com for Java/C++

      Windows (and Linux with Crossover)
      Enterprise Archytect from www.sparxsystems.com.au

      Together is extremely expensive (except for the Eclipse plugin version, or was it teh Visual Studio .NET version ... )
      The others are quite cheap, where Enterprise Architect give you surely the biggest bang for the buck.

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  12. we don't by smejmoon · · Score: 1

    1st try it on the sheet of paper
    2nd try it on the blackboard

    When solution of problem is clear, you can put it in computer. Whatever way you like, because you understand it. Even UML works.

  13. UML is useless by Jerf · · Score: 4, Insightful

    UML is useless because it can largely not be meaningfully verified, kept up to date, or executed. As a communication language in the middle of a design session a simplified version of it has a place, but there's little point in trying to drive development with it.

    I can't point to a project that does everything UML tries, only it works, because state of the art has not advanced there yet, and anyone telling you otherwise is selling you something, be it software or an agenda.

    But I do know one thing that you must internalize: If it doesn't execute, automatically, it won't be kept up to date.

    The best thing I've found so far is a strong coding style that emphasizes readability above most everything else (none of this "np_doSCRTtrd" crap, give me "mainWindow" or something... even in C++ where this is strongly counterculture), comments for why the code is doing what it is doing, and unit tests to provide and verify specification compliance.

    Nope, that's not complete; it is difficult to borderline impossible to unit test everything. But this will take you far past anything UML can do reasonably, so it's a start. (I'm inclined to think the way forward is to make more things more testable; while unit tests have problems with multithreading even in theory, a lot of the practical problems one encounters comes from a lack of testability built into libraries. The canonical example of this is GUI libraries; there is no fundamental reason GUIs should be hard to test... if you could post events to simulate anything the user might do, that alone would nearly be enough, and you'd think this wouldn't be hard...) It's just the best I know, and, like I said, as far as I can see it handily defeats UML in every way that matters to me, so the fact that it doesn't fulfill the promises of UML doesn't bother me, especially as I'm not convinced anything can.

    1. Re:UML is useless by _pruegel_ · · Score: 1

      I don't actually understand why this was modded insightful. UML is not useless just because it will not be verified or executed. We use UML to explain certain structures in our code like patterns or the stuff that users of our frameworks will need to understand. Usually these are class diagrams or simple use-case diagrams or collaboration diagrams. There will be at most 10 classes in it and there is no need to actually verify(prove) or execute it. And yes - one has to keep it up to date like any other documentation.

    2. Re:UML is useless by digitalyak · · Score: 5, Interesting
      But I do know one thing that you must internalize: If it doesn't execute, automatically, it won't be kept up to date.

      I'm on a project that is using Executable and Translatable UML (xtUML) for developing embedded firmware. The target is an 8-bit microcontroller.

      Our software process involves doing an extensive requirements analysis phase. Next, we break the problem down into domains, which are further anaylyzed. Finally, we begin work on the class models and state models.

      The xtUML methodology includes precise semantics, which allow it to be directly translated into C using off-the-shelf compilers. Or, you can be brave and write your own model compiler to directly translate your models into the target assembly.

      There is some high-level action specification language code which is written for the state actions and instance based operations, but besides that, no coding is required.

      Check out this site for some xtUML information: http://www.projtech.com/

    3. Re:UML is useless by obobo · · Score: 2, Insightful

      That's a good point: state machines are often better expressed as diagrams than as code, and automatic translation of them into code is not terribly difficult. If your problem fits well into a state machine framework (some embedded work, network stack, etc) it can be very useful.

      While most people think of class hierarchy diagrams when they think of UML, but there are a bunch of other (unrelated, really) types of diagrams that are under the UML umbrella as well.

    4. Re:UML is useless by Anonymous Coward · · Score: 0

      That doesn't mean you're not writing code. You're just writing code in a strange quasi-declarative graphical programming language.

      Personally, I avoid UML because I tend to data-model relationally then build my program around that, and UML is completely oriented towards OO weenies.

    5. Re:UML is useless by mqx · · Score: 1

      I think you are just plain wrong, and I've actually used UML on several projects: just out of curiosity, what kind of experience do you have to back up your claims, have you used UML on actual projects, or worked near/with teams that have, are are just spouting a lot of uninformed garbage? I would mod you down if I could.

    6. Re:UML is useless by jgrahn · · Score: 1
      AOL, except on two points:

      If it doesn't execute, automatically, it won't be kept up to date. --- My man pages, Python docstrings and doxygen comments aren't executable. (Anything beyond that, such as an API guide as a Word document, I don't trust.)

      none of this "np_doSCRTtrd" crap, give me "mainWindow" or something... even in C++ where this is strongly counterculture --- That crap isn't C++. C++ on Windows, more likely.

    7. Re:UML is useless by angel'o'sphere · · Score: 1


      UML is useless because it can largely not be meaningfully verified, kept up to date, or executed.

      Thats wrong. There is executebale UML, which is executed. And all UML tools provide code generation, for the generated code you can write unit tests. And finally there is MDA (model driven architecture) which allows you to generate the code how you want (UML tools generally export into XMI which is XML and you use XSLT or meta class driven code generation on that).


      The canonical example of this is GUI libraries; there is no fundamental reason GUIs should be hard to test... if you could post events to simulate anything the user might do, that alone would nearly be enough, and you'd think this wouldn't be hard...)

      then use a decent programming language, like Python or Java ... all GUI libraries in those languages support that :D

      I'm pretty sure if you use a decent C++ GUI library ... erm Qt? You get that as well.

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    8. Re:UML is useless by erinacht · · Score: 1

      > or executed...

      actually UML can be executed - creating verifiable diagrams - where the requirements are validated and screens are created and verified by business people during requirements phase. This is the crux of MDA (model driven architecture).

      One company I know of that takes XMI input from XDE/Rose/RSM and creates an executable model is Xactium.

      They have flash demos for those interested. (yes, that's eclipse!)

      Check out their Free Book on metamodelling (it's good if you are insomniac or acronym obsessed!) from Xactium's website (free reg required)

  14. Insightful by RAMMS+EIN · · Score: 4, Insightful

    At least somebody should mod parent Insightful. You can't fully design your program in advance, because you're always going to run into issues, and because the requirements will be different when the implementation is done.

    This is exactly the trap most UML users fall into, which is why I avoid UML like the plague. Design and document as you code. Hardly any project is ever finished, and the design and documentation shouldn't pretend otherwise.

    --
    Please correct me if I got my facts wrong.
    1. Re:Insightful by M1FCJ · · Score: 5, Insightful
      You might not like it but XP methodology recommends you design first, design the unit test first, then code. This doesn't mean you are not going to change your design but at least you should start with something in your mind. UML is just a tool, if you don't need it, don't use it. Most programmers are not that good at writing code as it goes.

      Documenting code? Hah! :-)

    2. Re:Insightful by nado · · Score: 1

      You should read about XP (extreme programming)...

      You're right that the initial idea is always different after seeing prototypes. But for this exact reason you shouldn't document your code. Code should be disposable, so don't waste time writing other than what the computer needs.

      If you're thinking "oh my god, how can you do without documentation?!"... Well, instead of calling your class A and writing in the documentation "This is a class to represent animals", why don't you name your class Animal instead? Same for methods... Don't be afraid to use very long method names that clearly explain what they do. Don't feel like typing long names? Just use short ones and refactor it when you're done. Eclipse has really good refactoring features...

    3. Re:Insightful by Lordrashmi · · Score: 1

      I agree with you about using descriptive class and method names, but documention is still appropriate. Your code should be self documenting but sometimes a one line comment can make things easier to read.

    4. Re:Insightful by anomalous+cohort · · Score: 1
      This is exactly the trap most UML users fall into

      UML is a notation system, not a methodology. The original poster is basically asking what methodology do /.ers subscribe to in their use of UML.

      Here is an example. The RUP methodology prosribes that UML documents are living, iterative, and incremental. They are living in that you go back and update the UML diagram when you discover a change in the design while coding the classes. They are iterative and incremental in that you start a diagram with a focus on the conceptual level. For class diagrams, you only show the public parts of the interfaces and you don't bother with the housekeeping parts like collection classes or the full signatures of methods. You review and make changes on this level. Later, you refine and add more detail. You keep doing this until you are ready to implement. After implementing, you revisit and make changes based on what you discovered during implementation.

    5. Re:Insightful by GlassHeart · · Score: 2, Insightful
      This is exactly the trap most UML users fall into, which is why I avoid UML like the plague. Design and document as you code.

      Just because design cannot fully predict every detail and requirement change doesn't mean that the opposite extreme is better. The problem with your suggestion is that when working in a team, there are design changes that you simply cannot make without breaking somebody else's code and assumptions. So clearly, design cannot be entirely static after some "begin coding" day, nor can it be entirely fluid until the "burn master CD-ROM" day. The answer must be somewhere in the middle, depending on how fluid your requirements are expected to be, and other factors. Custom software with requirements in contract form and change penalties are less likely to change, for example, and may benefit from more up-front design.

      Even if you don't subscribe to the formal methods that UML often comes with, there's still value in adopting UML the language. Too often, documentation are built with custom symbols, terminology, and styles that are neither comprehensive nor easily understood. What UML brings are standard classes of diagrams (so that you know what kinds of documentation you might be missing) as well as standard symbols for describing them. At worst, using UML symbols will be no worse than inventing your own.

      The holy grail of these methods is to merge design and documentation into a single entity, from which code can be automatically generated. This guarantees that the documentation matches the design and the code. There is no assumption that the design must be static, so I don't know where you get that impression.

    6. Re:Insightful by LoztInSpace · · Score: 1

      All well & good, but there is usually more to a program/system/product than the code.
      Business analysts can't generally read code. Database guys can't generally read code. Support guys can't generally read code. UML provides a mechanism to document relationships & interactions much more clearly than code. A few examples from a system I am working on now:
      How are the client & account related?
      Can clients share an account?
      Does the portfolio belong to the client or the account?
      What happens to the portfolio when a stock is sold, what actors are involved, what events occur?

      Each of these can be cleanly described on a single screen, understood by non-technical people.
      This whole XP thing, while an effective development method tends to overlook the fact that code is only part of the story.

    7. Re:Insightful by cybergrue · · Score: 1
      A few months back, I went to a IBM open house where they talked about UML2. Anyways, one of the things that was hinted at, but not mentioned, was how close IBM is to automatically generating working programs from just the UML documents. Now of course not all programs will be able to be created just from UML diagrams, but most business apps will probably be able to be created this way rather then written. To basterdise a phrase from Marshall McLuhan, the design will be (is) the program.

      The interesting thing about UML that seperates it from previous attemts to "get rid of the programmers" (COBOL, Smalltalk, etc.) is that it is being marketed to the designers for internal use as a design tool, and not to managers as a product "so easy to use, you can fire your programmers now." Previous attempts to have endusers program themselves faled universally, and usually more programmers were needed. However, this time its different. Most of us have realised that most end users don't really know what they need, and even if they do, have a hard time articulating it in a form that can be used to create a program. This is where the Analysists and Designers/Architects are needed, to turn these fuzzy specifications into concrete designs that are then programmed. If and when this level of code generation becomes practical, then the end result will be the elimination of most of the code monkeys.

    8. Re:Insightful by chazman00 · · Score: 1

      Just because design cannot fully predict every detail and requirement change doesn't mean that the opposite extreme is better.

      I couldn't agree with this more. Civil Engineers design and plan how roads will be built, yet there are still issues that need to be overcome during construction. Yet a solid plan helps avoid many of these costly issues.

      As software increasingly expands to utilize more and more powerful hardware, software becomes increasingly complex. Planning and design are more critical now than ever.

      To answer the parent, UML is a tool to help plan and understand a system. I use it to determine users interactions with a system (Use Cases). Who is using each part. What do they need? When do they need it? What are the similarities between user interactions? Can I abstract any of their processes?

      I use it to determine the key objects of a system (Class Diagrams). I use it to model the most tricky of system interactions (Activity Diagrams and Sequence Diagrams). While I'm doing these I look at my objects, users, and processes and try to abstract similar elements and simply interfaces and code.

      Those who debate the usefulness of UML are wearing the same hats of people who debated the usefulness of Object Oriented Design 15-20 years ago. Unfortunately, it's not for the uninitiated.

  15. Rarely by Apreche · · Score: 5, Interesting

    I rarely use UML. Sometimes in class they force us to use it for things, even grade us on it. But its just a waste of time really. The problem is that some people use UML to layout the design for their application in full, or part, and then build the software following that design. But inevitably the design goes through a thousand changes. Most often a simple flow chart is quicker to make and more useful for this purpose.

    What UML IS good for is communication. If you have a software design and you want to communicate that design to someone else, then UML is a handy tool. It's also useful for division of labor. You can make UML for the project and divide up the pieces of the diagram each programmer has to do. But in this situation you're really just commicating the design to each other, which is all UML is really good for.

    The idea that one day we can just make UML and not have to code in C or something is ludicrous. If we move away from "real" coding it will definitely be to a much more abstract tool than UML which will write code for us. You can see it happening already like all the drek that Visual Studio comes with.

    --
    The GeekNights podcast is going strong. Listen!
    1. Re:Rarely by Anonymous Coward · · Score: 0

      I rarely use UML. Sometimes in class they force us to...

      I don't know which is funnier: That a student felt like he had something useful to say about the use of UML on real projects, or that moderators modded him up for it!

      Not that students are stupid, but they lack experience, pretty much by definition. If they had experience they wouldn't be bothering with school.

    2. Re:Rarely by Anonymous Coward · · Score: 0
      Not that students are stupid, but they lack experience, pretty much by definition. If they had experience they wouldn't be bothering with school.
      True, but this one was right! Maybe it was just pure dumb luck.
    3. Re:Rarely by GlassHeart · · Score: 1
      Most often a simple flow chart is quicker to make and more useful for this purpose.

      Then, all respect due, your projects are too simple. Flowcharts cannot represent state, communication between objects, threads, or a number of other entirely necessary concepts. A flowchart has trouble representing anything much more complex than a Unix-style command-line application.

      Also, if you find that a particular diagram or description style survives requirement changes better than another, it's likely because it was vague to begin with. Design, just like code, is supposed to be specific enough to not survive requirement changes unscathed. Good designs allow you to fulfill the new requirements with fewer or more localized changes, but one that doesn't need to change was not a good design at all. Think about it: you could've implemented either version and still satisfied the design!

    4. Re:Rarely by Apreche · · Score: 2, Interesting

      If they had experience they wouldn't be bothering with school.

      Hmm, so all those people who get mad programming skills in high school shouldn't go to college. You know, because you can just walk right into the industry with no college degree because its fucking 1996. Riiight.

      Also, I happen to go to RIT where experience is part of the education. We have something called the co-op program where you are required to get 40 weeks of real and paid industry experience before they let you graduate.

      Student with experience.

      --
      The GeekNights podcast is going strong. Listen!
    5. Re:Rarely by angel'o'sphere · · Score: 3, Interesting


      The idea that one day we can just make UML and not have to code in C or something is ludicrous. If we move away from "real" coding it will definitely be to a much more abstract tool than UML which will write code for us. You can see it happening already like all the drek that Visual Studio comes with.

      That day has allreay come.

      Read about UML/MDA and xtUML. Probably you should just search on sourceforge how many MDA tools exist TODAY.

      Not that am I a hughe friend of MDS ... but 'm a hughe friend of UML :D


      I rarely use UML. Sometimes in class they force us to use it for things, even grade us on it. But its just a waste of time really.


      So I asume you are still at the university? So you only make toy projects there which are done in 3 monthes and you do them as one person or two peson or three person team?

      Of course you then have the fealing you "do extra work".

      But no offence, I guess you have not long enough programming experiance? If you had, you had concepts in your mind which are difficult to talk about, but easy to sketch with UML.

      Did you ever make a project with 10 people (programmers) and about 5 other stakesholders over a period of 3 years? (Or more people and more years?)

      As soon as you have done that you know why you *need* UML.

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  16. UML as a Sketch by Avalonia · · Score: 2, Interesting

    At the company I worked for until very recently we mostly used 'UML as a sketch' on the whiteboard as a way of turning our ideas into something concrete we could implement. Simply having a standardized set of whiteboard notations hugely improved the effectiveness of communication between team members.

    We mostly used class and sequence diagrams, the latter being very effective for dealing with multithreaded code.

    To a much lesser extent we used computer generated UML when reverse-engineering with tools like Together to understand older, pre-existing code.

    We didn't get into formal use of UML for requirements and design in our small team.

    1. Re:UML as a Sketch by mughi · · Score: 1

      At the company I worked for until very recently we mostly used 'UML as a sketch' on the whiteboard as a way of turning our ideas into something concrete we could implement...

      I'd definitely have to strongly second this. I've seen this boil out from working at a few different companies. Those who used UML most strongly also seemed to gain less from it (and one architect seemed amazed and could not even fully grasped the concept that I'd been doing OO design for years without any UML at all... even when many projects I worked on even predated UML).

      And it's not only my professional opionion and experience that lend support to this. Martin Fowler himself professes this position, and explains it fairly well throught UML Distilled

      .
  17. We try to use UML by ShatteredDream · · Score: 1

    Emphasis on the word, try. Most of the time we end up doing it the old fashion way which is that when someone wants to illustrate a complex idea instead of using a neat little UML diagram that half the team will spend most of the meeting trying to figure out, we just draw it on a board with a marker. It's low tech, but it works.

    We unfortunately bought into the whole "Rational" line of products and they have turned out to be horrible. It's had many of us pining for CVS and bugzilla.

  18. Old idea, never really worked... by Anonymous Coward · · Score: 0

    The idea of having nice pictures of the code has been around for a long time - from flowcharts.

    But keeping this pictures in sync with the code requires a lot of effort. In most codebases I have seen, even the comments are not in sync with the code, so you can forget the design being in sync with code.

    For UML there are some tools which offer round trip engineering, so it can be less overhead than updating a a design doc every time.

    The negative sides I see are
    - common tool, rational rose, is a bloated broken, buggy pile of doo.
    - The tools are too costly.
    - The UML guys seems to have taken a decent idea and mixed in a lot of unnecessary bullshit, class & sequence digrams are okay but anything beyond that will be pain.
    - Actually decreases productivity for people in the project, but useful for a new guy coming in.

    1. Re:Old idea, never really worked... by _pruegel_ · · Score: 1

      The difference to flowcharts is that UML is a formal language. In the company I work for every engineer understands at least enough of UML to understand a class diagram (aggregation, composition, deduction...). Keeping the documentation up to date is simply something every engineer should do anyway. We use UML only for small but very interesting/critical parts anyway so that is not a problem. Drawing UML diagrams for something anybody would understand anyway is wasted time.

  19. For discussion by NateKid · · Score: 2, Interesting

    When teaching coding classes, I usually use UML to demo basic object interactions and class structure on the blackboard. If I instead write a bunch of code I wind up receiving glazed looks from my students. It takes several days to teach the syntax of OO programming to students but I can have them drawing /comprehending rectangles in a matter of minutes.

    For my own programming projects, I usually use UML to code stuff up with pencil and paper on the bus and I then "translate" it to actual code once I get home.

  20. U-M-L!! U-M-L!! by robogymnast · · Score: 1

    I use it mostly when I cheer on my UMass Lowell Riverhawks at Hockey Games...and when i check my student email... and when I walk to class... and..oh wait, is that not what you meant? :P

    --
    unzip ; strip ; touch ; grep ; find ; finger ; mount ; fsck ; more ; yes ; fsck ; umount ; sleep
  21. Even English isn't 100% efficient... by Anonymous Coward · · Score: 0

    "Penultimate" means "next to last." Maybe you just meant the ultimate achievement?

  22. Visual Programming Language by jhoger · · Score: 2, Interesting

    It sounds like what you are really interested in is not UML but VPLs, Visual Programming Language (not to be confused with things like Visual Basic which is a fairly normal programming paradigm with some RAD gui development tools built in).

    Programming with boxes and wires is the way you code in such languages. Anyway google for visual programming language and you will find lots of stuff. The VPLs also allow you to draw your state machine for a component visually. This permits writing your entire application visually, as opposed to just connecting up components.

    I think one of these days we'll create all applications in this way. What could be better for an architect than having your entire application as a very clear, always up-to-date diagram, which can be zoomed in or out to get whatever level of implementation detail you like?

    1. Re:Visual Programming Language by sr180 · · Score: 1
      These have been around for quite some time... And generally they suck. Parity Software's (Now part of Intel) VOS is an example, and personally, I'd much rather just code.

      --
      In Soviet Russia the insensitive clod is YOU!
    2. Re:Visual Programming Language by lachlan76 · · Score: 1

      I've never tried any PC VPL, but I've had a go with Lego MindStorms (simple, I know) which use something like you describe. I found that it quickly becomes unmanagable, is hard to use, slow, and inflexible.

      When I say that, what I mean is, assembly would have been much easier than it. Which says enough I think.

    3. Re:Visual Programming Language by jhoger · · Score: 1

      I agree they have been around for a while, and most do suck.

      I think they could be better, and they have gotten better over time. LabView I think is a better example, with the ability to make components and state machines visually.

      The human brain is geared more towards processing of visual information than it is textual information. I think to reach our full potential as programmers that's where we need to go.

      Also I think having a visual representation of the design which is always up to date because it is also the implementation, makes emphasizing research in this branch of programming languages worth it.

    4. Re:Visual Programming Language by jhoger · · Score: 1

      Well I think that says something, but I don't think that is somehow a proof that research along this line is a dead-end. All it means is that none of the variants you've tried are a big success.

      There's no reason that VPL should be hard to use, slow or inflexible. There are certainly implementations that are.

      It's a young field of study that hasn't got much attention, and I don't think there's any fundamental flaw in the concept, just some fledgling attempts.

    5. Re:Visual Programming Language by lachlan76 · · Score: 1
      Well, some of the problems I have had are
      • I have to explicitly define the order that commands are done in
      • If I want to remove a command, I need to then connect the commands around it
      • It isn't as easy to add an operation in the middle of somewhere
      • I have to a) find the operation I need in some huge list, or b) navigate several layers of menus for each function
    6. Re:Visual Programming Language by Hognoxious · · Score: 1
      Programming with boxes and wires is the way you code in such languages.
      Isn't that the same as CASE?

      The 1980s just called, they want their silver bullet back.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    7. Re:Visual Programming Language by jhoger · · Score: 1

      How to answer that... how about No?

      UML tools are CASE tools. For that matter, Word and Visio can be considered CASE tools. THe most advanced ones may generate class headers and stub implementation files.

      Compilers and interpreters are not usually placed under this umbrella.

      VPLs are compilers and interpreters, not CASE tools. The VPL is the programming language itself.

      On top of that I never used the term "silver bullet." At best VPLs will make design and maintenance easier, but not by orders of magnitude required to call it a silver bullet. It's just another way to design and write code, one that I believe has real promise over the long term.

    8. Re:Visual Programming Language by Hognoxious · · Score: 1
      UML tools are CASE tools. For that matter, Word and Visio can be considered CASE tools.
      can be considered as != are.
      On top of that I never used the term "silver bullet."
      Please explain where I said that you did? Oh, I didn't, did I. Nonetheless, it's a term I'd advise you to learn. Along with 'strawman'.
      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    9. Re:Visual Programming Language by Anonymous+Brave+Guy · · Score: 1
      The 1980s just called, they want their silver bullet back.

      LOL. I don't even slightly agree with you, but that was a good line. :-)

      (I don't agree because VPLs aren't the same as CASE tools. I think they're one of those rite-of-passage ideas that many thinking programmers reinvent for themselves fairly early on. However, almost everyone who explores the idea more deeply discovers pretty quickly that there are scalability issues. Nothing in common knowledge today has yet overcome these. As long as it takes a whole page of diagram to represent a reasonably complex expression in a VPL, while the same takes a line or two of $TEXT_BASED_LANGUAGE, I'll stick to the latter. Thus they may indeed (not) be a silver bullet, but it's not the one from the '80s you appear to be thinking of.)

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  23. Control Problems by gokeln · · Score: 2, Interesting

    I write a lot of device-control kinds of applications. The high-speed stuff (> 1kHz) benefits tremendously from hierarchical state machines. I began using the mechanism Miro Samek proposed in "Practical Statecharts in C/C++". See http://www.quantum-leaps.com/.

    This is a very nice framework for taking your statecharts directly into code. They are also pretty efficient.

    However, in a couple of cases, I had to abandon his framework, because the DSP implementation ended up being too big to fit into my DSP's cache. So, I broke down and rewrote it all using a nested-switch. It's uglier and more bug-prone, but it fits in cache and helps me keep my high speed loop fast enough.

    The nice thing about the hierarchical statecharts is that they help simplify the problem in ways I did not think about previously. Behavioral inheritance is a great concept, and having a way to think about it graphically has sped up my designs.

    I cannot help but recommend Samek's book and the use of these hierarchical state charts. They are helpful, especially if you're doing control problems.

    --

    There's no time to stop for gas, we're already late.
    1. Re:Control Problems by Anonymous Coward · · Score: 1, Interesting

      This is exactly the area where I found UML to be really usefull: embedded systems. The combination of class diagrams or even object diagrams and statecharts is a great way to design such a system. But I must admit that I have no experience in designing a real large embedded system using UML. Unfortunately, to me the state-of-the-art in code generation seems not to be optimal. Also I did not encounter any IDE that I could recommend.
      The worst tool I used was Rhapsody (in C) by I-Logix (also dubbed Un-Logix Cacophony in C) as it is extremely bug-prone and has an unergonomic UI.
      Today visual programming is also commonly used with PLCs (programmable logic controllers).
      I am absolutely sure that UML has a bright future in the embedded systems, as this area is generally quick to embrace industry standards.

  24. UML Fever by danpat · · Score: 4, Interesting
    Death by UML Fever

    That's a very interesting take on some specific issues one often comes across when trying to use UML.

    Personal experience has shown that some of the features of UML are useful. We often use class diagrams to help new developers on the project get quickly up to speed. The class relationship information, which is what they need, is more densely represented in UML than as code. That said, we rarely use most of the other artefacts. Pseudocode and flowcharts often seem to work much better.

    When it comes down to it, UML is sometimes a useful communication tool, but that's about the extent of it. When you have a bunch of developers who communicate better in some other way, you use that instead.

  25. What?-Managed care. by Anonymous Coward · · Score: 0

    What "I" see languages becoming is more "leveraging" As Joal mentioned when memory managment became a task for the machine instead of the human. Productibity increased. Maybe for programmers to be ever more productive, they'll have to relinquish ever more control over the process? Managed will be 2005's buzzword. From managed languages, to managed frameworks, to smart containers. Soon we'll speak not in the "dot I's, cross T's forgot a comma" manner we do now. But ever closer to the ideas we presently spoon-feed our machines.

  26. Use Cases by YourPreferredNicknam · · Score: 3, Interesting
    All my collegues at work diss UML - but then again they didn't have to take it in school. I do use cases for myself quietly on the side. Use cases I like because: 1. they capture requirements well 2. they can read like a test plan of sorts.

    The other parts of UML I do not find so useful. I mean, I could just use regular flowcharts, state tables, or class declarations instead of the UMLized equivalent.

    UML is just a way to describe your software requirements and design. Heck, you can even use regular English prose if you like, just like the good old days.

    1. Re:Use Cases by Anonymous Coward · · Score: 0
      If you're doing use cases in English prose, and that's it, I don't think you can use that as an endorsement of UML.

      BTW, I do actually do use cases in English, and yes, they are very helpful, but use cases were around before UML, and if you're not using a huge, slow, unwieldy, totally overpriced piece of software and a methodology that ensures you'll never have something that can execute, I don't consider it UML.

  27. And I Use It to Weed Out Staff by tom's+a-cold · · Score: 4, Interesting
    The way I use UML is as way to select projects I want to participate in. If it uses UML, I'm out. The correlation of using UML with rigid authoritarian organization and fighting with "productivity enhancers" rather than developing software is too high.
    I've done development for a very long time and there are few non-trivial projects where modeling, used correctly, doesn't reduce risk and end up delivering a higher-quality product. In fact, I won't hire any developer who refuses to use UML since I'll assume that s/he is lacking in essential software engineering skills and is a "code first, understand the problem later" sort of person. I've burned too many hours fixing that kind of code to ever want to do it again. And I'm about as far from an authoritarian manager as you can get.

    The art is to know how much modeling is enough. This depends on the development tools you're using (languages, IDE's), the problem you're trying to solve, and the skill level of the developers and "buyers" of the project. I find it most useful at a higher level of abstraction: activity diagrams are really good afor understanding business processes; a high-level object model is usually a good thing to have early in the project definition phase; and I always want a convincing story on object life cycles before we start: this probably involves realization and sequence diagrams.

    I seldom use more than 20% of the semantic richness of UML-- I use it more to "rough out" a description of objects and their behavior. Part of the reason for that is that there is no value in using UML to replicate capabilities that are already built into the development tool suite. And detailed modeling of stuff that doesn't matter is just bullshit. Anyone who documents every page on a website with a sequence diagram that basically tells you nothing should be taken out back and shot. Since I'm usually the tech lead on projects, I'm the one who tells the clients what we use and why. And if they expect some UML feature that we're not using, I tell them why we're saving them money by tailoring it out. If your management aren't capable fo doing that, they aren't fit for their jobs.

    My main point is that UML is a common language to make analysis and design more effective. It's only useful when it does that. Knowing when it's helping and when it gets in the way is a judgement call for which somebody had better be prepared to take responsibility. Unthinkingly doing everything everytime to insane levels of detail is nothing but a shameful waste of resources. It should be the yeast, not the flour, in your loaf of bread. It cannot take the place of intelligence.

    --
    Get your teeth into a small slice: the cake of liberty
    1. Re:And I Use It to Weed Out Staff by bladesjester · · Score: 1

      I tend to agree in that modeling a program in a meaningful way is useful. As a general rule, when I start working on a project, after I have gotten the requirements, I begin breaking it into discrete sections (for example - gui, network, database, etc), and then break those sections into sections until the implementation is relatively trivial.

      By the time I'm finished with the rough model, I basically have a list of tools to make and fit together in order to create the finished program. Of course, this doesn't solve every possible problem in creating the program, but it does take a lot of the difficulty out of the process.

      --
      Everything I need to know I learned by killing smart people and eating their brains.
    2. Re:And I Use It to Weed Out Staff by thorpe · · Score: 1

      I agree - modeling is useful to me in several ways, but it can be abused.

      As the development team is working on a design, modeling can clarify what someone is talking about. I find its easier to work on a system if I've seen a sketch of the area I'm working on beforehand. And sometimes drawing a diagram on the whiteboard gets other people to 'oh, I see' far faster than with just a verbal explanation.

      It also helps soldify a design. With diagrams, it becomes easier to notice if you've left something out. It is easier for the team to walk through behavior if you've got bubbles to point to while you're doing so.

      Its also useful long term to have the design written down, if its kept up to date, for example when a new developer joins the project and needs to come up to speed.

      But you have to know when to draw the line. I don't think its good to just use it as a specification - hand it to a developer and say here, code this.

      I'm not particular about the language the model is written in. UML is as good as any other. The biggest advantage I see to it is its broad acceptance.

    3. Re:And I Use It to Weed Out Staff by Anonymous Coward · · Score: 0
      In fact, I won't hire any developer who refuses to use UML since I'll assume that s/he is lacking in essential software engineering skills and is a "code first, understand the problem later" sort of person.
      Right. Because UML is so the only way to do design & documentation. And you couldn't code first and do the UML later, could you? but still, it's UML so it's right, even if it bears no resemblance to actual reality (the code).
      And I'm about as far from an authoritarian manager as you can get.
      Your previous comments don't exactly support that assertion.
    4. Re:And I Use It to Weed Out Staff by mqx · · Score: 1

      I think that this is one of the most insightful comments here.

    5. Re:And I Use It to Weed Out Staff by Anonymous Coward · · Score: 0
      The kind of programmer that thrives in a UML environment is precisely the kind of programmer that produces crappy code. With enough people stepping on each other's feet in the typical authoritarian organisation that uses UML the shit rises to the top. As the bureaucracy increases to the point of insanity where UML seems like a good idea, anyone who used to produce decent code has long since learned that in this organization producing quality code is penalised.

      Better to produce crappy code like everyone else. That way you don't look bad. Producing easily maintainable code in such an organization means everyone else who maintains/deals with your code gets their work done quicker than they would if you had produced spaghetti code. And you still have other people's spaghetti code monkey wrenches to deal with on a daily basis. Once the disease has metastasized into UML, it's reached terminal stage. Your workplace is then officially a sewer, and you are just another turd floating by.

  28. THe best thing is don't. by noselasd · · Score: 1

    .. use UML. After having had a few courses about it and some training for a project, I and everyone was highly motivated. Till we realized how time consuming it was compared to its benefit. imho it's just plain unproductive and the better choice is to stay away from it..

  29. dumb question by zogger · · Score: 2, Interesting

    dumb question but because I am not a developer I'll ask anyway. I am seeing the comments on "code commenting". Aren't there any editors that automagically generate at least some sort of generic commentary as you code along? I guess I assumed this was the case already. I know specific things you'd have to type in, I just though a lot of the general stuff just got "done" as you typed in code according to what language you were using, etc.

    anyway.. where is the speech to code to useable apps dealie? heh, that's what I am waiting for.

    Hmm, maybe coders and coding shops need to hire IT proficient but primarily english majors/experts/writers to follow along in real time as much as possible with the coding being done by the geeky and cranky guru pros and add in human readable commentary, and then write the manual pages as well. Eliminate that painful step (for other people down the line) of having to translate and decipher what the esoteric guys were trying to do with their code.

    1. Re:dumb question by Anonymous Coward · · Score: 1, Interesting
      Your thinking is totally wrong.

      Your *code* should be easy enough to read so that it doesn't need comments (except maybe at the top, or before each method).

      Look at this Ruby code:
      cutoff = Time.now - 4.hours
      messages.each do |message|
      if message.arrival_time < cutoff
      result.late_messages += 1
      end
      end
      Now look at this:
      # Count how many messages were more than 8 hours late
      n = Time.now
      messages.each do |m|
      if (m.arrival_t - n).abs > 144000 # 4 hours 1999-01-12 by gaj
      result.late += 1
      end
      end
      Which one has more comments? Is it the one that's easier to read, maintain, and debug? Does the second have a bug? Is the comment correct?

      Write your code in *code*, not in comments.
    2. Re:dumb question by putaro · · Score: 1

      Well, the traditional answer is "If it was hard to write it should be hard to understand".

      The code tells you everything you need to know AND has the virtue of actually being what the computer will do. Comments are there for the tricky sections and to give a high level overview of what is happening or the "why" of what is happening, rather than the "how".

      The problem that you typically have when reading code isn't figuring out what each line is doing, but building up the mental overview of how all the pieces parts interrelate. It's like looking at all of the individual blueprints for the pieces of an engine and trying to then visualize how they all fit together in your head. For an engine there will be an overview blueprint with all the parts in relation to each other. That overview is what the documentation and comments are for. Unfortunately we do not have good ways of visualizing large, complex systems.

      As far as for making commentary so that unskilled people can understand what the code is doing, what's the point? If you're not skilled enough to read the code you're probably not skilled enough to add anything useful to the code or any discussion about it.

    3. Re:dumb question by kristjansson · · Score: 1

      As far as I know, the more useful tools out there do things like restructure your written code for readability or automagically generate documentation from specially formatted comments.

      Granted, I haven't checked on what other automagic source massagers do in a while, but I would imagine that there are none that do what you're describing to the point of being actually useful. What's useful falls into a few basic categories, namely WHY did this get written, and WHO do I blame for this crap, anyway. the first being generally more useful than the second, unless you're playing the cover-your-ass game. Most modern IDE's will try to fill in the second for you in header blocks or string definition files, but considering how hard it can be to go back to uncommented code a few weeks later and figure out what the hell you were thinking, I seriously doubt that anyone's got software that allows the computer to figure that out for you.

      Just my .013 Euro...

  30. UML is *mostly* a waste of time by Anonymous Coward · · Score: 0

    It's bloated and complex, not based on any formal principles, and is difficult to use "the right way". For instance if you're modeling a class, do you list every instance variable? What formal rules do you apply to decide? None, it's entirely ad-hoc.

    However, it's useful to *communicate informally*. For instance if you want to tell a co-worker the structure of your classes, you can scribble something on a whiteboard.

    Look in the Gang of Four book for instance, there are some nice clear diagrams which could be considered a subset of UML. Learn that much and you'll do fine.

    DO NOT use it to design your software though! It's BDUF (Big Design Up Front) gone horribly wrong.

  31. DO use or WOULD use? by IndigoSkies · · Score: 1

    How I *actually use* UML is as a mechanism for communicating ideas "live" on a whiteboard to others who are trying to think through solutions in a team setting. And then I use less than 10% of UML's capacity -- mostly just class diagrams, and occasionally interaction diagrams.

    I do NOT use it as long-lived documentation, because it goes immediately out of date. The only guaranteed-accurate documentation is the code itself (and not even code comments). Sometimes a high-level diagram can be meaningful for a while, and I'll make one for posterity sake, but mostly not.

    How I *WOULD* (like to) use UML is for the visualization of existing code -- to analyze it from a 10KF view; to make pictures that'll help me understand the code and figure out how to improve/extend it. And then I'd throw it away when I was done. Unfortunately this is how I would LIKE TO use it, because pretty much all reverse engineering tools seem to fall short of accurate, or at least "sane" interpretations of what's going on.

    1. Re:DO use or WOULD use? by nextdoornerd · · Score: 1

      And what if you use only 10% of it's "capacity" and only in "sketch mode"? My point is, people are ranting here in the style "boo, only the kindergarten-level part of that bloated piece of evil smelling stuff is of any use" while missing the point that UML as a spec is only a set of visual modeling languages - which diagrams you use, in what phases of development with what sort of tooling depends on many factors. (For example to use more "advanced" modeling techniques provided by UML - hierarchical statecharts z.B. - you need people who actually comprehend what you can achieve with UML in your given problem domain with your tooling. Code monkey + 1 week UML course of God knows what quality + MSPaint.exe is definitely not the way to go in an UML-based dev process.) The "out of date doc" question: round trip engineering. See Rational XDE. (OK, you will need a Cray on that one :(, but that babe has some serious code and model generating capabilites. And I don't work for IBM.) I am certainly biased as I am still a student (no RL experience) and we use UML from a somewhat special point of view - annotating and and analyzing for nonfunctional properties of a system - but having reevaluted my stance with UML for many times (killer -> crap -> useful in high ceremony, big scale development only -> see, I can compute actually meaningful stuff on that diagram -> with model transformation and code generation you become simply more productive than with hand programming) I must say that those who now discard UML as it is will have big, manga-style eyes when the code hand-written by them now will be automatically generated from formal models with the help of model transformation repositories in ten years. Note that small scale and truly low level programming is safe from that. Anyway, sorry for the rant. As I said, I am biased, have too much free time (lookie, I post on /.! :)), can't speak proper English (not a native speaker), I am from academia and fed up with People Bashing UML Without Knowing What It Really Is.

    2. Re:DO use or WOULD use? by IndigoSkies · · Score: 1
      See Rational XDE. (OK, you will need a Cray on that one :(, but that babe has some serious code and model generating capabilites. And I don't work for IBM.) ... I am from academia and fed up with People Bashing UML Without Knowing What It Really Is.

      Funny. I actually have real-world experience, four years of which was at Rational, and I've used Rose on many occasions. I found it to be "feature rich" in the wrong places (aka bloated) and too thin where I actually wanted some functionality. Also, since you mention it, I found it to be a serious a resource hog.

      I know UML is merely a specification language, and that how you use it it more important than any specific tool implementation. Also I believe 100% that if someone wants to spend the time to flesh out their system in UML, in extreme detail, that some day they will be able to fully code-generate a working system from it. Additionally I believe that the time required to do all the modeling and annotation that will be necessary for this will not be an improvement over just writing the code by hand in any other language.

      In the real world (at least the one I've worked in) it's usually much more important to get working (even if incomplete) software out there NOW than it is to have perfect software much later. You need to change the design every time you turn around, and wrestling with updating diagrams and round-trip modeling/coding tools is madenningly tedious and slow.

      Of course that's just my simple view on things.
    3. Re:DO use or WOULD use? by nextdoornerd · · Score: 1
      Funny. I actually have real-world experience, four years of which was at Rational

      Yep, that's the field where I can't compete. Actually I think that Rose (the newer versions, too) is terribly far from the holy grail of an easy-to-use, consistent code/model generating environment, but it's still the most mature "solution" on the market (uhm, too much IBM propaganda material digested, sorry about that).

      See, I should have made clear that the parts about "not knowing what it is" was not specifically about you while it is true that it could be interpreted that way. (After rereading my post that part was at least rude - I beg your pardon.) It's more sort of a pavlovian trigger for me - I study at a university where the unit-diameter student, although not capable to pass most of the more theoretical courses (algorithm theory, data security and suchlike) for the first go, regularly makes fun of those who respect and try to work with more formal methods. And my treshold on UML-bashing has been way far exceeded by this /. conversation.

      Now, about fleshing out my system to the smallest details two things come to my mind. First, there are possible cases where I have to flesh out my system to the smallest details. Again, I don't have work experience, but the techniques and tools I saw in my embedded & real time systems course actually work (UML or not - the main thing is modeling and formal analysis) and in that field one has some serious constraints on the system to be developed. So serious, that it is actually worth to use formal modeling and checking that model.

      Second, finding the correct level of abstraction is certainly always desirable. We actually have evaluated this issue for the quantitative performance analysis of applications and found that hence modeling to the level where execution times can be computed from the model may be sometimes possible it is simply a brain dead idea (and there are still serious projects on that issue... well. They know. I don't want to do it.) But if we model to the desired level of granularity, automatically generate instrumented code skeleton (and yes, you don't morph your code to the level where the model becomes out of sync), measure under some workload and backannotate the results to the model you can do some pretty analysis on the UML model. Just a usage of UML, where we avoid the "fleshing out" of the system and still get useful results.

      Uhm... the third of those two things. Nowadays the tooling for general purpose UML-based development is somewhat childish compared to what the possibilities of a model based approach are (still, I think XDE is a great tool - but it could be so much better. Personally what I can't stand and comes from Rational is the Rational Unified Process. But that's a whole different issue.) For general purpose systems model templating (design patterns) and generating more and more code from that model can really speed up development (as I am a wet behind the ears rookie this is only my extrapolation from my experiences with code generation tools).

      You need to change the design every time you turn around, and wrestling with updating diagrams and round-trip modeling/coding tools is madenningly tedious and slow Let me tell you something Sir, as long you haven't worked with Tivoli you don't know anything about wrestling... :)

      Anyway, I go back to configure that 10g instance I have here instead of pointless UML-advocacy at 2:56AM. Your sarcasm was well deserved, thanks for the reply and practitioners point of view.

    4. Re:DO use or WOULD use? by Hognoxious · · Score: 1
      As I said, I am biased, have too much free time (lookie, I post on /.! :)), can't speak proper English (not a native speaker)
      Yeah, but German has paragraphs too, so no excuse for that.
      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  32. Rational kool aid by miu · · Score: 1
    I agree very much that good tools would make UML more valuable than it is right now, but I think there is also a fundamental problem that something too close to implementation is specified by UML as commonly used. When used in that manner the UML becomes nothing more than additional version of the code in a more abstract form, this is fine if the UML is generated from actual code, harmful if not.

    I guess the design tool that I would like to see would be a reverse engineering tool, UML use case tool, physical spec tool, and architectural spec tool. All as easy to use as visio and with the capability to export in image or pdf format.

    As it stands the 3x5 and whiteboard method are far more useful than most of the tools that Rational provides.

    --

    [Set Cain on fire and steal his lute.]
  33. Was the original point completely missed? by schmaltz · · Score: 4, Insightful

    I use UML to design and document apps I write, when it's helpful. Usually for apps it takes longer than an eight hour day to write, and will see change in the future. It provides a birds-eye view of what the app is doing, and how it represents data.

    How many open source projects do you see that come bundled with documentation cleary explaining how its internal structures look and relate, and how the program was intended to behave? If you answered "Few to None", you'd be today's winner! Monty, tell 'em what they've won!

    UML is a visual modeling *language* used to communicate program behavior and data structure concepts with others (mostly humans), typically in an object-oriented context. As a bonus, there are quite a few visual modeling tools that work with UML. Some emit corresponding code in Java, Python, C++ and a handful of other languages. Some are OSS/FS, while others are proprietary and pricey.

    UML is also handy when weaving Design Patterns into your application framework. If you're into designing your applications before you code them, you probably know about Design Patterns and the GoF book. Design Patterns are another kind of *language* for communicating about structure and behavior.

    I'm not saying the only way to design an app is with DP and UML, but together they are very effective at communicating data structures, how objects/structures are to be constructed, and program behavior. Which, not coincidentally, are the three main categories of code patterns described in the GoF book.

    The main point of UML is clear communication; for DP it's creating solid designs. To create an application that works well (does what's intended, doesn't need refactoring/rewriting when new data formats or behaviors are expected in the future), and is easy for other programmers to pick up (program logic easily understood, relationships between classes and other structures easily identified and grokked), it is good to choose a common language to communicate those things, besides the one the app is written in.

    For the folks who pedantically attack UML as being part or product of an authoritarian regime - well, it's just a tool that helps you get your job done, and communicate effectively with others. Sometimes it will get used by hardliners I suppose. The flip side to that is, are you communicating clearly and consistently?

    Maybe that doesn't matter to you, but maybe also you would be better off for expanding your personal toolset, and making yourself better understood.

    --
    Big Daddy, Johnny, Burp, Aunt Zelda, Scott, Slurp, Big Momma ... where's Siggy?
  34. ER diagram overlap? by Tablizer · · Score: 2, Insightful

    There is a conflict over territory in what UML and ER (entity-relationship) diagrams dipict. Where they don't overlap is behavior, but UML tends to assume that the relationship between entities and behaviors is one-to-one when actually it is not. My development philosophy is more or less to decouple, or at least not hard-wire at a high level, what entities are used to carry out a specific task. The relationships between entities and tasks is often fluid and not one-to-one, so I see little use in hard-wiring such relationships into a design by using diagrams that encourage it.

  35. Bad mod of parent! by BerntB · · Score: 2, Insightful
    Parent was modded to 0.

    It would have been better if the modder had written a motivation why that product (and method) was bad.

    Anyone with answers?

    --
    Karma: Excellent (My Karma? I wish...:-( )
  36. Just a conceptual tool, not a silver bullet by kimanaw · · Score: 4, Insightful
    My first exposure to formal UML was in '96. Took a (employer-sponsored) class, and realized I'd been doing UML already using some newfangled tech called "pencil and paper".

    A few years later, I did some work for a major aerospace concern that had brought in an army of UML consultants to completely re-org the way they built their flying machines. They had literally wallpapered an entire floor of an office building with UML diagrams. Needless to say, nothing ever came of their delightful illustrations (other than relieving the corporate coffers of much coin).

    UML has unfortunately become an industry with lots of fancy GUI tools to draw pretty pictures, purporting to magically generate code from committee meetings. Just the sort of thing that keeps PHB's in corner offices, at least until the customer asks to see the working final product.

    UML is good as a starting point; it provides a lingua franca to flesh out requirements, and to communicate those requirements to implementors (I'm esp. fond of use case scenarios). However, it doesn't translate well to the often chaotic world of actual implementation, where performance issues, platform specifics, breakneck delivery schedules, and changing/creeping requirements usually crush the elaborate UML blueprints.

    UML is a discipline, rather than a technology. Properly used, it will likely improve your ability ro deliver what the customer wanted. Just don't fall into the trap of assuming its a magic wand that will make the hard parts of implementation disappear.

    --
    007: "Who are you?"
    Pussy: "My name is Pussy Galore."
    007: "I must be dreaming..."
  37. Acme::Eyedrops by jonadab · · Score: 1

    I use Acme::Eyedrops to create UML diagrams that are also the code!

    (Okay, actually, I don't do that. But knowing it's possible is the closest
    I come to UML.)

    --
    Cut that out, or I will ship you to Norilsk in a box.
  38. UML destined to fail by Anonymous Coward · · Score: 0

    But not for the reasons you might think.
    As others have already noted, UML is largely used as a means of documenting how the code works. We use it this way both during the initial design and later when we've completed coding. However, in recent years, I've noticed much more resistance to doing this. The reason? Many of the engineers believe that having well-documented code makes it easier to offshore their project! So many of them fear for their jobs that they hoard their knowledge rather than document it in a form that can be easily shared. Sad but true.

  39. No No No! GML is the only way to go! by Anonymous Coward · · Score: 0

    GML is the only proper tool for these kinds of jobs. It's been through the fire of real projects, streamlined and factored to the essence of the task, and gives these diagrams the legitimacy that they really deserve in the design process.

    Big fan of GML.

  40. Any Good UML Experiences? by occamboy · · Score: 2, Interesting

    Sad to say, the only fellow I know who is actually gung-ho on UML writes scary code that easily breaks.

    The following may seem facetious (sp?), but I'm genuinely curious: does anyone have a story involving UML with a happy ending, along the lines of "Wow, if it weren't for UML we'd have been in big trouble?"

    1. Re:Any Good UML Experiences? by Anonymous Coward · · Score: 0

      With big OO systems it saves time when you need to refactor something, or add something big and new.

    2. Re:Any Good UML Experiences? by rjwilson01 · · Score: 1

      We did, I think, it was a medium OO project which used UML at the top design level only with a fairly direct implementation in the code The lower levels of the code were self contained This kept the interactions amongst modules clear and well documented. We changed the UML first then the code

    3. Re:Any Good UML Experiences? by mqx · · Score: 1

      Fantastic experience with UML, Rational ROSE and C++ code generation: not only more productive, but the resulting design is far better because you're easily able to refactor while you're fleshing out the design. Typically, I've found, that once C++ implementation is underway, refactoring is hard and costly because of the amount of changes that need to be made, and the biggest issue for long term C++ code is the lack of design evolution, leading to code that has a lot of implementation hacks and quirks that could have been avoided if the higher level object model was evolved.

  41. Re:dumb question..and here are some dumber answers by zogger · · Score: 1

    Which one has more comments? - No 2, but maybe I am wrong.

    Is it the one that's easier to read, maintain, and debug? -No idea, said I wasn't a developer

    Does the second have a bug? -NO idea, not a developer

    Is the comment correct? _again, no idea, although initially it appears incorrect. Frankly, neither example makes much sense to a non coder, at least to me they don't, not on a glance anyway.

    I was asking a question, not really making a declarative statement based on skillset, therefore if by asking a question makes me "incorrect" I pity students everywhere who might have to learn from you somehow-or a coder down the line who has to interpret your stuff. No offense of course, just an observation.

    Anyway, with that out the way, it brings up another observation in this code versus comments imbroglio. Why is it that it's one or the other? In a sense I am agreeing with your last that "the code is the comment". Aren't there any code generators that use actual grammatical speech entirely yet? If not, why not? Too hard to build or what? Why should there by code AND comments, why can't the comment BE the code, all the time? Instead, I read about yet another miracle floorwax code language being developed. Seems to me they are all minute and arcane variations on the same deal, designed to be...uhh. what's a descriptive phrase...obscurely counter intuitive and overly rube goldbergish complex.

    Rhetorical on my part, I don't know enough to phrase it properly. Just a view from the outside looking in. I know like in the example there are languages that are *closer* to normal speech to use for coding,so that a bonafide coder could glance and see what is going on,comments or not, but isn't the idea of computing the idea that eventually everyone can use it to the fullest, and *easily*?

    Just wondering when the next logical step is taken when a code language is developed that exactly mimics normal speech in it's ultimate output in binary compiled form. I know it's a scary thought to professional coders, but hey, automation and better tools and more ease of use comes to every field eventually. I personally *love it* when I get access to a new and/or better tool that eliminates or reduces in time and complexity a drudge chore for me and lets me go on and do something new. Like ask me if I'd rather use A-a scythe, or B-a bushhog when tackling a pasture.

    In the meantime I'll let ya'all smart guys with the keyboards wrangle over it (code language flame wars are a LOT funnier to read on slashdot than OS flame wars, BTW, from the perspective of a non coder, it's like listening to people argue over sanskrit as opposed to aramic as to which is "better", ie, sorta silly) and I'll stick to driving ye olde computer bus. And thanks for the work, really! appreciate it! If it wasn't for you guys, no computer use for the kid here. I get enough mechanical headaches keeping various small and medium sized engines running. And next time you might happen to chow down on some chicken or steak, you can reciprocate the thanks back. We all work together *on the planet* to make each others lives better, and also to make a buck for ourselves. I know I appreciate it when someone suggests something entirely new to me as regards my work, I'll stop and think about it, because a long long time ago I learned sometimes some pretty snazzy inputs can be gleaned from someone else looking at what you are doing who hasn't been blinded to the forest by standing in the tress all day long.

  42. with soap (not SOAP) by sohp · · Score: 1

    After I use UML, I wash my hands. That whiteboard marker ink is messy.

  43. Not expressive enough by kanly · · Score: 1

    ... and never will be. UML assumes that everything can be reduced to boxes. There are things I can say in code, that I would like to have another notation for. If UML is truly "unified," show me the UML (sequence diagrams, in this case) for the following code (explained here):

    (defun make-load-form-with-fixup (obj)
    (multiple-value-bind (alloc init) (make-load-form-saving-slots obj)
    (setf init (nsubst 'o obj init))
    `((lambda (o) ,init o) ,alloc )))

    Better yet, show me the sequence diagram for this function's caller. Or, since Lisp is supposedly dead, how about this:

    sub sort_versions {
    return map { $_[0] }
    sort { $a[1] <=> $b[1] }
    map { [ $_, split /-\./ ] } @_;
    }

    Want an example in a more contemporary language? Then just draw a UML diagram of, say, Spirit , for instance. The control flow here simply cannot be reduced to boxes. UML can't deal with RAII in C++, or finalize-time operations in Java. UML is fundamentally a decent whiteboard tool for some of the less complicated and less expressive languages. That's all it is. (Except for use cases, which have somewhat more broad applicability.)

  44. I use UML daily, you should too by blankjeff · · Score: 1

    ...well, weekly maybe. First, throw away any 'official' purpose UML might have had. It's just a way for describing aspects of code design, that's all. So are flowcharts and ER diagrams, etc. I use UML (and the others) both to sketch out ideas as I'm working through them, and as a common language for describing my design to my dev team, or for collaborating with others. If you think your code doesn't need describing, then it's either very simple, or you're very wrong. It doesn't need to be described in every detail, that's the job of the code & in-code documentation. But if anybody ever has to come back to this code in a year -- even yourself -- then they're going to want to know how your objects fit together, or how that little trick you used to get the database working worked again, or what that bizarre recursive function you cooked up was supposed to do, or how those threads interacted... Yes, you can go back and look at the code. For instance, the project I'm currently on has about 2000 source files written by about 30 different developers over 5 years. There's a half-dozen subsystems running on different servers, and they all talk together in ways that no one ever bothered writing down. Sure, _you_ go look in the code. I'm going to get drunk. If you're writing a VB app with a fews screens, then a couple of use cases and some screen shots will probably be all you need, if that. But if you can apply the term 'non-trivial' to any aspect of your system, then it needs to be designed before time, and documented throughout the process. If you don't...well, then I'll be at your ex-place of employment in a couple of years to clean up your mess.

    1. Re:I use UML daily, you should too by Anonymous Coward · · Score: 0

      I've only coded relatively small projects for myself and for classes.

      The first thing I think when I look back on my old code is:

      "Is it obvious?"

      And when it's not, then that means to me that it could be done better. I rewrote a 2d tile engine/editor for games about a half dozen times before I was totally satisfied with it, because I knew that the rest of the game would stand on that piece. The code I used to make some dialogue bubbles is comparatively junky and hackish, yet I still refactored it enough so that it could be reused.

      What keeps it from becoming an abyss in my mind is that every time I do something unintuitive(what's that variable for? Why are you incrementing?) I comment it to explain. It's not UML, but it certainly helps ;)

  45. UML != Language by Brother+Grifter · · Score: 1

    UML is used only for notation and documentation. UML isn't context-free. Unless we're talking about Natural Programming Languages, UML will never replace languages like C++, Java, etc...

    UML is useful for when you're working on a large project, that may be used across sites or even across companies if you're sub-contracting the development of your system to outside firms. I think its better at giving new developers something easy to digest before looking at the code. If you're subbing out work, it allows you to create high-level interfaces and hand them out to your sub's development teams to ensure that integration is easy (i.e. everything compiles and only that). They have a reference to work with and you may be less bothered with questions from the sub.

    UML, like most other other software engineering fads exist mostly because groups like OMG want to push new consulting fees to large commercial companies, publish more series of books and create forums for them to lecture to (and charge fees).

    Most large companies are abusing the hell out of all this software engineering sugar. Business Analysts authoring UML diagrams, not knowing exactly how this will translate into system. This ignorance, which is not their fault, its their managements fault, can cause hell and resentment among the developers.

    Overall, UML is useful, but its not a save-all. You need guidelines to make it useful, and you need to refine them constantly. Tools are another issue. There are few that bridge the programming with the designing intent that UML and these tools attempt to provide and do it well.

    1. Re:UML != Language by mughi · · Score: 1

      UML is used only for notation and documentation

      Actually, you're wrong there. It's a floorwax AND a dessert topping.

      As Martin Fowler states in UML Distilled:

      "In fact, the UML is a few different things to different people. This comes both from its own history and from the diffrent views that people have about what makes an effective software engineering process."

      UML can be a programming language in and of itself, where all the code for some application is UML, or it can also be merely used for varrying degrees of documentation.

      Both he and Steve Mellor independently came up with three modes in which most people use the UML:

      • Sketch
      • Blueprint
      • Programming Language

      Sounds like you're familiar with the first two, but the latter does exist as one of the primary three modes.

      UML, like most other other software engineering fads exist mostly because groups like OMG want to push new consulting fees to large commercial companies, publish more series of books and create forums for them to lecture to (and charge fees).

      On this, I'd also would have to say you're probably a bit off. The UML exists mainly because there was a Tower of Babel of somewhat similar approaches to the same problems being invented and used all over the place. At least the UML did manage to unify that mess. Of course, the consultants would be makining money regardless, however my personal feeling is probably that the multiple pre-UML solutions would have offered them even more fertile ground to exploit.

    2. Re:UML != Language by Brother+Grifter · · Score: 1

      Folks use some tools to simulate their UML models. Rhapsody is a tool that can do this, and it is impressive, but I hardly consider this type of capability similiar to a programming language. Perhaps a psedu-code-like language is more equivalent.

      In either case, like all things, it can be what you want it to be or how you creatively apply an idea or use of a tool.

      You could argue that all the other OO notation schemes, OOT, Booch, etc.. could be used as languages as well, I don't think the argument is particular to UML. Unfortunately, I don't think most folks would use UML for anything more than documentation and 'sketching'. You could think of UML as a language or dialect to communicate with. Is that what Mellor is suggesting?

      I think the original author of this thread was referring to the actual application of UML as a programming language, and not as a dialect for materializing thoughts in a software process.

    3. Re:UML != Language by mughi · · Score: 1

      You could argue that all the other OO notation schemes, OOT, Booch, etc.. could be used as languages as well, I don't think the argument is particular to UML. Unfortunately, I don't think most folks would use UML for anything more than documentation and 'sketching'. You could think of UML as a language or dialect to communicate with. Is that what Mellor is suggesting?

      I think the original author of this thread was referring to the actual application of UML as a programming language, and not as a dialect for materializing thoughts in a software process.

      Go ahead and check into some of the references. As I mentioned, those experts classify 'programming language' as one of the three major modes of UML use. Of course, Fowler seems to consider executable UML as a 'holy grail' ideal that probably will never be practical, but there are ways to go about it. Mellor's recent book 'Executable UML' explores some of this. In general, some of the feel I get (remember, I haven't done UML as Programming Language myself) is that in those cases UML is the language worked in, and it can later be compiled to lower-level languages just as to execute C++ was originally compiled to C and then assembly while the programmer stayed working in C++.

      To get up to speed on things, I'd suggest UML Distilled to get a good overview of things. Although he focuses on the ways most folks use UML, he does explain the "UML as Programming language" use as well.

  46. The New New Paradigm by kupci · · Score: 1
    Do you use it to have nice class diagrams to pin up to the wall so you/it just looks great or do you first model out every little detail into class and sequence diagrams before generating or writing even one line of code?

    When I read stuff like the above I'm inclined to think a project went sour, and blame was put to rigidly following UML with no clue why, how it works or what for. Hey we did it the right way and still failed, what gives?

    Well, here's the next silver bullet, I mean paradigm. For some of the controversy, read Grady Booch'sDec 3rd article. Actually, DSLs look interesting, MSFTs proprietary "Software Factories" do not. They lament the fact UML is too limited. It seems that if you dislike UML, you'll really dislike their "vision".

    1. Re:The New New Paradigm by kimanaw · · Score: 1
      OMFG just skimming that "bullet" had me on the floor in hysterics! At first I thought it was an April Fools type article, maybe something from the Onion (esp. w/ the pretty pictures!). They somehow managed to inject every damn SWE buzzword into a single title.

      Now I wish someone had posted that article here so we could give it mod points. It'd shoot straight to "5 -Funny".

      I only hope this thing doesn't get into the hands of too many PHBs...

      --
      007: "Who are you?"
      Pussy: "My name is Pussy Galore."
      007: "I must be dreaming..."
  47. Isn't This a Computer Science Question ? by Anonymous Coward · · Score: 0

    I still have a lot to learn - I went to a small liberal arts college down South.

    My tiny brain says this is not a debatable problem - kind of like debating whether the Cowboys won last week when we only have third quarter scores. Either this is something that the computer science profession can figure out with existing CS knowldege or some PHd candidtae can research in a dissertation to see if UML can fully map the abstractions, representations, etc needed by computing languages.

    DirtySouth2005

  48. Don't confuse the issues by OldAndSlow · · Score: 4, Insightful
    There are several issues that are all being referred to as "UML."

    There is the model driven architecture (MDA) issue (that isn't being talked about here much).

    There is the waterfall vs. agile vs. sloppy issue.

    There is the authoritarian martinet boss vs. childish coder run amok issue.

    The "the tools suck so UML sucks" issue.

    And finally, there is the "It sucks so I'll never use it" vs. "Use the right tool for the job" issue.

    MDA first. UML is only the first part of OMG.org's attempt to revolutionize software engineering. I find MDA silly beyond words, and so I will not do it justice. Go visit OMG if you are interested in their side. The MDA folks want to be able to build universal models that get reused, transformed to fit domains, manipulated by tools to do all manner of wonderous things. I personally think they are having wet dreams, but it would be great if they could pull it off. That said, if you fully drink the OMG kool aid, you wind up thinking that all we need is a few high priests of models and really smart tools. right.

    As for the lifecycle issues, all of us who have been on more that one project know that the waterfall doesn't work; the "let's just write stream-of-consciousness code and screw everything else" doesn't work; and XP requires especially disciplined troops to make it work at all and then only or relatively small projects.
    What is also clear to anybody who has ever done maintenace, is that unless your code will never be used by anybody but you or it is small enough and well enough written to be understood by a complete noob before lunch the first day he looks at it, it is unprofessional not to document your design. It is also stupid to tackle anything but the tiniest projects without a design (and I count XP's emergent design as a design). So what are you going to use to express your design? How about the notation that all the books about software now use -- UML?

    I have worked for more authoritarian bosses than I care to remember. But I have also worked with too many nightmare developers who either simply didn't know what they were doing, had emotional problems, or were just jerks. This has nothing to do with UML, these same types were poinioning the same wells in the days of FORTRAN.

    Tools. The three amigos are the worst possible thing that could have happened to UML. They all work for Rational, so bosses think that Rational must have the best tools. **gag** Go look at Magic Draw, or Together, or Embarcadero Describe. I've had reasonable luck with all three. BTW, the three amigos are also behind MDA. I haven't been paying close attention to UML 2, but it seems to me they are making UML less useful for real work to make it more friendly to MDA.

    Sometime UML does suck for a particular job, or a particular implementation of UML sucks. That doesn't mean that is should be forever foresworn. It is a good tool for some tasks. Use it for those tasks. If the boss is so stupid as to think that the teams' best guess at a design at the start of the project should be cast in stone, then it is immaterial how you express your design, cuz you are screwed no matter what. (but don't be so silly as to neglect doing any design just to spite a stupid boss)

    1. Re:Don't confuse the issues by schmaltz · · Score: 1

      +1 Insightful.

      Just to offer clarification, "the three amigos" reference is to Grady Booch, James Rumbaugh, and Ivar Jacobson.

      --
      Big Daddy, Johnny, Burp, Aunt Zelda, Scott, Slurp, Big Momma ... where's Siggy?
    2. Re:Don't confuse the issues by Anonymous Coward · · Score: 0

      Does the gang of four beat up on the three amigos? Is this a pattern of violence?

    3. Re:Don't confuse the issues by schmaltz · · Score: 1

      No. It's a little-known fact that Los Tres Amigos also are pistoleros, and have been observed handing out a good (verbal) ass-kickin' themselves. Be you warned. :)

      --
      Big Daddy, Johnny, Burp, Aunt Zelda, Scott, Slurp, Big Momma ... where's Siggy?
  49. Dangerous Crutch by perfectmaster · · Score: 1

    Many software projects fail because coders/managers do not actually understand what problem they are really trying to solve. UML in theory, but typically failing in practice, tries to address this. Pour in plentiful use cases and some eye of newt and out pops (not unlike from the Finite Improbability Generator) a complete and sparkling model of the problem. In reality, the input is likely flawed and incomplete. The result is a tool that is a dangerous crutch cicumventing actual understanding of the problem at hand, while generating management pleasing (and I'm a manager) pictorial output. Add to that a big learning curve just to grok the syntax, low usefulness to communicate with outsiders (such as marketing people), and high overhead as requirements change or become more clear make for a negative ROI for this tool. It is clearly a fad that needs to go away and make room for some better formalism.

  50. The way my teachers tell me to by Stevyn · · Score: 1

    I'm a computer engineering student and for that they make us take some comp sci courses. In comp sci 2 and especially 3, they stressed UML very much. For each large assignment, we had to do class, state, and relationship diagrams. I'm torn if it was a waste of time. On one hand, it wasn't difficult and it was a good way to get an idea of how to start the program. On the other hand, we were learning UML as we were learning C++ so we'd end up changing so much when coding that it wasn't much use afterwords.

    Making these diagrams was a pain too. I tried many programs such as Dia, Kivio, Umbrello, and Visio using crossover office. None worked that well which was frustrating since as a student, I'm not going to shell out big bucks for a real program. Btw, visio was given to us for free from good ol' microsoft through some student program.

    In my very limited experience, we just used it to hammer out an idea for a program to show class relationships and not much more.

  51. UML != Methodology by BigLinuxGuy · · Score: 1

    UML is a great tool for providing a common notation (what it was originally intended for from what I understand). Using it pragmatically takes experience. Programmers tend to model their implementation a little at a time and miss the point of system or application modeling. Where UML can be used successfully to generate code (overcoming the problem of keeping the diagrams and documentation current, a common problem cited by programmers who want to code, not design or document) using tools such as those from Kabira (www.kabira.com) or Accelerated Technologies Bridgepoint (http://www.projtech.com/). I would recommend spending some time at the OMG sight (www.omg.org) and read up on MDA and Executable UML. Oh, and sprinkle your use of UML with a healthy does of pragmatism, i.e., if it doesn't bring any value, then don't do it based on the modeling methodology you choose to use (UML != Methodology; RUP, OMT, OOSE, Booch, Fusion, et al. would be methodologies).

    But your mileage may vary......

    P.S. In my experience, the rush to code can be characterized as always having time to do it over, but never having time to do it right the first time.

  52. I generally don't use it by dtfinch · · Score: 1

    I never jump straight into coding, unless it's a trivial write-once program that'll take an hour or less. I design everything non-trivial ahead of time. I draw a lot of diagrams and write a lot of psuedocode. It may at times have strong resemblance to UML, but only because UML incorporates many (but not all) useful design methods. I'm not the kind to jump on every bandwagon that comes around. I have so much reusable framework code written and thoroughly tested, simplifying the implementation, that I can rapidly produce prototypes or make sweeping changes to a project as needed. My resulting code is very short, readable, and maintainable.

    It doesn't matter whether you use UML or other design tools as long as the outcome is a clear, correct design and high quality maintainable code written in a timely manner meeting every need and want. Ultimately, putting too many constraints on your thought and creativity can do more harm than good.

  53. Does anyone use UML as intended? by SunFan · · Score: 1


    I found UML to be very awkward. It seemed most people would adopt it because it sounded good in a "best practices" way, but, in practice, it didn't get used very effectively. Class diagrams can be useful, for example, but, unless everyone in the room understands what the different styles of arrows mean, their usefulness can be severely limited. I also found the "actors" style of thinking never really penetrated my skull, for some reason.

    The #1 biggest thing that bothered me, however, is that UML sets up whole analysis phases to be literally thrown away. Why spend the effort to make nice-looking use cases when they basically get thrown away? Isn't that what white boards are for? More extensive requirements are hard to express in pictures, anyway.

    --
    -- Microsoft is the most expensive commodity operating system and office suite vendor in the marketplace.
  54. no, you do need to doc by mughi · · Score: 1
    You should read about XP (extreme programming)...

    I have. And way back into last century even. :-)

    You're right that the initial idea is always different after seeing prototypes. But for this exact reason you shouldn't document your code. Code should be disposable, so don't waste time writing other than what the computer needs.

    And this is where I'll have to strongly disagree with you. Even "Extreme Programming Installed" (a book I personally belive wonders off a bit from Beck's best XP) says to use UML.

    Additionally, some of what I've seen in the best projects is the use of good Javadoc, DOC++, Doxygen or some such comments. The best time to write those is while the design is fresh in people's minds, such as in writing up initial tests or first writing each class. Additionally, it's much easier to keep up to date, and helps greatly as people need to go in and refactor code. Oh, and Eclipse has good Javadoc support, and having Javadoc comments helps it work even better.

    Of course, I've gone Extreme myself on different projects by writing Docs in XML. Just poke a single XML with different XSLT stylesheets and get end-user API documentation, internal implementor guide documentation, and full test case source code all from that single sparse XML source. (But especially with all the workflow benefits one gets in Eclipse from having proper Javadoc comments around, those are well more that "disposable").

  55. A test for whether UML is right for you by jbolden · · Score: 4, Insightful

    Here is my $.,02 for what's it worth.

    If the following sorts of things apply to your project the you are good candidate for UML:

    1) I would gladly triple the costs in exchange for halving the number of bugs
    2) There is almost no value in having the project complete early. On the other hand we need virtual certainty of meeting the conservative deadline we generating in the planning stage of the project.
    3) The costs of the software are overwhelmed by the costs of XYZ (where XYZ = marketing the software, getting it certified, the cost of how it gets used...)
    4) The cost of a serious bug is a large percentage of the cost of the project
    5) At the higher levels of the project we need to budget in terms of dozens/hundreds of man years for completion. Traits of individual developers are irrelevant
    6) No piece of code gets into a build without passing through at least 6 different stages involving independent or mostly independent groups
    7) We already have a highly controlled environment but the size of our projects is simply overwhelming the abilities of the dedicated (build, analysis, code control..) staff to understand what is going on.

    Conversely if the following apply it won't work out:

    1) We are under a tight deadline
    2) Individual programers have a feeling of ownership about their sections of the code
    3) Management is highly cost conscious
    4) While no one likes bugs its hard to imagine any single bug which is likely to get through would be serious enough to warrant increasing the total cost of the project by 10%.
    5) We have kind of a loose environment and we are hoping that UML help us to tighten up a bit.

    1. Re:A test for whether UML is right for you by gokeln · · Score: 1

      Good insight. I would only add that it appears you have an all-or-nothing approach to UML. My feeling is that we should take what's useful and skip the rest. For example, if you have a team of 5 or more programmers building a system that will take a year to have the first fully-functional release, you're going to need a system to communicate your designs to each other.

      If you have a customer who doesn't know his requirements, you're going to need a method to communicate what you will actually build. If you're a government contractor, you're going to have a formal design review. Use-cases, scenarios, and sequence diagrams are an excellent way to show what you intend to build and how you will meet the requirement.

      For complex control problems, timing diagrams and hierarchical statecharts are very helpful to minimize the complexity of the design. If you have a big object hierarchy, it will certainly behoove you to have some kind of chart showing the inheritance tree, and the interrelationships of the main classes.

      None of these examples requires UML. However, many people have been trained to understand it, and it is something of a standard.

      --

      There's no time to stop for gas, we're already late.
    2. Re:A test for whether UML is right for you by jnaujok · · Score: 1

      You missed the painfully obvious Point #8.

      Our ISO 9001 certification REQUIRES us to do it.

      Speaking as someone who just wrote 700+ pages of doc to update 134 lines of code...

      I love ISO 9001, I love ISO 9001...

      --
      Life, the Universe, and Everything... in my image.
    3. Re:A test for whether UML is right for you by jbolden · · Score: 1

      One time I was working in an ISO9001 shop. I did an estimate for a job (non critical system BTW) 40-60 hours to code ~720 hours to document.

      Estimate accepted and it went out to bid. No one batted an eye.

  56. Re:dumb question..and here are some dumber answers by Iron+Monkey · · Score: 1
    Aren't there any code generators that use actual grammatical speech entirely yet? If not, why not? Too hard to build or what?

    Not that I know of -- they are too hard to build. Natural language is very different from the artificial programming languages. In fact, understanding natural language is one of the most difficult of the sub-fields of artificial intelligence. Natural language is vague, full of grammatical exceptions, and relies on lots of contextual information to understand a sentence. Obviously, all of these spell disaster for a programming language, which must be absolutely unambiguous.

    It might be possible to specify a more "English-like" (or insert the natural language of your choice) programming language, but there would be a lot of rigid grammatical rules that aren't like regular English. The result would be an unwieldy and verbose programming language that nobody would be able to remember, since it is too close to real English (hmm, do I need to type "each object in the container" or "every object within the container"?)

    --
    If my enemy's enemy is my friend, what happens if my enemy is his own worst enemy?
  57. Booch Notation by Anonymous Coward · · Score: 0

    Anyone here old enough to remember that?! Little fluffy clouds: made for great "informal" diagrams. IMHO, UML just took the whole design notation too far.

  58. Re:dumb question..and here are some dumber answers by Hognoxious · · Score: 1
    Why should there by code AND comments, why can't the comment BE the code, all the time?
    The code documents 100% what it does and how it does it. It tells you nothing about why, and it tells you nothing about what it was intended to do.

    You say you're not a developer - well, there are already enough people churning out "write only code", so kindly keep it that way.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  59. ALL UML, or just the models? by dmorin · · Score: 1
    I think that every engineer at one point or another has made it to the whiteboard to scribble some circles and arrows. Any standard which enables me to just begin drawing and know that my coworkers will understand my notation (does that arrow mean A extends B, or A sends a message to B?) is a good thing.

    However, UML as a whole involves a much, much bigger business scope, and that can be a nightmare. I was once part of a project that had one person in charge of keeping the use case document up to date. It was never up to date, because no one who was actually doing any of the work cared about it -- it was an after thought, not unlike doing all your coding first and then saying "Oh, yeah...test cases." And of course we all hated the use case person who insisted that no decision was final until she had properly documented the change and gotten sign off that everyone was now on the same page. Imagine those meetings. Every engineer, marketing person and project manager agrees...but we have to wait a few days for the use case person to document what she thinks we said.

    Is it good to have such a document? Sure, certainly in theory, much like it would be nice to have a single grand unification theory of physics. But that kind of talk does not meet deadlines. Go build a house. You will start with architectural plans. Then the builders will build it. When you're done, see how many times you changed the plans on the fly to accomodate problems that had to be solved on the spot.

  60. Generate UML from code _runs_ and vice-versa? by sonamchauhan · · Score: 1

    A lot of people here mentioned wanting a product where modifying the UML modifies the application. But what about the other way around?

    Does anything out there generate UML (or similar representations) from actual code-paths chosen by the application when it executes?

    (How would this be done? Perhaps using a specially instrumented runtime environment/JVM/glibc etc...)

    A product with both functionalities would offer design round tripping.

    1. Re:Generate UML from code _runs_ and vice-versa? by rjwilson01 · · Score: 1

      I guess you mean from machine code back to UML? That is what if its a UML compiler not a preprocessor of some type? Allowing round tripping means a preconcieved idea that there is an intermediate language Personnally I'd say if UML is the design language and you can get to the application then all the intermediate stuff is black box level. ie I don't want to see it

    2. Re:Generate UML from code _runs_ and vice-versa? by Anonymous Coward · · Score: 0

      See my post. In my opinion, this would work like Javadoc - you just place some identifier in the comments saying that the current class has a many-to-one relationship with this other class.

    3. Re:Generate UML from code _runs_ and vice-versa? by sonamchauhan · · Score: 1

      Not from machine code. I meant source-code-aware UML generation, which would further use actual runtime data to put together additional models (eg: UML use-case diagrams, UML timing diagrams).

      I am skeptical UML can be a universal programming language. I'd expect UML to find the going tough when modelling procedural or non-object oriented stuff - for eg, string parsing, regular expressions.

    4. Re:Generate UML from code _runs_ and vice-versa? by sonamchauhan · · Score: 1

      I don't think annotating the source would be needed. Do see my reply to the other poster : LINK.

  61. Re:dumb question..and here are some dumber answers by Anonymous Coward · · Score: 0

    Wrongo. Your code should also document a bit of why. It's just lesser languages (compared to e.g. Lisp) make it too hard to form abstractions and "little languages", and get all caught up in the how. Comments should be one per function, and usually the docstring (lisp/python runtime-available commenting) should be totally sufficient.

  62. UML should be generated from code,like DB diagrams by Anonymous Coward · · Score: 0

    I like UML as a type of diagram, similar to database relationship diagrams. Unfortunately, while DB diagrams are spat out of database programs, most UML is edited by using crappy tools like Rational Rose. The cool thing with DB diagrams is that you can generate up to date diagrams right out of your database. Ideally, you should be able to do something similar with UML.

    I'd like to see the ability to add markup to code, to specify UML entity relationships. This markup could be like Javadoc comments or C# attributes. Then you could have a tool generate the UML right from the code, have up to date diagrams all the time. That way, when the PHBs ask you to work on the UML diagrams, you could actually be working on the code. It amazes me that noone does this yet.

    I can say that Rational would not like it; it pretty much reduces their entire product like to a Javadoc like tool.

  63. Just need some boxes and arrows by agentk · · Score: 1

    I'll occasionally diagram ideas when thinking about how to implement something or design an API, or sometimes in documentation. Dia has some nice looking boxes in a category called "UML" which I use sometimes. Also, Doxygen can generate collaboration diagrams that look like UML diagrams. Mainly I just need some boxes and arrows. All that other stuff is not that useful.

    Maybe it's useful to autogenerate IDL or someting, but I've always found that to be a completely broken concept entirely.

    Reed

    --

    VOS/Interreality project: www.interreality.org

  64. Re:dumb question..and here are some dumber answers by miscGeek · · Score: 1

    Like COBOL? :)
    Jeez, just typing the name sent chills up my spine.

    --
    May the source be with you!
  65. Re:dumb question..and here are some dumber answers by Hognoxious · · Score: 1
    Wrongo. Your code should also document a bit of why
    Wrongo to you with brass knobs on. I never said what code should do; I merely pointed what it does (specifically, the limitations thereof).
    It's just lesser languages (compared to e.g. Lisp) Comments should be one per function, and usually the docstring (lisp/python runtime-available commenting) should be totally sufficient.
    Would you like to make a point that actually has some relevance to the real world? For example, write self documenting code for the following scenario: if the article master has no shipping weight, calculate it as the net/base weight plus 10%.
    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  66. XP is just common sense, enforced by hey! · · Score: 1

    when it stops being common sense, it stops being XP.

    So, WRT to UML or not UML, well, of course you need to have some kind of design, preferably on paper, before you start coding. The real issues are the scope and the finality of those designs.

    The way I read XP, the scope should be just sufficient to solve the problem at hand, and not so large that altering the design to handle expanded requirements is politically or emotionally impractical.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  67. automation is the killer part ... by mqx · · Score: 1


    I see a reasonable number of useless comments from people that haven't used OOA/OOD language, but like to suggest their hypothetical ideas about the problems.

    Having used UML, I've found that UML itself per-se isn't the most importnat thing, what was really the killer was Rational ROSE with UML and code-generation. The reasons are:

    (a) the first pass UML diagram in Rose helped establish the "rough" design model: a pretty close OO diagram to help estimate complexity and amount of time for implementation.

    (b) the code-generation is fantastic: you work through your architectural layers and components, to flesh out that initial design (and yes, 20%-40% of your rough design will be thrown away and reworked) and implement code, refactoring and adjusting as you go, in tandem with constructing unit tests to verify.

    (c) afterwards, the UML diagrams in ROSE and code-generation make it easier to refactor and add/change functionality, and for new hires, the diagrams are the best documentation for the design: because they are the design, and are in sync with the code.

  68. Re:dumb question..and here are some dumber answers by Anonymous Coward · · Score: 0

    Um, YOU left out the why!

    If it's to validate the article master document for delivery, then you'd write

    (defun validate-article-master-for-delivery (article-master) ...)

    with ... replaced by the appropriate how, possibly calls to other functions like check-article-master-shipping-weight

    Lispers aren't scared of long names. We have tab completion...

  69. N00b to the real world by PilotW98 · · Score: 1

    I'm currently a Computer Science Engineer working at a major company for less than a year. I've used UML diagrams in college and the workplace. My overall expierence is as follows: 1) Create the UML model for the comceptual phase with just enough detail to cover all the important topics. 2) Update the UML model as the product moves through the preliminary phase. 3) Create a final UML diagram for each released version of the product.

  70. don't agree, will give example by zogger · · Score: 1

    "As far as for making commentary so that unskilled people can understand what the code is doing, what's the point?" --because I don't think there's any such thing as a black/white skilled and unskilled exact dividing line with people who do code. For every coder there is his or her skill level. There are beginners and old timey gurus and everyone in between. And more times than not, the gurus code fails it sometimes and then someone else needs to go and fork around with it to get it to work, including non coders. That's why. You can see it here sometimes (heck, more than sometimes all the time) on slashdot where some code snippets are being discussed and you can see a wide range of how to do it and example to counter example to further counter example, etc, with all the replies being done by "skilled" level people.

    If it is ambiguous at that level,back down the road to the even more unskilled it gets increasingly more difficult to understand what is going on. It would seem better commentary might help alleviate that.

    The whole idea of foss is that people other than the original coder will be working with this example code, at who knows what skill level. They could be raw beginner to grizzled veteran. Just saying "well, if you aren't exactly like me in skill level,therefore knowing exactly what is going on here instantly and intuitively, you have no business trying to understand or adapt to or alter from this code" doesn't foster increasing sharing and better code coming out and more involvement with more people.

    I would imagine that is one-not all but one-of the major reasons you see so many examples of very similar projects being started and worked on. There seems to be some coders mindset there that cooperation isn't as important as going it alone in a lot of cases. And it's also a deal where even people who aren't coders by nature or profession still have to ocasionaly go into some obscure files and fix something. I know it's happened to me a few times,latest two weeks ago, and the *only* way I was able to fix my serious problem was from the comments in the code, otherwise I would have had no idea where to even start to look. All major googling got me was where to maybe look, that was it, and even that was vague enough to be major league confusing. After I found something that looked suspicious, I took a chance on doing some very basic modifications, which apparently worked. If there had been no non-coder human readable commentary there was no way in heck would I have been able to fix it, none,nada, zero. So, I guess that means that I should have just remained with the broken stuff (broke my firewall and couldn't dialout either) because I'm not the same skillset as the writer of the code? Really, that's what you suggest? How awfully nice! Naw, don't think so. I appreciated the comments because it was non coder human language readable, if it hadn't been..tough noogies for me. Sorry, don't need the elitism. It would be like -just an example picked at random-you having the plumber come over to fix some problem, he fixes it, you ask him what he did, he replies "sorry, you aren't a master plumber, you don't need to know what I did, nor could you understand it". How would you like it someone said something like that to you?

    Hope my point is made more clearly now. The main reasons, I read the IT section and comment here occassionaly are -I hope to better my understanding of what the heck is going on with apps sometimes because user manuals and man pages still mostly suck bigtime, and two, to help nudge the various coders mindset more towards cooperation and reducing the barrier to entry with code in general. To help eliminate this obvious curse that exists in software land of "N developed IMBY so it isn't any good". And that's because I thought the whole idea was to tear down fences, not build new ones.

    1. Re:don't agree, will give example by cduffy · · Score: 1

      Do you write Perl?

      I ask, because there's an assumption implicit in your post that code that one programmer writes will be hard for another programmer to read. In C, Java or Python, that typically doesn't happen -- the language spec is simple enough that anyone who's halfway competant knows the whole thing (or at least 95%, and where the reference material is to look up things in the other 5%), and the standard runtime library is consistent (and there's quality reference material to use in looking up parts one doesn't know).

      That's a whole different story with Perl, where the language spec is byzantine and it's trivial for an average Perl coder to write code that another average Perl coder can't read; likewise, C++ has its share of odd corner cases (though at least the whole spec is documented enough to have 3rd party implementations!). In a well-designed language, though, these kinds of issues just aren't, and the difference between someone of high skill and someone of low skill isn't being ale to read a given code or not, but rather being able to see a better algorithm or a corner case that could turn into a bug if unhandled.

    2. Re:don't agree, will give example by putaro · · Score: 1

      Well, if you can find some volunteers to write nice documentation for FOSS code, more power to you. The reason it doesn't get done is because it is *HARD*.

      I'll give you an example. When I was working at a large hardware manufacturer I was responsible for design and development of a major subsystem. I produced a ~70 page design document for internal usage. This was well-suited for the use of kernel developers. I worked with our tech writing staff (who were excellent) and they produced a 700 page manual over the course of 3-4 months working from my design spec as well as several multi-hour sessions with myself. The end result was not meant for the casual user either, but for systems developers and documented architecture and API's, not the internal workings of the code. Producing a document that could explain the code to people without a programming background would have been a massive undertaking.

  71. thanks by zogger · · Score: 1

    closer to what I was thinking. Eventually, flash forward to the mysterious future with flying cars, I would think it would be spiffy if there weren't any traditional hard coded traditional apps, instead to have "create what you need to do on the fly" software, by just about any user. And that software would then go and coordinate with what hardware resources are available, at that exact point in time, considering that computers then would be the entire network, not just the stand alone box we have now. The transition *might be* in these various languages and a universal translator or parser of some sort.

  72. UML is useful to communicate with client by Dikeman · · Score: 1

    As an PM I tend to use UML as a way of communicating with the client. Use cases are a great tool for explainig what a system will do and how someone will use it. Together with some schematic screen lay-outs it speeds up the process of designing and getting the design accepted by the client.

    Further in the process the role of UML decreases, mainly because of 2 reasons:
    - All UML tools I know are too cumbersome. (Rational Rose, Visio)
    - Growing insight amongst the developers always leads to little (or not so little) changes in the way the design gets implemented. As far as I know it's impossible to update the design according to these changes without investing fast amounts of effort, resources and money. Reverse engineering certainly isn't the solution to this.

  73. I don't use it at all by Anonymous Coward · · Score: 0

    I don't use it at all because I don't like it.

    I don't like to think like that. With UML I tend to overengeener stuff.

    Right now I prefer to refactor on the go when I discover something I didn't thought off before (the refactoring can take time, but I do take the time to do it cleanly)

  74. Tools by Brandybuck · · Score: 1
    As Scotty would say, "Sse the right tool for the job." But that's only half the story. You also have to use the right tool in the right way. Too many people are using UML inappropriately. This is partly the fault of clueless managers, but mainly it's the fault of arrogant programmers.

    UML is not a code-generation language. Even though many tools have this as an option, don't use it. Just don't go there. In fact, stop using Rational Rose and Argo and start using Visio and/or Dia instead.

    If you're diagramming every method for every class, you're diagramming far too much. UML wasn't meant for that level of detail. If you find yourself obsessing over access specifiers in your diagram, you need to cut back on your caffeine intake.

    Make your class diagrams high level. Capture the broad design of the software, not the details of implementation. This may require you to ignore most of the bells and whistles Rational gives you.

    If you're not writing the requirements, don't create the use case diagrams. Let the bubbleheads do that. But do verify that the use cases are correct and sane.

    Use different types of diagrams as appropriate. A device driver would never need a class diagram, but a state diagram would be invaluable.

    --
    Don't blame me, I didn't vote for either of them!
  75. UML is *NOT* Documentation! by Spy+der+Mann · · Score: 3, Interesting

    UML should be used to DESIGN your programs. After all it's "Unified *MODELLING* Language", not "Unified nifty diagrams documenting language".

    Lack of previous (even on-paper) design is what makes programs buggy. When you code first, doing the UML diagrams is useless. Why? Because when you find out the structure of your code and see possible improvements, you realize that it's too late to make any changes, due to compatibility problems, etc etc etc.

    Look at what happened to the Lazarus project. it's been on "pre-beta" for more than 6 years, and they 're still telling me it's too early to make an UML diagram because "the structures change too much". (WTF?!?!? If I want to cooperate in a project, the least i can ask for is the UML diagrams so i can focus on where to help, not navigate among the millions of lines of code!)

    Follow my advise. Design first, code afterwards.

    1. Re:UML is *NOT* Documentation! by Anonymous Coward · · Score: 0

      Code should be broken up into black boxes with input and output specifications. High level design should be about how those black boxes inter-operate. NEVER - and this is what UML does - should the inner workings of a black box be written out by one person for another to implement.

  76. UML Is a throwback to When Cost Was No Issue by was_ms_now_linux · · Score: 2, Interesting

    When I think of UML diagramming, I think of the old-school Object Oriented Design approaches to client-server development and how it used to be fassionable to pay a close to a dozen high-rate contractors to philsoophize on the merits of alternate approaches to object design. Back in those days, cost was not an issue and every company thought they had the edge since they had all the OO visionaries huddled together in their conference room. Of course, things have changed and companies don't want to just blow money for the sake of blowing money. IT expenditures rarely increase revenue, so the focus should be on how to cut the cost of the plaform and the cost of the applications. Heavy use of UML is often the cause for outsourced efforts being as expensive as local development - boatloads of UML diagrams are normally required to properly instruct offshore teams. The new modern model is to cut out all non-value-add activities, including UML, and go from business user or func-req directly to source code development. Doug Hettinger www.SoftwareObjectz.com

    --
    http://www.softwareobjectz.com
    1. Re:UML Is a throwback to When Cost Was No Issue by ecklesweb · · Score: 1

      go from business user or func-req directly to source code development

      You are living in a dream world if you think you can effectively go straight from functional requirements to source code development without a design phase in between. You simply will not end up with quality software. You'll end up with an unmaintainable, non-extensible, almost-gets-the-job-done-but-really-pisses-the-use r-off-at-times piece of crap.

      I've been on both kinds of development shops. Give me one that does formal design (UML or otherwise) any day.

  77. Diagnosing and Recovering from UML Fever by UML+Commando · · Score: 3, Interesting
    I have just submitted a sequel to the Death by UML Fever article that appeared in the March 2004 ACM Queue magazine. It is scheduled to be published in March 2005. Beyond describing the Fevers which were the focus of the original "Death" article, the new article further elaborates on its symptoms, describes things people with UML Fever say, and introduces a 12 Step Recovery program complete with a "UML Serenity Prayer". It is quite clear, however, that UML Fever does not exist in this audience so you can read it for a good laugh.

    The tragedy here is that the big marketing machines have brainwashed the gullible, desperate, and ignorant into believing that UML is a silver bullet. As a result, diagram making robots are often directed to generate their beautiful models for unknown stakeholders and with unknown value to create the illusion of progress (Gravitational Fever: Afflictees measure progress by the weight of their UML diagrams).This is just one scenario of many that gives the UML a black eye.

    Let's face it, any tool can be misused and abused. People need to learn to use the UML where it is valuable to do so, at the proper level of detail, and with appropriate completeness. When used under the proper adult supervision, the UML truly can be a valuable communication and visualization tool with which to improve productivity as opposed to killing it.

    Is Death by MDA Fever around the bend?

    1. Re:Diagnosing and Recovering from UML Fever by Stu+Charlton · · Score: 1

      The UML Fever article is one of my favorite of 2004. I almost cried, I laughed so hard (particularly Curator fever and Circled Wagon fever).

      Heaven help us if MDA becomes the next grail. Thankfully (thus far) some of the MDA vendors like Compuware seem rather pragmatic about it.

      --
      -Stu
  78. UML Uses and Limitations by Bluesy21 · · Score: 1

    I just finished taking a class on UML that lasted 3 months...what a pain in my *$$! However, UML does have it good points. In a high-level easy to explain to you're less intelligent co-workers way it gives a great WSIWYG view of the project so customers can agree to the solutions the techies are giving or not. It allows you to plan without having to go back to the drawing board later. As far as the ultimate goal of UML where software can be just classes that are used over and over again and never have to be changed I'm not sure if thats possible and even if it was I doubt that most people are going to be able to patent their own little classes and the code associated.

  79. I use it to understand other people's code (nt) by Dwonis · · Score: 1

    No text

  80. Good experience for both PC and avionics products by Lulolean · · Score: 2, Informative

    I am currently a software technical lead at a well-established avionics company and have been involved with many UML-related discussions, training classes, meetings, and FAA certified projects, in addition to smaller at-home PC-based projects. I have taught UML and the Unified Process in house for more than a year and have also read and applied many of the key books on object-oriented design, business modeling, use-case modeling, the Unified Modeling Language (UML), and the Unified Process. I've seen and used UML used in quite a variety of ways (pc game, web-based genealogy database, quality system business modeling, embedded product design, embedded graphics driver design), with a variety of goals in mind, with engineers ranging from hardcore embedded avionics guys to throw-it-together PC app developers. On some projects UML has been very successful, and on others it has failed, but before I mention why, let me first address a misconception I've seen as I've read the posts above.

    Many engineers new to UML mistakenly think that the UML dictates a process. However,

    The UML is not a process, it is a modeling language

    In other words, it isn't UML that dictates the activities and process of your software development. That is instead the job of a process like the Unified Software Development Process, or the standard waterfall, or rapid prototyping, or Extreme Programming, or DARTS/CODARTS, or structured analysis & design, or some other customized process. UML is a language for capturing the models and views of a system independent from any process your project may choose to follow. A process (such as the Unified Process) will customize and extend the available UML modeling elements and define the activities and resources necessary for developing those models. So, when you are having process issues (such as using too much of the UML or fleshing out too much design before starting implementation), don't assume that it's the fault of the UML--it is probably instead the result of a bad choice of development processes.

    Strengths and Weaknesses of the UML

    From my experience, UML excels at specifying requirements, documenting high level design, describing both the static and dynamic architecture of the system, highlighting core structures and key interfaces, bridging the gap between requirements and design, bridging the gap between business modeling and application design, bridging the gap between database design and application design, and facilitating communication between software developers and the users of the system. (I've actually used it in all of these ways.) UML encourages engineers to think through the problem before hacking together a solution. This doesn't mean that the design should be set in stone first. The requirements and design can and will change, sometimes significantly, over the course of a project. However, I've seen enormous gains in both quality and efficiency when the project team has done a prelimary design of the core structures first in UML, then tried to code them up in C++, learned more about the problem, revised the design in UML, then tried again. Sure there's a cost to documentation but it's cheap relative to the cost of getting the design wrong in C++. One last strength--UML is capable of supporting the development of a multiple layered system, even when that system spans business processes, multiple embedded products that must be integrated together, individual cards with separate software in those products, the layered subsystems in those cards, and on down as far as you care to go. Few if any other modeling languages could say the same.

    UML is not so good at documenting low level design except when a certain complex key area needs to be discussed in depth with multiple engineers; "self-documenting" code with appropriate comments is much better at documenting low level design. I have also not seen much use yet for node or component diagrams.

    In all the projects I've worked on from avionic

  81. Use UML like this by angel'o'sphere · · Score: 2, Insightful

    Start with Use Case diagrams, Activity diagrams and Component Diagrams.

    The order is arbitrary (depending on your knowledge about the future system and your UML skills).

    The goal is to have -- before you code:
    a) Use Case diagrams which roughly capture what kind of actions the users can do with your software.
    b) Components (either planned libraries/dlls or database tables or executeables or configuration files or just imagined "partitions" of one big executeable) where every use case is assigned to a component. That means the business logic for that usecase will later be in that "partition" of code. It makes sense to divide the components up into business components, data access and communication components and gui components (usually a use case is then realized as logic in the business component and also in a gui component for interaction)
    c) Activity diagrams for the complex use cases describing their controll flow.

    If you do not do a), b) c) above you can not write big systems anyway (except you have 20% factor 10 coders (The Mythical Man Month))

    After that is done you pick one use case or two, depending on team size, make the class diagrams for it, generate the code for them and fill out the empty methods with your code.

    If you have "scenarios" (that are user acceptance test cases) or XP user stories, make sure they conform with the activity diagrams and make a sequence diagrams as needed for them. That helps in finding the needed methods for you classes.

    Use a tool that supports round trip engineering so you can import that code back into your model. So the "private" methods you "invented" during coding get pulled into the model.

    Write your unit tests (better user acceptance tests based on the activity diagrams) and import those also into the model.

    When needed generate the SQL statements to create the DB tables and/or the DB access components.

    Is your application a protocoll driven, e.g. communication, robotics or persistance heavy, you probably might need state diagrams. A state diagram usually refers to a single class or a few connected classes.

    Here is a easy tool for UML sketching, it is not usefull for codegeneration etc. but toi get the first ideas how to use UML its probably the most simple one: http://qse.ifs.tuwien.ac.at/~auer/umlet/index.html

    angel'o'sphere

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  82. Re:dumb question..and here are some dumber answers by Iron+Monkey · · Score: 1

    Exactly. :)

    --
    If my enemy's enemy is my friend, what happens if my enemy is his own worst enemy?
  83. Requirements Requirements Requirements by erinacht · · Score: 2, Insightful

    For me, UML is for expressing requirements - you are not designing your program in advance - you are expressing in a formal way what you want the program to achieve in advance - if your requirements are non-complex and you can accept escalation (scope-creep) then go ahead and use rule of thumb, works fine for lots of people, but for managing huge projects, the problems rarely lie but rather in the expression of requirements. Even for a simple project, interconnected use cases with pre and post conditions is a far better than english prose. It also gives you a nice mental model to hang the code off to make sure that you are solving the right problem. For more complex behaviour UML Activity Diagrams help greatly, the combination of use case and activity diagram creates an excellent way to decompose behaviour. Adding class models with constraints goes even further defining data and rules that give a head start into the development. The rule is to capture the essence. That requirements will change is a given fact of life, but with an MDA approach, the impact of those changes have a better chance of being managed and costed properly. Best thing is that once you have completed the requirements model, you have a re-usable system description. Since technology changes are v. expensive re-inplementations of existing functionality on a new platform, the base requirements in a non machine/language specific form are worth real and serious money to your company. Leave development for the developers (or in XP, RAD or @home, for when you don your developer's hat). Use UML to express requirements and let the programmers work out the best implementation with current tools and tech. - that's what they're paid for. This is the fundamental approach of MDA (model driven Architecture) - though I reckon the OMG's MDA approach might go a little too far down the RTE (round trip engineering) path to give truly useful expression of requirements. So the UML models tied with a good requirements system (we're using Telelogic DOORS - there are many others, but DOORS came out top for our needs) now, back to modelling the requirements for a requirements system - talk about fead huck...

  84. Re:dumb question..and here are some dumber answers by Hognoxious · · Score: 1
    Um, YOU left out the why!
    Sorry, I don't understand. I wrote no code, so I left nothing out.
    If it's to validate the article master document for delivery, then you'd write (defun validate-article-master-for-delivery (article-master) ...)
    Well it isn't. Validate means to check an entry, not to correct it or approximate it as a workaround (which is what my example, pulled from real life, actually does). So you broke one of the primary rules of self-documenting code - name things properly. Or as sometimes written: "If it don't waddle and it don't go quack, don't call it a duck". And by the way, your code, though admirably verbose, doesn't say anything about why either. Certainly not half as well as a simple comment

    * Temp! due to errors loading master, approximate shipping weight

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  85. LEAF Project development by harryk · · Score: 1

    There are two or three versions, and running in a UML environment works quite well for bother userland and kernel/module development. Its also great for 'testing' unknown software for side effects, being able to isolate the environment is really nice.

    --
    think before you write, it'll save me moderator points.
  86. Bha Hum Bug by Anonymous Coward · · Score: 0

    We're artists. Why should we bring our selves down to the level where we're dictated that we should wear white shrts with chains dangling from our necks. Enterprise freaks can sell their souls but it doesn't say anything about the way and success with which they get their jobs done. We'll have it knocked out, tested, running and interfaced, while they are all still drawing little stick figures in their use-cases.

  87. UML is not required to determine structure by Stu+Charlton · · Score: 1

    When you code first, doing the UML diagrams is useless. Why? Because when you find out the structure of your code and see possible improvements, you realize that it's too late to make any changes, due to compatibility problems, etc etc etc.

    You're making an assumption that one can't understand the structure of their code without seeing it visually. This is similar to saying that one can't understand the plot of a book or interrelationships of characters without seeing it as a flow of bubbles & lines.

    they 're still telling me it's too early to make an UML diagram because "the structures change too much". (WTF?!?!?)

    WTF indeed. a UML diagram is merely a visual representation -- one can do it any time. Though they may have a point if you intend to do it by hand vs. reverse engineering the code & massaging

    --
    -Stu
  88. CAM by Anonymous Coward · · Score: 0

    I once worked for a company called Intellicorp. Many of you UNIX geeks may remember a product thay made called OMW. Kappa was their main product which was an OO management system used to produce OO C programs for the UNIX environment. OMW (Object Management Workbench) was a UML tool that sat on top of Kappa and allowed a user to create executable UML diagrams. The big flaw came with the realization that there were no methodologies that could describe a project completely. This gave rise to the idea of CAM (computer aided methodology). Intellicorp's big idea was that programmers should describe the project through some sort of english like meta language to the computer and the computer would create a UML appropriate to the project.

    Obbviously this is a ridiculous waste of time as the timeframe for describing the project and producing the UML was generally twice as long as most shops have to produce and test a project.

    Alas, it seems that OO programmers today who have never worked with proceedural languages are helpless without there UML diagrams.

    A piece a paper and a pencil can do the same thing for you as UML. After all, nothing replaces documentation.

  89. ...modelling, used correctly... by Anonymous+Brave+Guy · · Score: 2, Interesting

    I agree with much of your post, particularly these excerpts [emphasis added]:

    I've done development for a very long time and there are few non-trivial projects where modeling, used correctly, doesn't reduce risk and end up delivering a higher-quality product.
    The art is to know how much modeling is enough.
    And detailed modeling of stuff that doesn't matter is just bullshit.

    To answer the original question, I find aspects of UML useful in two places:

    1. While prototyping at the start of a new project, when I don't have any real code to play with yet, I often sketch out things like class diagrams and sequence diagrams.
    2. Once a project is up and running and there's code around that someone else might have to navigate/understand. Automatically-generated class diagrams often provide a useful frame of reference if you're using an OO design.

    Oddly, though apparently I'm not the only one, I usually prefer to do the prototyping work with the Mk. I Pen & Paper(TM). I find most "UML design software" hideously awkward to use. (If you do want to produce decent diagrams by hand, perhaps to put in a document that's being circulated to colleagues, then Pacestar's UML Diagrammer is the most simple-but-effective software I've found thus far, though of course YMMV.)

    For documentation once the project is going, I subscribe to the view that the code should be mostly self-documenting as far as details go, but separate formal documentation should explain the "big picture" ideas. Tools like Doxygen are great for this. They generate class diagrams and such for you automatically, thus keeping everything up-to-date without much further effort on the part of the development team, but can also

    1. provide a home for your written explanations of major ideas
    2. reference key classes/functions in the generated areas of the docs, as a starting point for someone new to that area of code to find their way around
    3. pick up summary comments at the start of functions and the like
    thus keeping all your documentation in one place, without requiring error-prone manual duplicate of information you already wrote into the code.

    IME processes that insist on using UML for anything more than either throwaway prototyping (when generated by humans) or reference material (when generated by software tools) tend to be far too heavyweight to be useful. In particular, I have never yet encountered a so-called "round trip engineering" process that actually did more good than harm. (That doesn't seem to stop many management teams deciding to mandate their use, alas!) Still, you can always waste plenty of afternoons trying to get that sequence diagram in Rational Rose to both look correct and work correctly if writing the equivalent C++ or Java in two minutes is too easy for you, and if that same enlightened management is paying you by the hour... ;-)

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  90. My experience with UML by Jesus+2.0 · · Score: 1

    I flip the page in the spec for the new project, and am confronted with an utterly bizarre diagram.

    "Can someone explain how this is supposed to be interpreted, please?"

    "It's UML!"

    "Okay... can someone explain how this is supposed to be interpreted, please?"

    "It's UML!"

    "Okay... and it is better than a simple flowchart why?"

    "It's UML!"

    "Okay... and it is better than a simple flowchart why?"

    "It's UML!"

    "Okay."

  91. Re:dumb question..and here are some dumber answers by Anonymous Coward · · Score: 0

    Idiot. Validate means to "make valid". Correction can be a part of a validation process.

    And like I said, you didn't SAY why you were doing it, so I assumed it was "for delivery".

  92. Re:Division of labor by Anonymous Coward · · Score: 0
    UML is either detailed enough that it takes as long as coding to produce, or it is insufficiently detailed to be translated into code. You spend X time on creating UML and someone else spends X time trying to understand your UML and translate it into code for a total of 2X the labor. With insufficiently detailed UML, only the level of detail that was provided results in duplicated effort. The rest requires only the coding time. In the limit as the detail of UML approaches zero, the total time spent approaches X for correct, well documented code.

    Correctness and efficiency is to be found by MINIMISING THE NUMBER OF TIMES THE IDEAS BEHIND THE CODE ARE COMMUNICATED, not in communicating them especially well. No communication is the best communication - for instance a user that programs their own perfect tool. If you can divide a project into mini projects - one for each programmer - who is in charge of taking the mini - project from inception to completion you will do many times better than trying to create an assembly line using uml. Each step in the assembly line will have to duplicate the work of understanding everyone else's ideas before they can add their part to the whole. And the buck stops with the last programmer on the line who has to translate untested ( you can't test UML, only code ) ideas into working code.