Live data from Hacker News

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

mermaidchart.com

341–350 of 427 posts

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

#341
post #224

Earlier quoted context omitted.

My experience is that shipping stuff that doesn't get used by any actual end users is more often caused by thinking ahead too much than by thinking ahead too little.

I've actually seen it both ways: whole features (or even products) that were too early. But on the implementation level, I've seen someone pick the wrong thing (library, database, whatever) "because it was simple", only to have it be thrown out before getting any real usage.

"Pick the wrong thing and then retract, losing some work" is as close to optimal as you can get. Iterate.

The much worse outcome is "pick a thing, fiercely defend it whether it helps the ship to float or to sink".

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

#342
post #268
post #198

Earlier quoted context omitted.

We haven't told ourselves that shipping garbage in short cycles is the only way to do things. The market has pretty much determined that companies that over invest in formal software design activities lose out competitively in the long run, and the survivors are the ones with the right balance. You're welcome to prove the market wrong.

> The market has pretty much determined that companies that over invest in formal software design activities lose out competitively in the long run The same market that gave us AT&T, Comcast, DRMed IoT Juice presses, FTX, Enron, and so on? Not sure it’s wise to conclude that the market produces optimal solutions, or even incrementally better solutions than yesterday. Especially in domains with extremely long feedback…

AT&T, Comcast are great examples of companies that have tried to expand into online video distribution, and completely lost out to companies with better software management practices. Both of these companies had a huge leg up 10 years ago, in terms of customer base and equipment (set top boxes already present in many US households). Neither of them is more than a small blip now on Netflix's radar now, who have been able to leapfrog into installing their software on smart TVs. The margins they have and their growth rates are much, much smaller than software centric competitors.

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

#343
post #49

Earlier quoted context omitted.

I find Mermaid's syntax difficult to use and understand past the simplest examples. I've also run into some strange edge cases with it, but can't remember the details right now. Out of these text-to-diagram tools, D2's syntax seems the friendliest to me. See https://text-to-diagram.com/ .

Is there a way to get a git diagram out of D2? It does have nicely streamlined syntax. One thing that worries me is that the profusion of text-based graph description languages will result in a family of software that's unparseable due to its success. We have Graphviz, GNUplot, PlantUML, BlockDiag, Mermaid, Kroki, Vega, and too many others to count - but we don't have a Pandoc.

pandia has a nice ring to it, wikipedia:

In Greek mythology, the goddess Pandia or Pandeia was a daughter of Zeus and the goddess Selene, the Greek personification of the moon.

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

#344

Earlier quoted context omitted.

I've actually seen it both ways: whole features (or even products) that were too early. But on the implementation level, I've seen someone pick the wrong thing (library, database, whatever) "because it was simple", only to have it be thrown out before getting any real usage.

"Pick the wrong thing and then retract, losing some work" is as close to optimal as you can get. Iterate. The much worse outcome is "pick a thing, fiercely defend it whether it helps the ship to float or to sink".

I agree that outcome is worse. However, both extremes are bad. The optimal approach would be to do a little bit more work upfront, pick a "better" thing (where "better" is at least more than the next sprint or 3!), and use that.

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

#345
post #320

I've use sequence diagrams a few times. I find any kind of diagram tooling to be a tedious time sink. The resulting output is a talking point at best. Some window dressing for a presentation or internal document. Fluff you add to impress some easily impressed managers or clients. I always feel slightly dirty doing stuff like this. I have UML distilled on my shelf. A signed copy even. Haven't opened it in over two dec…

> And it takes a lot of effort to create them. Have you tried mermaidjs? It's probably related to mermaidchart.com -- I don't know. The first sequence diagram in the article boils down to this: sequenceDiagram Customer->>Bank: Login request Bank-->>Customer: Login approval with a fancier image for the customer than a box. Try it out at https://mermaid.live (linked from https://mermaid.js.org/ ) Or this one, from a se…

I've used mermaid and lots of other tools. Mermaid is my quick and dirty tool of choice lately, actually. I sank a lot of time in using mermaid to get some sequence diagrams. They suck both visually and the process of creating them is also terrible. But it gets the job done as far as ass-coverage is concerned.

The example above tells me that you have a bog standard login thingy that behaves exactly like a login thingy should work (no surprises there). A great way to fluff up some document where you state that your login thingy should be a thing in your thing. Great example of why diagrams are a waste of time. There is zero useful/surprising information in there. Plenty of things I would challenge though. Why does the app have to generate the id for example? What's wrong with the email address as an id?

So not only is it uninformative, it's probably wrong.

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

#346
I personally think Statecharts are a more useful construct than sequence diagrams. It encodes complex behaviour that a developer can use as a guide to develop.

More importantly it gives a good inkling of what behaviour is allowed and what is not allowed.

For example a statechart can encode that a traffic light can only turn green from amber and not from red.

It also has "H" history state which remembers which substate it was last in, when the system entered this composite state, the previous time. This allows to model behaviour that relies upon "memory" or past behaviour which is very common in real systems.

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

#347
post #258

Earlier quoted context omitted.

> A Data Dictionary is usually a better place for such details. Self-documenting code/schemas are an even better place. ...sometimes I feel like I'm the only one in the world who uses DB-level metadata (e.g. `sp_addextendedproperty` in SQL Server) to attach explanatory notes and other metadata to database objects, including columns and constraints - and it gets better because I modified my Entity Framework scaffoldin…

> Self-documenting code/schemas are an even better place But they don't offer enough columns and detail for certain things in my experience. A shop-rolled data dictionary can be "shaped" like shop needs.

Addendum: I suppose we could use sp_addextendedproperty, but it's usually just easier to work with a "regular" table.

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

#348
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, component, package, activity and state machine diagrams are all useful ways to model the structure and behavior of a system visually. I completely agree with you. It's a good way for other people to present information, for me to look at. I just won't do it myself. It's not only me; and that's why it's dead. I won't do it because the first thing that comes to mind is how it will go out of date in a month, an…

True, though nowadays I use PlantUML (https://plantuml.com/) which is a DSL using which we can create all kinds of UML diagrams. If any changes are to be made I just need to make the incremental changes using the DSL and regenerate the images. It has been very helpful.

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

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

Maybe UML can find a new life with ChatGPT. Maybe it can fulfill the promise of generating code out of diagrams. UML seems like a fine way to organize prompts.

Excellent comment and while maybe not UML, something like it is likely to emerge for exactly that purpose.

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

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

> 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.

Not exactly related, but this concept map looks amazingly similar to a semantic ontology. RDF/OWL may not be the easiest encoding, but is quite capable in organizing very large concept schemes.
Post reply on HN