On UML
sicpers.info
sicpers.info
All I remember about UML is useless semantic debates (activity vs states on time axis) or shallow bikesheeding sessions about UML profiles (we actually had hours "talking" about whether we should use plain or hollow dash.. I mean really) for clueless clients stuck in manual FTP workflows.
It's possible that these people were operating at higher thinking levels than I was capable of doing.. but even if so, I'd rather enjoy my own quirks and live in picolisp.
When you have to sync your UML with your code by hand, it quickly becomes a burden.
But for initial design, I really like UML.
I think that it’s extraordinarily important that we in computer science keep fun in computing
A great idea. The trick is to be able to keep a job while doing that. Looks like you've somehow done that with picolisp!You will notice that those aren't the design of OO systems that UML was created for, but they exist. Also, there are better diagrams for protocols than message sequence UML, but those don't have good tooling.
Besides those, use-case diagrams are nice too. They also emanate that strong feeling that they don't describe the correct idea (just like message sequence for protocols), but I don't know of a better replacement, just worse ones. People try to replace this one with all kinds of canvas too, but those just bring different problems.
Chen notation entity-relationship models are about 20 years older tha the first work on UML. UML class diagram notation is sometimes pressed into service for ER Modeling by people already invested in UML, but that’s about the extent of the relationship.
> Besides those, use-case diagrams are nice too. They also emanate that strong feeling that they don't describe the correct idea (just like message sequence for protocols), but I don't know of a better replacement, just worse ones.
The problem I have with Use Case models is that they combine abstract requirements/domain modeling with implementation design in an opinionated OO way. They may be the best way to do those together in one diagram, but I just think that’s usually a bad idea to do. For the first part, I think Level 0 Yourdon-style DFDs are a better tool; for the second, if you need OO-focused diagrams, I would probably go with UML class diagrams, recognizing that interactions are nouns in the domain.
Interesting. What would those be? TIA
The format varies a lot, but there is a popular one where time usually flows at the horizontal, lanes do not necessarily go through all of the diagram, the arrows are more angular, and there are very diverse conventions on the message label. The angular arrows are a very impactful change by themselves.
There are also data flow diagrams, when you don't need to represent causality.
For example, I found this [1] randomly while googling.
1: https://www.ibm.com/docs/en/order-management-sw/9.4.0?topic=...
In an old paper office, documents would go into people's inboxes for decision making, and would be forwarded to someone else when done. Think of customer service taking a report from a customer (this is the inbox for Customer Support), turning that into an entry in an internal bug database (the inbox for a developer), and then into a code fix up for review (the inbox for a different developer), and so on. This is a workflow. Work literally flows from one person to another throughout the organization.
Where integration between different software systems occurs, there's a spectrum of choices, from humans poking data into UIs through to direct API calls. One of the cheaper automated-yet-ad-hoc integrations is a script which FTPs files into well-known directories, often with semantically significant directory and file name conventions (e.g. dates or company codes). The receiving system polls the FTP location for new data (frequently CSV files), often using regexes or other techniques to extract metadata from filenames (since CSV doesn't really support non-repeating metadata).
So FTP workflows is an ad-hoc workflow integration using FTP to connect two different software systems, replicating what would have been done by paper 20 years ago.
That's because you never had to attend a uml profile meeting where people discuss the style of arrows.
Think people trying to customize this https://i.stack.imgur.com/YCegU.png with different line patterns for hours
This kills my soul. UML is being presented as a way to abstract away from the actual processes. But not everything can be abstracted away. The fact that we need to picture a UML diagram to represent a user stuck in FTP is outright a waste of time, money and human labor.
Class diagrams are a waste of time and they go stale quickly. Nobody updates them once the development tempo starts picking up.
I can't really agree with this. I design and build very large scale systems. We don't use UML, but it's possible to rigorously design and plan without UML.
Our designs are typically made of JSON data models, operations that take and return those models, and sequence diagrams that show the temporal relationship of the operations. It's not fancy, but it's dead simple, still pretty rigorous, but not too rigorous. Our implementations end up looking pretty much exactly like what we planned (even though they aren't actually JSON), and anyone can read and understand them.
Sometimes we build critical systems that require very rigorous design, to the point where we use TLA+ to catch design flaws. And sometimes it's just some internal UI and we slap together a bunch of random stuff haphazardly. And various degrees in between. I wouldn't characterize the "best practice" as "never design", it's more like "design, but not too much". UML is usually "too much", or places the focus on things that don't really matter.
(Note, I don't have much experience with UML, I dipped my toes in it a long time ago and ran away screaming.)
Think: “how am I proactively planning on getting promoted so I can forget all this?”
The question then is: Is UML a good notation for expressing designs? And I think the general consensus is, "no". It's too high-ceremony for how much it aids communication.
And if you're going really rigorous, well, I'm going to guess that TLA+ doesn't read UML diagrams...
Design is important where separate teams and systems interface. It's less important when a team understands the system well. That's what class diagrams aren't very useful. That, and I can explore them in my IDE, and really, complex class hierarchies are a smell that something's over-engineered.
Edit: reduced 10 man year to 5. 10 is too long & overmanned (though I have worked, unhappily, on such projects).
Later on you can drop the diagrams entirely and perhaps keep them as some onboarding documentation if they're still useful.
Many of them hired EEs in the 70s/80s (and earlier) who became managers. At the time it made more sense (fewer CS folks) but it established a culture of preferring engineers to computer scientists/programmers/(these days)software engineers. I even left a job because they straight up told me no non-EE would ever become a lead (over a 99% software activity). I appreciated their honesty and found the exit.
The usual justification for perpetuating it has to do with the 1% of the job that touches hardware, but IME it's usually either truly specialized and most of the EEs couldn't do it either, or trivial (following directions from the electrical engineering team that actually designed the hardware).
Plus, these days, the usual electrical engineering curriculum is ~50% programming, which is more than can be said for some CS curricula (which aren't standardized the way ABET does for EE).
> I think there's value in hiring people who have been trained in a standardized process that prioritizes chains of responsibility, detailed analysis and reliability over (velocity, flexibility and bug-tolerance.*
You write this as if that's what CS people are taught (to make crappy systems and crappy code), which may be a common feature of many programmers, it is not the thing they're taught to do in school. At least not if they halfway paid attention.
And what is mission critical? Aerospace control software? Wouldn’t it be nice if all software was “mission critical”? Not all houses are skyscrapers, but all houses are designed and built to industry acceptable specs and if those specs are wrongly designed or executed incorrectly there are consequences, and rightly so I think.
I think this friend is working on satellite software and also (counter intuitively for me) accounting software with anti-fraud semantics.
Nope. There are times for nice, strong houses; and there are times for chicken coops made out of duct tape, rusty steel wire and bent nails. As long as they keep chickens in, it is all fine.
It is up to management to decide what kind of structure are they going to build.
That said, there are disturbingly many cases when people don't pay attention to security, and then there are personal data leaks. The handling of personal data should be regulated, verified, and there should be severe consequences for leaks caused by negligence.
As for the rest -- let people do whatever they want. No backups? sure. 'SELECT *' on index.php? you are paying for the servers, go ahead.
It'd be nice if management was held more accountable when they choose duct tape/rust steel wire/bent nails construction techniques to build multi story apartment blocks instead of chicken coops. But we haven't even solved that problem for actual apartment blocks yet, so I won't be holding my breath for that accountability for software projects any time soon...
The Arduino code that blinks my festival costume blinky lights is not mission critical.
The MCAS software on a 737MAX8 should be considered mission critical, but apparently wasn't treated as such at least not by upper management or beancounters who had final say.
NASA's Mars Rover control software is mission critical, and they use coding standards, formal methods, and tools to verify its correctness.
In between is a very very wide grey area. The marketing department thinks the cross domain analytics tracking code on their website is "absolutely mission critical!", but it's built on top of a pile of other people's php and javascript that's way closer to my Arduino blinky light code than to Mars Rovers LOC-4 (Level Of Compliance) or other NASA LOC-5 and 6 code.
Quite what software should possibly be regulated like skyscrapers or houses, and what software should be unregulated like a camp ground, or when that camp ground grows into a shantytown that starts requiring house-like regulation - seems to be a thing that there are no "industry standards" for yet (at least perhaps, cynically, not beyond "maximising shareholder value" or "not leaving money on the table"...)
But then for space probes on the other hand debugging live system is a real possibility: https://medium.com/machine-words/scientific-debugging-part-3...
Well, the point is that UML isn't engineering, either. The visual syntaxes are overly baroque, and in many cases add little or nothing over just stating the exact same information in plain text (though there are of course exceptions, where "tracing" linkages visually, looking at containment etc. can actually help when surveying a design).
And the whole OOAD/RUP methodology of "just list plausible 'objects' from the overall problem domain and reflect them directly in the design and implementation" does not exactly help, either. It mistakes what "objects" in the OOP sense are supposed to be used for.
That's presumably why there's a data model for UML, so that this "plain text" could be mapped into graphical objects and back again.
It really isn't. Not when any change can easily be the source of new defects/bugs, and the bugs get exponentially harder and costlier to fix the later they're introduced in the software creation process.
The fact that we can iterate on something once it's released means that engineering in a software sense is different from any other discipline which we call engineering.
UML reeks of bad academic thought. What I mean is that strange sort of thinking that seems to infiltrate certain upper strata academic circles where some obscure thinkery is apparently "all of the work" and the detailed work of actually building the thing is just hand-waved away as "something the research assistants will grind out and I won't be troubled with". It's where folks who build an overly complicated wall-sized "design" diagram declare that the project is done, even if literally tens of thousands of hours remain to get to lights on.
More constructively, it turns out UML does have its place in some niche areas for design, and it's a good skillset to have to document certain complex systems for turnover and as inspiration for communication-via-picture, but it's not fundamentally a good toolset in its original incarnation that comes from a valid set of assumptions.
I found when learning it in college software engineering courses that there was also a subtext that came through which I believe drove the sudden adoption in enterprise. The long-standing desire to turn software development into a consultancy and drive development into commodity. Remember, UML's heyday coincided neatly with the drive to offshore complex software projects to warehouses full of cheap barely skilled development labor.
Billions upon billions of failed, intricately designed, software projects now pave the paths of the agile botanical garden reserve.
Well, no sane person would say that. When you have that wall sized UML modeslls, you can maybe call your design phase to be done, but never the project. And you can argue, that if you done the design right, the rest is just grind till all is implemented. But it is quite hard to get the design right at first try ...
While the truth is - everything "clicked" because you was doing it for 10 years, not because you started using Y. And Y is extremely confusing and off-putting for anyone who don't have the full context of your experience.
Based the recent carpet-bombing of UML comments on HN, I have a new theory about UML, and it's no longer that dotcommers have the strength of opinion that can only come from narrow experience (nor that the barrage is an accident of what I call blog-arbitrage)... :)
When Java first came out, it was one of the coolest things to be using. Then Java became an "enterprise" thing, and became very different. I'm wondering whether enterprise-sales-capture is what happened to UML.
Maybe the dynamic is IBM trying to sell enterprise products and training, orgs doing enterprise development wanting to have documentation and process standards, orgs mandating UML, lots of developers going through UML training, developers seeing UML as a checkbox expectation/requirement (like TPS cover sheets, rather than as a tool they find useful), etc.?
And that dynamic has driven the evolution of UML, as well as the examples-in-practice to which most developers have been exposed?
FWIW, even if UML has gone in a direction that's not applicable to a lot of developers, you can still draw upon it, and the earlier methodologies and notations, if you use it when it's beneficial. If you want slightly more visual class/entity relationship diagrams (visual association role multiplicity, and generalization triangle where it belongs :), you can use OMT. If you're doing concurrent and hierarchical state models, there's UML or Statecharts. Never underestimate the power of an old-school DFD for talking about processes and data flows in a way that all stakeholders can understand and reason about. And everyone gets old-school control-flow flowcharts for steps/branches/loops. And you can even explain event trace diagrams to any stakeholder, if you walk them through the important real-world example, and they see it as worthwhile.
Class and sequence diagrams are pretty simple and in my opinion can, in small doses, be more effective for communicating ideas than only code in some circumstances.
I don't think UML is evil or even bad, it ultimately just isn't very important.
This is not strictly the case. There’s nothing in UML or agile that says you cannot update a diagram in a sprint.
The supposed opposition comes from, not technical reasons, but the manner of thinking that each encourages. The promise of UML is that if you diagram the problem, all things will flow from it (implementation and documentation), this implies a design upfront and lends its self naturally to the waterfall approach, though this need not necessarily be the case.
The (open source) exception that I remember from back in the day was Green UML.
Their sourceforge is still live and saying "green is a LIVE round-tripping editor, meaning that it supports both software engineering and reverse engineering."
Renaming a method in a reverse engineered UML diagram and seeing that reflected in code was pretty neat.
I never got why this isn't a standard feature until now. Hearing about the relationship between UML and broken project management I get it (I wasn't into that at that time, except that I never bought into the waterfall promise).
Let's hope someone will revive UML as a code navigation and round trip refactoring tool. That would help a lot and nicely fit an agile approach.
My new e-mail signature.
Why UML “Really” Died - https://news.ycombinator.com/item?id=26956298 - April 2021 (187 comments)
Has UML died without anyone noticing? - https://news.ycombinator.com/item?id=26934577 - April 2021 (578 comments)
Ask HN: Anybody Using UML in 2021? - https://news.ycombinator.com/item?id=26150612 - Feb 2021 (10 comments)
Similar from earlier:
Ask HN: Are UML diagrams still used today? - https://news.ycombinator.com/item?id=14777949 - July 2017 (24 comments)
Ask HN: Do you still use UML? - https://news.ycombinator.com/item?id=12879056 - Nov 2016 (185 comments)
UML is rarely used in the industry (2013, PDF) - https://news.ycombinator.com/item?id=11917849 - June 2016 (2 comments)
UML diagram anyone? - https://news.ycombinator.com/item?id=9437559 - April 2015 (1 comment)
Ask HN: Is UML still relevant today? - https://news.ycombinator.com/item?id=7624601 - April 2014 (66 comments)
Ask HN: Is UML modeling before developing software relevant any more? - https://news.ycombinator.com/item?id=6835532 - Dec 2013 (4 comments)
Ask HN: Does anyone in the startup world use UML? - https://news.ycombinator.com/item?id=6484184 - Oct 2013 (6 comments)
UML- Useless Meaningless Lousy? - https://news.ycombinator.com/item?id=2731536 - July 2011 (2 comments)
Ask HN: Did an UML diagram ever changed the world? - https://news.ycombinator.com/item?id=2495583 - April 2011 (3 comments)
Reasons for UML's descent into darkness (2008) - https://news.ycombinator.com/item?id=2387117 - March 2011 (2 comments)
Do real developers use UML and other CASE tools? - https://news.ycombinator.com/item?id=2291612 - March 2011 (41 comments)
How relevant is UML modeling today? - https://news.ycombinator.com/item?id=819983 - Sept 2009 (4 comments)
Ask YC: Does anybody actually use UML? - https://news.ycombinator.com/item?id=146995 - March 2008 (10 comments)
Of course there have been many other threads about UML generally:
https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
I consider these UML hate articles as valuable as those anti-OOP ones, while all OS GUIs and mainstream languages have some kind of OOP support in them.
My dayjob is bound in delivery of a public interest process and so the mechanistic expression of that process is what motivates me to do this. But, its an uphill struggle.
It was the stupidest thing ever. All driven by contract requirements (contractor shall bring documentation up to date etc.).
Why yes, this was in the defense industry. Same project where progress was measured using SLOC.
https://news.ycombinator.com/item?id=26934795
Snippet: "UML was going to be the "blueprints" of code, and software architects would develop UML diagrams similar to how building architects create blueprints for houses. But as it turned out, that was a false premise. The real blueprints for software ended up being the code itself. And the legacy of UML lives on in simpler boxes and arrow diagrams."
As someone who studied architecture and spent 3 years in studio doing nothing but design, I would like to clarify the essential conceptual error here.
Architects do not design with blueprints. While design methodologies do vary and make use of sketches, rough drawings, perspectives, models (usually hot glued bits of cardboard and balsa wood), and finally drafting, the blueprint proper is an end product and that too comes in design and construction flavors. The actual workers realizing an architectural design work with what is called a "working drawing":
https://www.designingbuildings.co.uk/wiki/Working_drawing
UML is 'working drawing' for software (and it actually does to a respectable extent deliver on that). The conceptual error of IBM et al. was pushing UML as a design tool, and UML as a medium for exploring software design.
Here is how I used to design after considering the 'program' (what the structure is supposed to provide) and the 'site': First step was coming up with a concept for the design. The concept didn't even have to be directly related to buildings per se; one major project was based on EPR [Einstein–Podolsky–Rosen paradox]. The process of coming up with a concept usually did entail doing conceptual sketches, but also quite a bit of text. Just writing thoughts.
After the concept was established, there would come more concrete sketches, and finally on the drafting board, layer upon layer of 'trace paper' -- translucent paper -- that I drafted over and over again. Each layer added and/or modified the layer behind it. The initial layer, for me, was a governing grid. The final draft on the trace paper was candidate design. After that, I would place velum over the trace and draft the pristine design drawing.
The comment I cited calls "code" the "real blueprint" of code. As a software practitioner, this does not map to my experience as a designer of software, and for reasons stated above, in my mind speaks of a misunderstanding of what a "blueprint" is.
Certainly, I do 'sketches in code'. Many projects that end up with elaborate modules in files and/or class hierarchies are first sketched in a single file. I like Go a lot for this reason: I just work through my thoughts in a single file and then elaborate the design when I am satisfied with the approach and functionality.
Now the open question remains as to whether we can have a 'formal mechanism' for doing 'conceptual sketches' for software. What would the equivalent of trace-paper be for code (outside of say git branches?) What is the equivalent of glued bits of balsa wood and cardboard? Perspectives?
This is a difficult problem given that a 'visual vocabulary' for code needs to capture a great deal of semantics whereas artifact design permits 'squinting'.
I think UML is a valiant effort for a visual, formal, vocabulary of capturing a final design, software as is, but it (or rather the tooling around it) is far too cumbersome to serve a fluid means for the dynamic and volatile process of designing.
I've yet to encounter a software-based set of tools that rivals it in the context of sketching out and sharing ideas and concepts (especially in an interactive manner).
I don't see any post-UML method that provides the same expressivity as Statecharts for that purpose.
In org-mode, one can do keep a bit of Agile documentation near the code. This delivers communication value without the documentation turning into a career path.
I suspect more people could benefit from using it if they spent time with it. I don't think I'm that odd. I was around when writing automated tests was becoming common practice and I saw all the resistance and hate for something that is hard to know the benefit of until you do it. That might be in play and I suspect a lot of the resistances was because enterprise software development tried to make it into some oppressive process.
Here's an example design I made last year that features UML diagrams that I think are useful: http://flutter.dev/go/multiple-engines
I had a look at this, but I'm having a pretty hard time telling if these diagrams actually make things more straightforward. My guess is that quite a few people would find a pseudocode listing more readable, but I'm open to alternative takes.
Diagramming is very useful. I just don’t see the value of dogmatically following UML-style formatting.
From the authoring side it helped that it was UML because that meant I had a standard language for defining the diagram with plantuml.
I was thinking about this conversation overnight, and I wonder if a “UML 2” or “UMLite” that had a very limited vocabulary and a narrow set of use cases would be well received. Basically, not “here is how you can describe every noun, verb, and relationship in your enterprise so you can automate them” but “here’s how we draw classes, databases, and sequence diagrams to communicate with other people”. I’d be all over that.