News for hackers. Stuff that matters.
Re:Sequence diagrams, the only good thing UML brought to sof... by imiric on Thursday June 15, 2023 @01:38PM (#36343997)
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 sof... by kazinator on Thursday June 15, 2023 @02:09PM (#36344389)
> 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, and have to be maintained to stay accurate.

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.

Re:Sequence diagrams, the only good thing UML brought to sof... by slowmovintarget on Thursday June 15, 2023 @03:10PM (#36345121)
I'll draw those diagrams... on a whiteboard, sans boxes (Tufte). Great for point-in-time communication, less useful as specifications.
Re:Sequence diagrams, the only good thing UML brought to sof... by lemmsjid on Thursday June 15, 2023 @03:12PM (#36345147)
I've taken a throwaway approach to diagramming, where I'll produce them more or less on demand for a meeting or presentation, but not think of them as an enduring artifact. PlantUML is my friend here because I can knock out ugly but gets-the-point-across diagrams in 30 minutes before a meeting and check them into source control, so I can then take the bones of older diagrams and rework them for a fresh meeting.

I used to whiteboard for this, but that hasn't carried over well in the remote world. What I miss about whiteboarding though is that you can tell a story as you draw, so whoever's viewing can watch something unfold from a blank slate while I'm walking them through the history of whatever system we're describing. That said, I can make a PlantUML diagram much more correct than a whiteboard.

All that said I too would love for more of that to be automated increasingly through AI. And I suppose it should make sense conceptually, because for me the value of a crafted diagram over an automated one is that no one really wants to look at the insane ERD of an OLTP database or a production object model. They want the digestible high level vision of the important bits, or the bits that are relevant to the conversation taking place. So it's a summarization problem. How to get the right data to produce a correct summary is interesting--I'm sure if I look there's a dozen papers to read on a similar subject :).

Re:Sequence diagrams, the only good thing UML brought to sof... by 4lejandrito on Thursday June 15, 2023 @03:57PM (#36345657)
For whiteboarding remotely I use https://excalidraw.com. I use it exactly for your use case. I’ve told live stories with it.
Re:Sequence diagrams, the only good thing UML brought to sof... by theK on Thursday June 15, 2023 @04:27PM (#36346037)
excalidraw is great especially the paid product. One of the cases of a very good open core business plan. I hope they do well.
Re:Sequence diagrams, the only good thing UML brought to sof... by lemmsjid on Friday June 16, 2023 @03:00PM (#36362005)
Thank you, I'm going to give that a try!
Re:Sequence diagrams, the only good thing UML brought to sof... by theK on Thursday June 15, 2023 @04:25PM (#36346020)
That's a great approach that has worked for me too. I think plant is a great little system. Not only can you get your point over in a handful of lines of text but I have found out that it is quite easy to generate the plantuml programmatically. So instead of having to keep docs and code in sync you can end up generating your graphs in ci. The upside compared to big diagramming products is that plant requites no boilerplate and you can provably grep and sed most diagrams out of your codebase which is a quite low barrier to entry.
Re:Sequence diagrams, the only good thing UML brought to sof... by agumonkey on Thursday June 15, 2023 @04:09PM (#36345810)
surprisingly, for average crowds, who usually describe stuff in fluffy text, UML-like diagrams suddenly feel like going from VB5 to python3
Re:Sequence diagrams, the only good thing UML brought to sof... by starlust2 on Thursday June 15, 2023 @07:35PM (#36348520)
> 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 remember how good it was at the task though. Was Rational Rose just a very bad implementation?

I find the hate in this chat strange because diagrams are incredibly useful when working through complex problems* and then conveying that information to other engineers. My experience over 20+ years is that a huge portion of engineers can't grok complex problems from code alone.

*Most of my projects are optimizing billion+ row databases, micro-service architectures, and various other scaling challenges.

Re:Sequence diagrams, the only good thing UML brought to sof... by bluGill on Thursday June 15, 2023 @08:28PM (#36349160)
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 by default. I don't care about rare error cases most of the time, but automatic UML can't know what is the complexity needed for rare cases and what is complexity you need to show the junior on the first day.. related to this when i'm interested in one error path how do you hide the others?

Then the real killer of both. Next week there is a minor requirement change (new features we always knew were coming and planned for even), and now the code changed. UML doesn't follow that. Either you generate UML and have the above problems. Or you manually update UML in theory, but in practice just let it slide as the week after you know something else will change and you don't nees it today anyway.

Re:Sequence diagrams, the only good thing UML brought to sof... by imiric on Friday June 16, 2023 @02:05AM (#36352099)
> Or you manually update UML in theory, but in practice just let it slide as the week after you know something else will change and you don't nees it today anyway.

I've heard this argument many times, but how is it different from keeping documentation, comments, tests, or the issue tracker up to date?

They all require some discipline, but if the team finds value in any of these things, they would make an effort to keep them synchronized with the code.

Besides, I suggest not falling in the trap of having formal design documents early on in the project's lifetime. Rather start with informal diagrams and sketches, and once the design has mostly settled, switch to something like UML. This would mean it wouldn't require changes every other week.

As for automatically generating, and dynamically arranging diagrams, this is more up to the generating tool than UML. These tools are still stuck using decades old technology at this point AFAIA, but there's no reason that a smarter tool couldn't do the things you mention.

Re:Sequence diagrams, the only good thing UML brought to sof... by rewmie on Saturday June 17, 2023 @10:25AM (#36370431)
> 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 sof... by ngc248 on Friday June 16, 2023 @11:45AM (#36358590)
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 sof... by cubefox on Thursday June 15, 2023 @02:17PM (#36344506)
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 latter actions. And class diagrams let you learn the connection between class structures of OOP languages and database structures.

UML lets you visually learn the abstract higher level concepts without having to rely on irrelevant specifics of practical implementations, or just on dry theoretical text.

Re:Sequence diagrams, the only good thing UML brought to sof... by auggierose on Thursday June 15, 2023 @02:22PM (#36344561)
The nice thing about visual stuff is that it is self-explanatory. Instead of needing to read a book about UML first, maybe just use some prose in addition to your diagrams, and you don't need UML at all then. That's also more flexibel.
Re:Sequence diagrams, the only good thing UML brought to sof... by bigbillheck on Thursday June 15, 2023 @05:16PM (#36346606)
> it is self-explanatory

It most certainly is not.

Re:Sequence diagrams, the only good thing UML brought to sof... by IshKebab on Thursday June 15, 2023 @02:45PM (#36344872)
> 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 sof... by cubefox on Thursday June 15, 2023 @05:43PM (#36346966)
That concept map example is only a loose association of ideas, where the nodes aren't of the same type (e.g. event, state, class etc), or sorted into types, and apparently included quite arbitrarily. Mind maps are similarly loose. UML is for when you want more precise diagrams about a fixed subject matter.

I agree on the "shorthands", like empty/filled arrows, that people may not know. But there isn't much alternative to such shorthands other than leaving them out completely, which wouldn't be an advantage. In diagrams some information is either conveyed succinctly or not at all. The "alternative" is a block of text instead of a diagram.

Re:Sequence diagrams, the only good thing UML brought to sof... by yencabulator on Thursday June 15, 2023 @07:55PM (#36348816)
That's heavy backpedaling from your earlier

> People who say "UML is useless" basically say "diagrams are useless".

Re:Sequence diagrams, the only good thing UML brought to sof... by cubefox on Thursday June 15, 2023 @08:23PM (#36349114)
Well, if you only allow concept maps and mind maps, then I guess, yes, you don't actually say (all) diagrams are useless. But you are pretty close.
Re:Sequence diagrams, the only good thing UML brought to sof... by kmerroll on Friday June 16, 2023 @12:42PM (#36359628)
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.
Re:Sequence diagrams, the only good thing UML brought to sof... by radicalbyte on Thursday June 15, 2023 @03:14PM (#36345166)
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.

Re:Sequence diagrams, the only good thing UML brought to sof... by cubefox on Thursday June 15, 2023 @08:21PM (#36349093)
What's wrong with describing some classes first with a UML diagram?
Re:Sequence diagrams, the only good thing UML brought to sof... by wiz21c on Friday June 16, 2023 @02:24AM (#36352258)
Nothing wrong, but code is already formal enough that you don't need a formal visual language (UML is not just a bunch of diagrams, it's a formal language). So yeah, a bit of drawing might help to understand, a few ideas from UML might help, but it's not like it is super necessary.

As said, the sequence diagram is a real plus because sequence information is not very well expressed by code, so that diagram has much added value.

I personnaly find UML hard to use becaues if you want to communicate your ideas precisely, you have to know much of its formalism and most often, people who read your drawings don't master its intricacies, so communication quality is no good...

Re:Sequence diagrams, the only good thing UML brought to sof... by throwaway290 on Friday June 16, 2023 @03:15AM (#36352674)
> code is already formal enough that you don't need a formal visual language

Code can be formal enough but in reality it is almost never formal enough. Many constraints can be expressed imperatively (eg. someone validates the number of related objects in the create view) and in unexpected places (across repositories and libraries and maybe not even in code but in some stored procedure). And then it is all in flux and can go away the moment you change your stack.

I don't know if UML is perfectly flexible (maybe?) but its sure benefit is a source of truth that does not depend on your implementation.

Re:Sequence diagrams, the only good thing UML brought to sof... by dragonwriter on Saturday June 17, 2023 @11:28AM (#36371057)
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 sof... by rewmie on Saturday June 17, 2023 @11:01AM (#36370772)
> 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 sof... by dragonwriter on Saturday June 17, 2023 @11:21AM (#36370986)
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 sof... by rewmie on Saturday June 17, 2023 @01:09PM (#36372123)
> (...) 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 sof... by dragonwriter on Saturday June 17, 2023 @01:21PM (#36372234)
> 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 sof... by radicalbyte on Saturday June 17, 2023 @02:15PM (#36372828)
> 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.

Re:Sequence diagrams, the only good thing UML brought to sof... by rewmie on Sunday June 18, 2023 @05:25PM (#36384659)
> Not building an entire system down to class level (...)

That was never the point of modeling languages.

Your baseless assumption is even more absurd when you factor in the fact that modeling languages even express runtime behavior, componente, and packaging.

The main problem with these mindless attacks on modeling languages in general and UML in particular is that the bulk of their retractors clearly knows nothing nor has any direct contact with them, or how they are used in the real world. Their arguments are nothing more than poorly thought through strawmen. Your comment fits well.

> Why use C4 over UML?

See, this is a telltale sign you know nothing about what you're commenting on. Not only is C4 a modelling language like UML but it also covers the exact same responsibilities and features of UML. C4's main selling point is advocating for the representation multiple points of view, and UML is a standard specification to express all the points of view you see fit in a coherent and rational way. There is no C4 vs UML. They have both the exact same design goals and usecases.

Re:Sequence diagrams, the only good thing UML brought to sof... by pshc on Thursday June 15, 2023 @03:55PM (#36345635)
The superior alternative is drawing a diagram on a piece of paper to exercise the mind and show to collaborators, and never setting foot anywhere close to the UML tarpit.
Re:Sequence diagrams, the only good thing UML brought to sof... by pavon on Thursday June 15, 2023 @04:47PM (#36346304)
There are other types of diagrams beyond what UML formalizes. For example, Data Flow diagrams can be very helpful, but they don't exist in UML (Component, Composite Structure, and Activity diagrams all have similarities with Data Flow diagrams, but none are really a great fit).
Re:Sequence diagrams, the only good thing UML brought to sof... by Kwpolska on Thursday June 15, 2023 @02:43PM (#36344851)
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 sof... by johannes1234321 on Thursday June 15, 2023 @03:01PM (#36345031)
If you use class diagrams to show the "truth" you are in painland in my experience.

However I sometimes find them useful to extract key parts of the system and showing their interaction. Cutting away many attributes, many helper classes, many other things.

That can lead to pictures which are quick to grasp and then allow further digging based on code.

Re:Sequence diagrams, the only good thing UML brought to sof... by holoduke on Thursday June 15, 2023 @03:06PM (#36345084)
Maybe before you actually start writing code its nice to create some domain diagrams which you can convert to class diagrams. Saves a ton of time. And you have good discussions about the general high level workings of an architecture. Can be done on a whiteboard. Make some pics and start coding.
Re:Sequence diagrams, the only good thing UML brought to sof... by radicalbyte on Thursday June 15, 2023 @03:18PM (#36345211)
Assuming that you're using a modern IDE: it is an order of magnitude quicker to model the domain (classes + attributes) in code and project them as diagrams, say with graphvis.

High level boxes are great for thinking about systems but the key there is abstraction - minimal viable level of detail..

Re:Sequence diagrams, the only good thing UML brought to sof... by holoduke on Thursday June 15, 2023 @05:36PM (#36346854)
Dont you want to discuss and talk about a design before you even touch a keyboard? In my projects we always discus high level overviews with pen and whiteboards. Nobody should even dare to touch a keyboard.
Re:Sequence diagrams, the only good thing UML brought to sof... by radicalbyte on Friday June 16, 2023 @05:17AM (#36353691)
Absolutely, I pretty much always start with design sessions on a whiteboard (or if remote a call using draw.io).

That discussion is almost never going down the the level of an individual class and NEVER adheres to the UML standard.

Very occasionally I've had discussions about class structure by drawing class name + methods on a whiteboard but having the same discussion using Visual Studio's UML projection was just as effective.

Re:Sequence diagrams, the only good thing UML brought to sof... by TuringTest on Friday June 16, 2023 @02:08AM (#36352127)
If you're creating diagrams with graphvis, you're just coding on another language. The benefits of diagrams appear when you draw them by hand (or graphically by mouse).
Re:Sequence diagrams, the only good thing UML brought to sof... by radicalbyte on Friday June 16, 2023 @05:22AM (#36353732)
I generate them: initially with my own generator (which is copyright an employer from > 15 years ago), on a later project I found that Doxygen can do do that for you out of the box :-)

For interactive discussion I just use Visual Studio's projection, for databases I use the SQL Server Management Tool ERD projector or pgAdmin if I'm using Postgres.

Re:Sequence diagrams, the only good thing UML brought to sof... by TuringTest on Saturday June 17, 2023 @04:02AM (#36368253)
The point is that you're generating diagrams from code that's already been written, you're not modelling, do you? ;-)

Those are a different kind of diagram than the one you create from scratch to decide what goes in the program.

Re:Sequence diagrams, the only good thing UML brought to sof... by jxramos on Friday June 16, 2023 @02:54AM (#36352505)
this phrase caught my eye, "minimally viable level of detail", to which I immediately thought "minimal detail for a coherent thought". That's a cool concept actually I might hold on to and develop.
Re:Sequence diagrams, the only good thing UML brought to sof... by prepend on Thursday June 15, 2023 @02:50PM (#36344945)
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.

Re:Sequence diagrams, the only good thing UML brought to sof... by lesuorac on Thursday June 15, 2023 @03:33PM (#36345374)
> 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.

I dunno, whenever I heard people say they're doing Agile all I see is them doing Waterfall without documentation.

Re:Sequence diagrams, the only good thing UML brought to sof... by bluGill on Thursday June 15, 2023 @09:02PM (#36349462)
How is that worse than waterfall with outdated documentation which is what we had before.
Re:Sequence diagrams, the only good thing UML brought to sof... by sfn42 on Friday June 16, 2023 @03:03AM (#36352579)
"we are lazy assholes who can't keep docs up to date, therefore docs are useless"

Is essentially the argument i see over and over again. And every time i start a new project and that project has docs or uml or whatever I appreciate it. Even if it is a bit out of date, it's way better than nothing.

In my opinion, every project should have a readme file with instructions for running the project locally, and ideally also a high level visual representation of the system.

It should be separated into sub systems/modules for separate functionality and each module could have it's own set of readme and high level visuals. In addition, modules should have small coupling points, typically interfaces and these should have documentation comments describing what they do, inputs, outputs etc. APIs should have something like a swagger doc.

Re:Sequence diagrams, the only good thing UML brought to sof... by hitchstory on Friday June 16, 2023 @04:39AM (#36353362)
It's not a question of laziness. People just need to use better tools to generate docs and fail CI if the implementation and docs diverge.

I used to hear people say the same thing about laziness about code style before reformatting/linting tools became standard.

Re:Sequence diagrams, the only good thing UML brought to sof... by sfn42 on Friday June 16, 2023 @07:07AM (#36354600)
> It's not a question of laziness, it's just that people don't do it so you need automated tools to do it for them

Sounds a lot like laziness to me. It may be more accurate to say it's because people don't care. I've seen projects full of typos. Ive seen projects where basically everything had been duplicated not once but twice because they wanted a slightly different version of the same website so instead of adding some configuration or otherwise finding a reasonable solution for it they just went and copied hundreds of files and prefixed their names before making a couple minor changes and leaving the mess for someone else to discover. No mention anywhere of the fact that this had been done, nor why.

These are the actions of people who don't give a shit. Whatever problems they create are someone else's problems. The way i see it, if you care about your work you'll make sure the code is readable, well documented and so on. If you don't, you won't.

Re:Sequence diagrams, the only good thing UML brought to sof... by bluGill on Friday June 16, 2023 @09:19AM (#36356098)
Name me a tool that verifies UML and code are up to date in ci. Now lets add requirements that it is good UML.

Don't forget that some details shouldn't be in UML.

Re:Sequence diagrams, the only good thing UML brought to sof... by aleph_minus_one on Friday June 16, 2023 @07:27AM (#36354770)
> "we are lazy assholes who can't keep docs up to date, therefore docs are useless"

Rather: managers do not highly value work on documentation, so many programmers care little about it. If writing good documentation was valued more by managers than implementing feature stories, the situation would be different. Incentives do matter.

Re:Sequence diagrams, the only good thing UML brought to sof... by sfn42 on Friday June 16, 2023 @08:03AM (#36355137)
We are the engineers. It is up to us to tell non technical managers what's important. They don't know shit, they're just there to handle the shit we don't want to handle, like talking to clients or upper management or whatever.

It's all just bad excuses for not doing work properly. Writing clean and well documented code very quickly becomes faster than writing a tangled undocumented mess.

Re:Sequence diagrams, the only good thing UML brought to sof... by johnyzee on Thursday June 15, 2023 @04:46PM (#36346297)
> Most developers IME actively reject these diagrams because they are quickly outdated, or require constant changes to keep up to date

Plans are useless, but planning is indispensable. The act of diagramming things up front is useful to get you thinking about the problem space and come up with the outline of a solution. After that, keeping the initial design documents up-to-date is optional, and often might not be necessary.

Re:Sequence diagrams, the only good thing UML brought to sof... by imiric on Thursday June 15, 2023 @05:49PM (#36347060)
I think about it the other way around, actually.

During the prototyping phase diagrams do help, but they're usually sketches written on paper or whiteboard. You don't want to waste time with tools and strict specifications to design perfect diagrams, mostly because the design will change frequently, and you don't want your tools getting in the way.

Later on, once the design has settled down and maybe once development has started, those initial diagrams are mostly worthless, but you _do_ want neat and professionally done design documents that describe the system. This allows you to share them with coworkers, and quickly onboard other developers to the project. Hopefully by then the design won't change frequently, which would make updating these a chore.

Re:Sequence diagrams, the only good thing UML brought to sof... by codalan on Thursday June 15, 2023 @05:56PM (#36347180)
UML was (and still is) really useful when embarking on a greenfield design. Most people I've worked with know some basic UML notation, so when it comes to whiteboarding and refining the design, it makes sense to go with that.

In terms of artifacts for future maintainers? Maybe not as helpful. As previous posters have mentioned, the diagrams go stale very quickly if the engineering department isn't disciplined about keeping documentation up to date. But this is true for any documentation.

Some diagrams (class and activity, in particular) are less valuable as time passes. I can get the idea of the class structure by just looking at the code itself. The class diagram just ends up being a stale representation of the code.

It is unfortunate that UML has developed a reputation as being overly complex. Now I see more ad-hoc diagrams being created, with whatever notation/symbols make sense to author, rather than using a common diagram system that can be read by many.

Re:Sequence diagrams, the only good thing UML brought to sof... by jameshart on Thursday June 15, 2023 @09:59PM (#36350001)
Sequence diagrams are the only bit of UML that also applies to distributed systems. And everything today is a distributed system.
Re:Sequence diagrams, the only good thing UML brought to sof... by agumonkey on Friday June 16, 2023 @12:15AM (#36351145)
to me seq diagrams are .. too sequential, my brain needs a protocol / graph proof like formalism to see things more globally.
Re:Sequence diagrams, the only good thing UML brought to sof... by BerislavLopac on Friday June 16, 2023 @03:53AM (#36352989)
> Class, component, package, activity and state machine diagrams are all useful ways to model the structure and behavior of a system visually

They're not bad, but the C4 model is a much better approach to high level modelling (while you can still use class diagrams on the lowest level). https://c4model.com/

Re:Sequence diagrams, the only good thing UML brought to sof... by phoehne on Friday June 16, 2023 @08:52AM (#36355750)
We also moved to framework heavy development where you write classes that plug into frameworks. So a POJO here and a POJO there… (everywhere a POJO) that are managed by a framework and exist only to extend the framework are marginally useful. A UML class diagram for a Spring Batch transformer that’s cobbled together from an existing CSV reader component, just isn’t that interesting or necessary.
Re:Sequence diagrams, the only good thing UML brought to sof... by Vox_Leone on Friday June 16, 2023 @09:10AM (#36355984)
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.
Re:Sequence diagrams, the only good thing UML brought to sof... by kmerroll on Friday June 16, 2023 @12:39PM (#36359571)
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 sof... by collyw on Friday June 16, 2023 @09:40AM (#36356436)
Does anyone else find the agile way of doing things just ends up with lots of increments and no big picture of how the system should be or where it should be going? There also seems to be a with with waterfall that it's a one way process and you can't do iterations.
Re:Sequence diagrams, the only good thing UML brought to sof... by rewmie on Saturday June 17, 2023 @10:20AM (#36370379)
> 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.

It wasn't also visual design tools that Agile killed. Agile killed design documentation altogether.

With Agile, today's problems are addressed on tomorrow's sprint, and changes in software architecture take place only in the code. Any effort to document the system architecture in any remotely rigorous way is quickly deprecated, and teams simply don't waste time maintaining something that might already be deprecated once they finish editing the document.