Do C++ and Java professionals use UML??

R

Ramon F. Herrera

Every time I see newfangled gizmos like "UML diagrams' (which remind
me of the old-fashioned flowcharts, NOT the best of tools, since it
leads to spaghetti code) I can't help but remember the saying:

- "Those who know, do. Those who don't manage".

I guess my question should be: Under what circumstances is advisable
to use UML?

-Ramon
 
D

Daniel Pitts

Every time I see newfangled gizmos like "UML diagrams' (which remind
me of the old-fashioned flowcharts, NOT the best of tools, since it
leads to spaghetti code) I can't help but remember the saying:

- "Those who know, do. Those who don't manage".

I guess my question should be: Under what circumstances is advisable
to use UML?

UML has been a round for a long time. I haven't ever really been
educated in it, so I'm not sure if it adds value or not.
 
L

Lew

Ramon said:
Every time I see newfangled gizmos like "UML diagrams' (which remind

I'm sorry, "newfangled"? "gizmo"? How do either of those terms apply to UML?
me of the old-fashioned flowcharts, NOT the best of tools, since it
leads to spaghetti code) I can't help but remember the saying:

Au contraire, flowcharts and related tools lead to the elimination of
spaghetti code.

What is your evidence to the contrary?

My evidence in favor is my experience with good diagrams (bad ones
by definition won't help) that led to insights into how to optimize code,
better code structure for readability and maintainability, and confirmation
whether all possible input conditions were handled.
- "Those who know, do. Those who don't manage".

Which is actually bullshit. Disempowering bullshit, at that.
I guess my question should be: Under what circumstances is advisable
to use UML?

When you need diagrams in a structured software-development environment,
particularly when such diagrams will be part of a permanent documentation set.

Also useful when the team is large or the time scale long, which conditions
often correlate to the need for permanent documentation sets.
 
I

Ivan The Not-So-Bad

UML has been a round for a long time. I haven't ever really been
educated in it, so I'm not sure if it adds value or not.

There's decent enough value in it to better understand complex systems. Being
able to read UML of different types is a good base of knowledge to have. I
definitely wouldn't use it for much beyond a better understanding of complex
systems though
 
A

Arne Vajhøj

Every time I see newfangled gizmos like "UML diagrams' (which remind
me of the old-fashioned flowcharts, NOT the best of tools, since it
leads to spaghetti code) I can't help but remember the saying:

- "Those who know, do. Those who don't manage".

I guess my question should be: Under what circumstances is advisable
to use UML?

Anytime you need to do a diagram that can be done via UML.

And that would be most non-trivial software projects.

Arne

PS: UML is from 1997 so it is not new.
 
A

Arne Vajhøj

UML has been a round for a long time. I haven't ever really been
educated in it, so I'm not sure if it adds value or not.

It adds value to describe IT systems using diagrams.

It adds value to have a standard notation for such diagrams.

UML is such a standard notation.

Arne
 
D

David LaRue

Every time I see newfangled gizmos like "UML diagrams' (which remind
me of the old-fashioned flowcharts, NOT the best of tools, since it
leads to spaghetti code) I can't help but remember the saying:

- "Those who know, do. Those who don't manage".

I guess my question should be: Under what circumstances is advisable
to use UML?

-Ramon

It would be advisable to use a UML diagram when discussing how classes of
objects relate to each other, there is a need for a formal document, and
the group of people that will use the document understand UML diagrams.

David
 
R

Roedy Green

When it helps you to think and reason about the system you're developing
and when it helps to communicate information about the system to other
people working on it.

I think the biggest problem comes with keeping it up to date. This is
extra work, but without it the diagrams are worse than useless.
--
Roedy Green Canadian Mind Products
http://mindprod.com
The greatest shortcoming of the human race is our inability to understand the exponential function.
~ Dr. Albert A. Bartlett (born: 1923-03-21 age: 89)
 
F

Fredrik Jonson

In said:
I think the biggest problem [of UML] comes with keeping it up
to date.

The more expensive UML tools have round trip engineering which makes
keeping it up to date with code less of a hassle. My limited experience
with round trip engineering is that has its own weakness; it picks up all
minor parts of the code too, including things that are not necessarily is
important to get the main picture of the design.

Still, as others already mentioned, it is convenient to have a common
design language that is not implementation specific, and that is known by
most programmers out there. That's the strength of UML. Never mind the
fancy tools, which gets in your way, UML is first and foremost valuable
as a language to communicate design among your peers.

Myself, I mostly use class diagrams and sequence diagrams to introduce a
design to other developers. In most cases the diagrams never go further
than a whiteboard. When I have to, I use Umlet to persist them too.
 
R

Robert Klemme

In said:
I think the biggest problem [of UML] comes with keeping it up
to date.

The more expensive UML tools have round trip engineering which makes
keeping it up to date with code less of a hassle. My limited experience
with round trip engineering is that has its own weakness; it picks up all
minor parts of the code too, including things that are not necessarily is
important to get the main picture of the design.

Graphical programming (what these round trip tools promise to be able to
do) does not work. The mere fact that you need to have every part of
the code in the diagram leads to diagram overload. One of the important
tasks when creating diagrams (not only UML) is to select what needs to
be shown and how it needs to be shown. This is something a human needs
to do. It cannot be automated. Normally to understand a system only a
few classes need to be depicted and not with every detail (method, data
member etc.). Updating diagrams with every changed detail is tedious
and useless because it does not improve understanding. Often the basic
relationships between classes remain the same because they are at the
heart of the design.

And btw., roundtrip tools don't help much with updating diagrams which
are sitting in text documents. That still has to be done manually -
unless someone invents a system which manages everything (code and
documentation). But then it would still need a human being to decide
whether a new sub class should show up on a particular diagram or not.

My preferred tool is Visio with the free available set of UML stencils.
This makes creating UML diagrams easy (because all the elements are
there) but retains enough flexibility to mix in other information as needed.
Still, as others already mentioned, it is convenient to have a common
design language that is not implementation specific, and that is known by
most programmers out there. That's the strength of UML. Never mind the
fancy tools, which gets in your way, UML is first and foremost valuable
as a language to communicate design among your peers.

I couldn't agree more.
Myself, I mostly use class diagrams and sequence diagrams to introduce a
design to other developers. In most cases the diagrams never go further
than a whiteboard. When I have to, I use Umlet to persist them too.

I use these diagram types in decreasing (estimated) frequency:
- class
- activity
- state
- sequence

rarely:
- object
- deployment

Kind regards

robert
 
M

Martin Gregorie

And btw., roundtrip tools don't help much with updating diagrams which
are sitting in text documents. That still has to be done manually -
unless someone invents a system which manages everything (code and
documentation). But then it would still need a human being to decide
whether a new sub class should show up on a particular diagram or not.
I've only ever seen one that did. It came out of a UK University but
never seems to have come to anything. Its 'presentation face' mixed
textual documentation and code fragments in a similar fashion to K&R or
(better) Kernighan & Pike, while still keeping the ability to maintain
the text without interfering with the code and to develop and compile the
code without screwing up the overall look and feel of the 'presentation
face'. I can't remember how it dealt with diagrammatic material. I
thought it had a lot of promise though it was probably not a much higher-
level tool that Javadocs.

My main objection to all theses methodologies is that the documentation
is usually stored and maintained separately from the code, which to me
means that it isn't going to be maintained. As I've said before, the big
advantage, as I see it, of Javadocs is that at least there's a good
chance that module-level documentation will be maintained as the code
gets modified.

Its a pity there isn't anything similar for a system's higher level
documentation like, for instance a combination source repository and data
dictionary, but the nearest I've seen to a decent attempt at that was the
long-defunct ICL Advanced Data Dictionary with its four quadrant
structure, version control and linkages between the quadrants:

processes | entities
data and | attributes
control flow | relationships
---------------------------------------
programs | schemas
pipelines | storage schemas
process management | tables

This could generate project documentation and code (both DDS and program
source) and manage version control across an entire system.
 
S

Stefan Ram

Martin Gregorie said:
My main objection to all theses methodologies is that the documentation
is usually stored and maintained separately from the code, which to me
means that it isn't going to be maintained.

IIRC, Doxygen generates docs from the source code and has an
extension or an option that will also generate some UML diagrams
from the source code.

And then, what answer would a /professional/ give to the question
»Do you use UML?«? I think a /professional/ answer would be:
»Whenever I am paid (sufficiently) to do this.«
 
R

Robert Klemme

IIRC, Doxygen generates docs from the source code and has an
extension or an option that will also generate some UML diagrams
from the source code.

It has the same limitation as any other tool which generates diagrams
from source code: it cannot automatically add information needed for
proper diagram placement etc. The point is that laying out a diagram is
a creative task and diagrams are not just another representation of the
code. A properly crafted diagram adds information to what is present in
the code.
And then, what answer would a /professional/ give to the question
»Do you use UML?«? I think a /professional/ answer would be:
»Whenever I am paid (sufficiently) to do this.«

That does not sound like an answer of a software development
professional - it reminds me more of a professional contract killer.
You make it sound like doing UML diagrams was something tedious or
distasteful which needs additional payment for compensation. ("We're a
code shop only. If you need diagrams that'll cost you extra bucks.")
Rather the needs of the task at hand should dictate whether a diagram is
in order or not.

Cheers

robert
 
M

Martin Gregorie

If anything, it is more important to remove information. A diagram with
a box for each tree is not a good way of communicating the structure of
a forest.

+1
 
A

Arne Vajhøj

I think the biggest problem comes with keeping it up to date. This is
extra work, but without it the diagrams are worse than useless.

With the level of detail most often used in UML diagrams, they
should not need to be updated so often.

Arne
 
A

Arne Vajhøj

In said:
I think the biggest problem [of UML] comes with keeping it up
to date.

The more expensive UML tools have round trip engineering which makes
keeping it up to date with code less of a hassle. My limited experience
with round trip engineering is that has its own weakness; it picks up all
minor parts of the code too, including things that are not necessarily is
important to get the main picture of the design.

Graphical programming (what these round trip tools promise to be able to
do) does not work. The mere fact that you need to have every part of
the code in the diagram leads to diagram overload. One of the important
tasks when creating diagrams (not only UML) is to select what needs to
be shown and how it needs to be shown. This is something a human needs
to do. It cannot be automated. Normally to understand a system only a
few classes need to be depicted and not with every detail (method, data
member etc.). Updating diagrams with every changed detail is tedious
and useless because it does not improve understanding. Often the basic
relationships between classes remain the same because they are at the
heart of the design.

Completely agree.
My preferred tool is Visio with the free available set of UML stencils.
This makes creating UML diagrams easy (because all the elements are
there) but retains enough flexibility to mix in other information as
needed.

I think ArgoUML is pretty nice.

I has some generation and reverse generation capabilities but I consider
those more as one time tools than the real round trip tool.
I use these diagram types in decreasing (estimated) frequency:
- class
- activity
- state
- sequence

rarely:
- object
- deployment

For me: class, sequence, deployment, activity, use case.

Arne
 
A

Arne Vajhøj

If anything, it is more important to remove information. A diagram with
a box for each tree is not a good way of communicating the structure of
a forest.

Yes.

Someone smart once said that insight is not about collecting
information but about throwing away information.

Arne
 
R

Robert Klemme

If anything, it is more important to remove information. A diagram with
a box for each tree is not a good way of communicating the structure of
a forest.

Right. It's both: adding and removing, but the point remains the same:
this is a task which cannot be automated.

Kind regards

robert
 
R

Robert Klemme

I have professionally worked with a framework that tries to do this, so
I've got a bit experience in that. It works remarkably well.

I'd love to learn the name of the tool you used.
What we were doing, when we were using the tool, was to model the
database entities in detail as class diagrams, but for the activity
diagrams we had to keep as much technical detail out of the diagrams as
possible and abstract a lot.

What does that mean? Are your activity diagrams disconnected from the
Java code?
We described the broad business decisions
only and coded the detail like you've been doing it all the time: In
plain old Java. For conditionals, the framework generated a hook method
from the diagram, which we filled with life. For each activity a view
was generated by the framework, which we could customize using a UI-
designer and Java.

Do you mean view as in MVC? What kind of application are we talking
about here?
It's very convenient, as long as you don't try to squeeze everything
into one diagram.
Obviously.

The only drawback is that you're virtually always
short of screen estate.
:)


We've not put the diagrams onto paper. All we modelled and talked about
was stored in model-files that the system held in sync with the
software.

I wasn't specifically talking about paper. Did you include diagrams in
text documents (design documents) which explained the rationale of the
design in a more reader friendly way? If yes, how did you deal with
updating diagrams? If not, how did you convey the essence of the design
to other people (new team members etc.)?

Kind regards

robert
 
G

Gene Wirchenko

On Sat, 21 Jul 2012 00:02:08 +0200, Robert Klemme

[snip]
That does not sound like an answer of a software development
professional - it reminds me more of a professional contract killer.
You make it sound like doing UML diagrams was something tedious or
distasteful which needs additional payment for compensation. ("We're a
code shop only. If you need diagrams that'll cost you extra bucks.")
Rather the needs of the task at hand should dictate whether a diagram is
in order or not.

I have not found formal diagramming to be very useful. I had to
document using UML diagrams in some of my uni courses. I generally
did them *after* I wrote the code. Creating them required a bunch of
fiddling to make them come out clear. They were a time sink and did
not add anything to my understanding of the system.

OTOH, in-line code documentation I wrote as I coded. That stuff
was useful.

User documentation was stright-forward typing. I did that after
coding using bits of code as needed.

I can understand someone not wanting to do things that do not
help do the job. Avoid needless work.

Sincerely,

Gene Wirchenko
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top