Live data from Hacker News

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

mermaidchart.com

21–30 of 427 posts

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

#21
> Comprehensibility > Comprehensiveness #

> The most common failure mode for sequence diagrams is over-complication. (This also is the failure mode for most diagrams, as I wrote in an article on flow charts).

Agreed.

UML – with the goal of being a graphical language for _complete_ specification of a system (both for code generation as well as to have diagrams generated from code introspection) – has to be exhaustive, therefore fails at showing the big picture.

Use of UML that could accommodate multiple levels of abstraction would fix that. I believe this is what C4 [1] tries to achieve with 4 levels of diagram. Unfortunately everybody who invents a new diagram model also reinvents the wheel and throws the entire UML away. One could easily use UML visual language, but just standardise on using the 4 levels diagrams of C4.

[1] https://c4model.com

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

#22
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…

> I see them used all the time in FAANG.

Does that mean something? Besides you saying you worked in them? It’s a question ; I don’t know.

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

#24
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…

Why the university teaches outdated useless stuff? My guesses: - For the university, it fills out offerings and takes up credit hours, keeps the tuition dollars flowing - For the teacher, it's something they already know how to teach, so it doesn't require nearly as much effort to teach as something more useful but maybe less familiar - Universities are trusted with the decisions of what to teach and don't face much…

I'd offer another, possible reason:

- University professors who remain exclusively in academia missed the rising tide and teach what they know

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

#25
I've been toying with flow-based programming again, and it works relatively well as an implementation choice for the same "high level" that sequence diagrams cover: The parts of a lifeline that need to wait are reified as stalled information packets, while request/response APIs are wrapped into nodes(which I've found is a good starting point for practical application - make a library of nodes from API calls). The rest is defined by graph wiring and data types.

As a graph model, FBP lets you fan out widely, but that is something you don't actually want to do most of the time: the benefit I am seeking it out for is in the bounded buffers adding backpressure regulation and debuggability. As such I've currently settled on mostly defining ports in terms of structured data types, then doing destructuring/merging/splitting in custom processors.

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

#26
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…

Why the university teaches outdated useless stuff? My guesses: - For the university, it fills out offerings and takes up credit hours, keeps the tuition dollars flowing - For the teacher, it's something they already know how to teach, so it doesn't require nearly as much effort to teach as something more useful but maybe less familiar - Universities are trusted with the decisions of what to teach and don't face much…

My graduate program did not teach UML, but I did learn it during my undergrad program. It was a relatively small part of the major software engineering course. It introduced the idea of formally specifying software, and it forced me to reestablish, visualize, and otherwise integrate what I was simultaneously learning about things like interfaces and inheritance. It was presented as an educational tool and not at all that we would be using it in industry. Far from useless or out of date in an educational context.

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

#28
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 machines can require some extra upfront design, but if you have a non-trivial amount of states, it's pretty much guaranteed to be worth it.

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

#30
UML was yet another fad overdone. Many IT fads do produce useful niches or specific products, but the impression given at the time is they'll replace most of what came before. That's rarely the case. I can list about 25 "trends" like that since the late 80's. Chasing fads has gummed up too many stacks and standards.
Post reply on HN