Live data from Hacker News

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

mermaidchart.com

91–100 of 427 posts

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

#91
I feel validated by this headline/post. I've said the same thing over and over in my career and am always astounded when I get pushback on using them as a means to describe systems and interactions, including from some managers (that weren't coders very long), that would claim "nobody uses them, just read the code".

I don't know how you communicate how systems work without them. You either create a terrible non visual version in the docs or a person ends up drawing them on a whiteboard from memory to pass that knowledge down.

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

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

>That time was mostly wasted as I've never used any of it and never met anyone who has used it.

So here's the conflict: if we agree that planning is good, communication is good, and that it is faster / cheaper to design before we build rather than rushing in to build something, then is it not a good idea to have something like UML in our tool kit? Perhaps UML was too complicated or overbearing, but I've always felt like a universal tool to describe aspects of the software we are building is fundamentally a good concept. Further, it feels like the right idea to document / designing up front in a way that increases buy-in and communicates what we are doing.

So if not UML, then what?

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

#93
I think autogenerating UML from existing code to get an overview over e.g. your database schema, state machine or class hierarchy is fine. Hand-drawn UML is useless busywork, it is usually faster and quicker to just write the code. Also, autogenerated UML doesn't go stale as easily, since you can just automatically recreate it.

And I agree, the most useful diagram type is a sequence diagram. The rest is often useless because OOP has declined, weird arrow types are unintuitive, language features do not always correspond to UML features and UML tooling doesn't fit very well into common software development methods. E.g. you cannot 'git diff' UML diagrams; while it would be theoretically possible (git diff can take helpers), no software implements this, that I know of.

Overall, about UML's decline, good riddance. Throwing boxes and arrows at a whiteboard occasionally (without tons of formal semantics) is all anyone needs.

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

#94
Sequence diagrams are a secret weapon for designing any complex system. The y direction (relative time) actually means something, unlike most abstract diagrams. The x direction (actors) highlights the discrete set of participants. The arrows actually mean something - bugs and features and new problems all exist at interactions between actors and be systematically decomposed into work items, just find the arrows.

I know there are more formal tools (The P language comes to mind) but it's hard to beat the simplicity of markdown that gets rendered directly in github's UI.

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

#95
post #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, ea…

Class diagrams feel pointless to me, this information works better as code, and how do you draw a class diagram with more than 10 classes and keep it readable?

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

#97
post #80
post #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, ea…

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…

> everyone inventing their own "diagram language"

This is clearly better than UML. UML is full of shorthands that nobody remembers. That's worse than people making labelled custom diagrams.

Here's an example:

https://buck2.build/docs/concepts/concept_map/

Imagine how much worse that would be with UML arrows.

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

#99

I would really like to use UML as documentation language more often, but I have yet to find a nice drawing that is simple, stupid and runs natively on GNU/Linux.

I also had a lot of problems finding usable software for drawing UML diagrams. In the end, I used UMLet, it worked sufficiently for my tiny class diagram and was easy to use and I could rearrange everything minutely as opposed to the underperforming auto-layouting done by PlantUML. I also tried around with StarUML but somehow it didn't stick. Time has been wasted in trying to recreate the same diagram in all these tools...

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

#100
post #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, ea…

Class diagrams feel pointless to me, this information works better as code, and how do you draw a class diagram with more than 10 classes and keep it readable?

I think class diagrams are a good way to visually display classes and hierarchy. If I have a package or module that has 10 classes and I want to show inheritance, properties, and methods I think it’s easier to show the class diagram then hand someone 10+ source files.

Also, class diagrams are more useful when you can’t give out source.

That being said, I think you can autogenerate class diagrams from code so it’s not like you should spend a lot of time making them.

Post reply on HN