Live data from Hacker News

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

mermaidchart.com

31–40 of 427 posts

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

#31
I also find sequence diagrams to be the most useful, but disagree that the rest of UML is useless. Class, component, package, activity and state machine diagrams are all useful ways to model the structure and behavior of a system visually.

The only reason the other diagram types fell out of favor is because of the development methodology change starting in the early 2000s. The industry started rejecting Waterfall, early design and system architects, in favor of Agile, just-in-time design and empowering developers. So we saw no need for these visual design tools to model the entire system, since we ended up changing the design during the lifetime of the project anyway. The drawback of this, of course, is that with the Agile approach these diagrams never end up being made, so developers are left to assemble their own mental model of the system, which hurts the overall comprehension. Most developers IME actively reject these diagrams because they are quickly outdated, or require constant changes to keep up to date, which is true, but this is not unlike documentation, comments, and a myriad other things that needs to be synced with the code.

Yet sequence diagrams are useful in a wide variety of use cases, and let's face it, they're the easiest ones to comprehend, and are even understandable by a non-technical audience. In contrast to the other UML diagram types that have strange notations and the information is more densely packed.

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

#32

UML is also really useful for modelling relational databases

May I ask what you feel UML brings-to-the-table that we don't already get with existing (non-UML) ER-diagrams?

UML is both broader and more formal that ER

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

#33
I am shocked - I completely agree with the author on all points!

Sequence diagrams are awesome. The rest of UML (and all the crazy Rational Rose nonsense!) was so much angst over such petty things on notation.

And then there is the dumpster fire called Enterprise Architect…

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

#34
post #8

Spot on, I agree that sequence diagrams are super useful, I see them used all the time in FAANG. I do really wonder why UML is still taught in universities, as the article states, it's pretty useless. I took a masters Software Engineering course at Georgia Tech two years ago and a big part of the class was learning UML. That time was mostly wasted as I've never used any of it and never met anyone who has used it. It…

Every software engineering team in my 20+ years career actually used 2-5 types of UML diagrams: classes, sequences, deployment, activity, state. I think it mostly depends on maturity of the team and engineering culture, whether UML is used or not. There’s certainly some value in it.

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

#36

Earlier quoted context omitted.

May I ask what you feel UML brings-to-the-table that we don't already get with existing (non-UML) ER-diagrams?

UML is both broader and more formal that ER

Can you give an example? Some try to put too much detail into ER diagrams in my opinion. A Data Dictionary is usually a better place for such details. ERD's should mostly be to illustrate relationships.

One trend/fad was to put words describing links between tables, but I usually didn't find such helpful. Maybe if the wording was done well it would help, but most seem forced in practice. Good naming takes experience. Maybe let newbies draft the phrases, but have someone with experience review it. I.e, mentoring.

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

#38
> Contrary to our expectations and previous work, the majority of sketches and diagrams contained at least some UML elements.

I don't have access to the paper, but I can't shake the feeling that those "some UML elements" were boxes with class names in them or something like that.

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

#39
post #8

Spot on, I agree that sequence diagrams are super useful, I see them used all the time in FAANG. I do really wonder why UML is still taught in universities, as the article states, it's pretty useless. I took a masters Software Engineering course at Georgia Tech two years ago and a big part of the class was learning UML. That time was mostly wasted as I've never used any of it and never met anyone who has used it. It…

Every software engineering team in my 20+ years career actually used 2-5 types of UML diagrams: classes, sequences, deployment, activity, state. I think it mostly depends on maturity of the team and engineering culture, whether UML is used or not. There’s certainly some value in it.

>I think it mostly depends on maturity of the team

yep. kids out of college feel most inclined to use it.

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

#40

I work with non-distributed (ish) systems, and I use watered down class diagrams much more often than sequence diagrams. But even when I was working on more distributed systems, I found more value in state machines and simplified class diagrams, actually. I think most cases where you're using a sequence diagram, a state machine is a better tool. Both for thought, and for implementation. Surfacing implicit state machi…

The problem with state machines that I run into often when using them, is "multi-dimensional" states.

When managing to get that right they are great, otherwise you get loads of edges...

Post reply on HN