Comment by tombert
3 days ago
I had to do a UML thing for the first time in years for a class a few weeks ago[2].
I'm not 100% convinced that UML is actually useful at all. Obviously if you find value from it, don't let me take that from you, by all means keep doing it, but all it seemed to provide was boxes pointing to other boxes for stuff that really wasn't unclear from looking directly at the code anyway. It's really not that hard to look directly at the class and look directly at the "extends" keyword (or the equivalent for whatever language you're using) and then follow from there. Maybe if you had like ten layers of inheritance it could be valuable, but if you're doing ten layers of inheritance there's a good chance that your code will be incomprehensible regardless.
I'm not against visual diagrams for code, I draw logic out with Draw.io all the time and I've been hacking on the RoboTool [1] toolkit a bit in my free time, but what UML offers always felt more masturbatory than useful.
Maybe I'm wrong, it certainly wouldn't be the first time, but every time I've tried to convince myself to like it I've left a little disappointed. It always kind of felt like stuff the enterprise world does to look like they're working hard and creating value.
[1] https://robostar.cs.york.ac.uk/robotool/
ETA:
[2] By "class", I meant like an education class, not a Java class.*
For many of us UML has been completely irrelevant for decades. If you're deep down the OOP rabbit hole, then UML can have it's place in helping you keep track of your hierarchies. If you use it then I'd assume that getting your process of keeping it updated as automated as possible would be a high priority, unless you want it to rod in some ivory tower.
Personally I view architecture in UML, ArchiMate or draw.io rather than being build with something similar icepanel.io to be a complete waste of my time. But that's just me.
Remember when people used tools like Rational Rose to satisfy project managers and pointy-hair bosses?
And not to satisfy documentation requirements for critical safety systems.
You have to rethink your view and understanding of UML - https://en.wikipedia.org/wiki/Unified_Modeling_Language
It is not just drawing boxes but a visual modeling language providing both static/structural and dynamic/behavioural views of a complete system. You will only understand its value when you actually deal with large systems consisting of many interconnected modules with dependencies. In such large codebases it is almost impossible to understand all structural/behavioural aspects by browsing code whereas a tool like Doxygen generating UML diagrams from code becomes a godsend. You can map from UML to Code or Code to UML. As with any language you don't have to know all of it but can focus only on what you need eg. Class diagram/Activity diagram/Statemachine diagram are the ones i have found most useful.
Finally, UML is now being used as a modeling/specification language frontend to Formal Methods which is the ultimate proof of its usefulness.
In wider practice, UML (class diagrams) is never used by working software developers as a frontend to formal methods.
It got pushed on everyone, so there could be a layer of "software architects" who didn't have to know how to code and could have endless meetings where the final product was a Bayeux Tapestry of UML.
UML captures inheritance and composition well, but a program is more than the sum of its schema. Also, real programming languages all have their idioms, and using UML as the design space creates a significant impedance mismatch.
It is the complete modeling language (class diagram is just one artifact) that people are looking at using with Formal Methods along with regular Software Engineering. For example Sequence Diagrams are extremely useful in understanding the dynamic nature of a System. Lots of papers have been published, IEEE workshops and there is even an attempt at integrating the B Method with UML to give a UML-B variant. Like any language it is up to the developer to study it and learn to use it productively in his work. Of course it is not the "in thing" but quite useful nonetheless when used appropriately.
Automatic Formal Model Generation from UML Diagrams – An Implementation Experience - https://ieeexplore.ieee.org/document/9753518
UML-B: Formal modelling and design aided by UML - pdf at https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&d...
[dead]
UML diagrams are the only pictures that DON’T paint a thousand words