Live data from Hacker News

Sequence diagrams, the only good thing UML brought to software development

mermaidchart.com

361–370 of 427 posts

Re: Sequence diagrams, the only good thing UML brought to software development

#361

Earlier quoted context omitted.

> Maybe in the not-too-distant future we will have AI grokking large code bases and cranking out accurate, useful, UML diagrams out of it. > All those diagrams, when they are complete, correct and up-to-date, do convey what they are supposed to convey. I spent a bit of time prototyping this recently. It's definitely possible. Rational Rose also had the capability to generate diagrams from code though. I don't remembe…

The problem isn't generating UML from code, the problem is generating useful UML from code. Where those boxes are in relation to each other matters. You can't just randomly throw boxes and lines on the page, you need to arrange them so that boxes that we can tell what things are related by how close they are to each other. Automatic UML doesn't capture that. Sometime you have complexity in code that needs tobe hidden…

> The problem isn't generating UML from code, the problem is generating useful UML from code.

I would kill for a tool that could output class and sequence diagrams from a project or component. If the format is editable and tools can automatically layout/filter out components, all the better. Right now the main time sink in putting together diagrams is trying to express what's in the code. Once that's in place, we can prune stuff we don't need.

Re: Sequence diagrams, the only good thing UML brought to software development

#362
post #217

Earlier quoted context omitted.

I can’t remember where I read this (Martin Fowler maybe?), but I agree that “box and line” diagrams should be enough for most design cases. I was eager to use UML when it came out but I agree with the article, the only thing I kept was sequence diagrams. Most of the rest of it was just a complicated way to represent stuff that is best represented in code or plain documentation. I’m also not afraid to use stuff that’s…

I like use case diagrams as well. Thing is these should be short lived and used to make specific illustration in specific time. Not some holy grail of documentation that people should take as some god given truth for whole life of the system.

Yes, actors and actions. It's the crux of the use case. I'm still operating under the assumption that UML invented the modern use case. I will not be googling this next.

Re: Sequence diagrams, the only good thing UML brought to software development

#363
post #80

Earlier quoted context omitted.

People who say "UML is useless" basically say "diagrams are useless". Which obviously isn't true. The alternative to UML is everyone inventing their own "diagram language" when they want to visualize something. Moreover, I think comparing different UML diagrams can also be enlightening for university students. E.g. state machine digrams look quite similar to activity diagrams, but the former emphasize states and the…

UML as a projection is fine and a valuable tool. Starting with UML to describe a set of classes or - worse yet - an entire system is lunacy and a massive red flag.

> Starting with UML to describe a set of classes or - worse yet - an entire system is lunacy and a massive red flag.

I don't think this is right or a well founded opinion. The whole point of any diagram language, including UML, is to provide the means to describe software projects in different views, including class diagrams but also component and system diagrams.

What do you think is the whole point of a modeling language?

Re: Sequence diagrams, the only good thing UML brought to software development

#364
post #363

Earlier quoted context omitted.

UML as a projection is fine and a valuable tool. Starting with UML to describe a set of classes or - worse yet - an entire system is lunacy and a massive red flag.

> Starting with UML to describe a set of classes or - worse yet - an entire system is lunacy and a massive red flag. I don't think this is right or a well founded opinion. The whole point of any diagram language, including UML, is to provide the means to describe software projects in different views, including class diagrams but also component and system diagrams. What do you think is the whole point of a modeling la…

I think you are making the mistake of assuming that because something is an important motivation for a class of things, it must also be a good use for every instance of that class.

Sometimes motivations are misguided, and sometimes instances aren’t well fit for major motivations of their broader class.

Re: Sequence diagrams, the only good thing UML brought to software development

#365

Earlier quoted context omitted.

UML as a projection is fine and a valuable tool. Starting with UML to describe a set of classes or - worse yet - an entire system is lunacy and a massive red flag.

What's wrong with describing some classes first with a UML diagram?

The fact that it doesn’t provide any benefit or make things particularly simpler than describing them in code and projecting them to UML if you need a visual diagram. Also, the fact that it is particularly counterproductive if I’m not coding in a pure class-based OOP language, since it presupposes that the solution is centered on class-based OOP.

There a diagrams that are useful before coding, but most of them aren’t part of UML, which is a product of the simultaneous highwater of class-based-OOP-is-everything and pre-Agile industrial software development methodologies, and (except for some isolated bits) poorly fit to anything else.

Re: Sequence diagrams, the only good thing UML brought to software development

#366
post #363

Earlier quoted context omitted.

> Starting with UML to describe a set of classes or - worse yet - an entire system is lunacy and a massive red flag. I don't think this is right or a well founded opinion. The whole point of any diagram language, including UML, is to provide the means to describe software projects in different views, including class diagrams but also component and system diagrams. What do you think is the whole point of a modeling la…

I think you are making the mistake of assuming that because something is an important motivation for a class of things, it must also be a good use for every instance of that class. Sometimes motivations are misguided, and sometimes instances aren’t well fit for major motivations of their broader class.

> (...) it must also be a good use for every instance of that class.

You, and OP, failed to present a single argument supporting the thesis that modeling languages in general, and UML in particular, are "lunacy and a massive red flag."

> Sometimes motivations are misguided (...)

Not only did you failed to support anything in the original anti-diagram rant, now you also tried to support generalizations with hypothetical corner cases involving misuses, which is an absurd argument to make.

So not only do you have zero substance for show with regards to the original anti-UML rant, you also resort to using vague, unsubstantiated strawmen.

This is to be expected. Like many discussions involving technical aspects, generally detractors come from positions of opinionated ignorance.

Re: Sequence diagrams, the only good thing UML brought to software development

#367
post #366

Earlier quoted context omitted.

I think you are making the mistake of assuming that because something is an important motivation for a class of things, it must also be a good use for every instance of that class. Sometimes motivations are misguided, and sometimes instances aren’t well fit for major motivations of their broader class.

> (...) it must also be a good use for every instance of that class. You, and OP, failed to present a single argument supporting the thesis that modeling languages in general, and UML in particular, are "lunacy and a massive red flag." > Sometimes motivations are misguided (...) Not only did you failed to support anything in the original anti-diagram rant, now you also tried to support generalizations with hypothetic…

> You, and OP, failed to present a single argument supporting the thesis that modeling languages in general, and UML in particular, are “lunacy and a massive red flag.”

I failed to support that thesis because I never endorsed it. Pointing out a flaw in a counterargument is not endorsing the argument it is deployed against.

Re: Sequence diagrams, the only good thing UML brought to software development

#368
post #363

Earlier quoted context omitted.

UML as a projection is fine and a valuable tool. Starting with UML to describe a set of classes or - worse yet - an entire system is lunacy and a massive red flag.

> Starting with UML to describe a set of classes or - worse yet - an entire system is lunacy and a massive red flag. I don't think this is right or a well founded opinion. The whole point of any diagram language, including UML, is to provide the means to describe software projects in different views, including class diagrams but also component and system diagrams. What do you think is the whole point of a modeling la…

> What do you think is the whole point of a modeling language?

Not building an entire system down to class level which is what it is all too often used for (in my experience exclusively by people who have never and cannot code).

It's inefficient, doesn't play well with Software Engineering (diff, version control etc..) and is a relic of the past.

Keep the classes in code, project that into a diagram for the few occasions that is actually needed, and stick to a simplified tool like C4 (https://c4model.com) for your architectural views. Sprinkle some sequence diagrams in too to help describe the key data flows (they're handy next to C4).

Why use C4 over UML? Because the vast majority of the audience don't even know what UML is. So keep it extremely simple and include a key / guide to any of the (few) shapes or colors you use so that it's completely self contained.

The vast majority of UML belongs to be put into the Indiana Jones storage facility along with other archaic ideas such as Function Points / Function Point Analysis.

Post reply on HN