Live data from Hacker News

Ask HN: Do you still use UML?

news.ycombinator.com

141–150 of 188 posts

Re: Ask HN: Do you still use UML?

#141

I absolutely hate UML and regard the associated tools as time swallowing abominations and the main advocates that I encountered as the worst kind of snake oil salespeople. Of course, other people's experience may differ - but I largely thought it was a big con.

Well, imo the statement holds true with any of the UML -> Agile/Scrum(especially True Scrum, when it is your fault when it not works) and Lean/Kanban substitutions.

I wonder whether they are the same people selling bullets in different shades of silver though the ages, or it could be that the SW business is big enough that we can witness different species develop the same survival strategy of going from host to host and sucking their money out in different niches?

Re: Ask HN: Do you still use UML?

#142
The 3 actually useful diagrams that I have seen in the last 10 years are:

- Sequence

- Entity relationship

- State chart

All 3 are useful for communicating protocols, schemas and state charts.

Sequence diagrams are probably the most ubiquitous, and very useful in explaining protocols. Even RFC-s have them.

Relationship diagrams are often (ab)used to visualize relationships between tables in SQL databases. While it's not very useful for designing, I have actually used them for understanding and simplifying a complicated database schema. I actually believe every API documentation should start with an abstract entity relationship diagram. Abstract in the sense that it should not necessarily represent physical tables, but give an overview of the underlying structure to the first time user. Doesn't even have to complete or correct.

State charts are occasionally useful for obvious reasons. Try explaining TCP without one.

I think it's worth noting that the above 3 existed before UML and UML merely tried to formalize them, so while I don't think anyone uses "UML" anymore, being able to comprehend the above 3 charts is as basic of a skill as being able to read pseudo-code, and saying they are not is use would also be false.

Edit: formatting

Re: Ask HN: Do you still use UML?

#143
#Related

There was a recent talk about the model-code gap [1]. How diagrams often don't map to the code. The C4 model. "Structurizr." Lack of common abstractions to describe software, in contrast with other fields like electrical engineering. Good to still start out with paper/whiteboard.

@7:13 "1 out of 10 people use UML," in his experience. People adopt ad hoc notations instead.

His use of UML is not for describing the system at a high level.

[1] GOTO 2016 • Visualise, Document and Explore Your Software Architechture • Simon Brown

https://www.youtube.com/watch?v=GM_J_jRp62g

Re: Ask HN: Do you still use UML?

#144
post #143

#Related There was a recent talk about the model-code gap [1]. How diagrams often don't map to the code. The C4 model. "Structurizr." Lack of common abstractions to describe software, in contrast with other fields like electrical engineering. Good to still start out with paper/whiteboard. @7:13 "1 out of 10 people use UML," in his experience. People adopt ad hoc notations instead. His use of UML is not for describing…

The best way to make sure your diagrams map to code, is to generate your diagrams and the code from a common piece of text.

At a job not too long ago, we used a modified form of DOT to describe a protocol state machine. This generated dot, .h's, and some template .c files. This made it such that each state machine for the protocol had a diagram that would map out all the states. Logging and other subsystems output were generated as well so you could go from a log of a test run back to a diagram of what had run.

Code generation (or compilers for compilers) are entirely underrated outside of Lisp, and they're not too difficult to create.

EDIT: And note that your linked presentation is AWESOME, but I think he misses the description / guidebook being up to date is best accomplished by having it be what needs to be updated to create the software.

Re: Ask HN: Do you still use UML?

#145
post #142

The 3 actually useful diagrams that I have seen in the last 10 years are: - Sequence - Entity relationship - State chart All 3 are useful for communicating protocols, schemas and state charts. Sequence diagrams are probably the most ubiquitous, and very useful in explaining protocols. Even RFC-s have them. Relationship diagrams are often (ab)used to visualize relationships between tables in SQL databases. While it's…

The reward of the clarity of sequence diagrams is worth the pain and boredom of learning all the others at university.

Sequence diagrams nicely represent separate entities involved in a system, the order of communication between them, and the conceptual content of messages between them. Even briefly reading a sequence diagram helps you understand how different components relate to each other.

Often, and usually with API endpoints with some complexity behind the scenes, I'll go out of my way to draw an ASCII sequence diagram with Monodraw[0] and leave it in the comments or a readme.

[0] https://monodraw.helftone.com

Re: Ask HN: Do you still use UML?

#146
post #85
post #71

Yes, used the UML class diagrams, sequence diagrams and Statechart diagrams for an embedded device software. It's just a tool for modelling. You can pick and choose the diagrams you need, and at the abstraction level you desire.

which uml tool you use? tried umbrello and argouml but not very impressed.

We used Enterprise Architect.

Re: Ask HN: Do you still use UML?

#147
I'm an extremely visual person so for me diagrams are incredibly useful. I'm constantly drawing class diagrams and communicating via pictures. I want UML to work so bad.

Unfortunately, I think UML suffers from all the dysfunctions of a language designed by many stakeholders. It's just not intuitive, so you have to remember the details. I start practically every handwaivy whiteboarding session with the disclosure "this is not UML but ...".

As with many "standards", we've sucked the oxygen out of the room by saying this is the one true way. I very much prefer having multiple competing specifications and letting the winner shake out. I imagine if we hadn't prematurely standardized on UML years ago, visual programming and diagramming would have evolved in exactly the same way regular programming languages have evolved. Why do I have 30+ choices for what to write my web server in, but only 1 seriously spec'ed out language for drawing it?

Re: Ask HN: Do you still use UML?

#148
post #87

In its entirety? No. Never go "full UML", it will annihilate productivity and produce abominable software. It also is taught wrong, it tends to be taught as a design tool, but there's such a tremendous impedence mismatch between the diagramming tools and the way the code actually gets written that it ends up doing more harm than good. (not to mention that the people who usually end up creating the UML might be many o…

Indeed, I only use UML for documentation of existing code. Having a standard allows for consistent reverse-engineering, and a class diagram is still the best way to visualize an OOP class hierarchy.

Keeping them up to date with the code is an issue, as with all documentation. I actually wrote my own Java class diagrammer [1] for that purpose so I can just re-run a project file to create updated diagrams of the current code base, with little or no editing required.

[1] http://kynosarges.org/Diagrammer.html

Re: Ask HN: Do you still use UML?

#149
post #83
post #74

HackerNews may not be the best place to sample for UML usage. It consists mainly of two communities that have a bias against formal engineering methodologies in the development of software. I won't comment on the pros and cons of UML. Instead I'll invite you to ask yourself a couple of questions. 1. What other clients do you support who have similar characteristics as this client (and may therefore also benefit from…

what are the two communities are you referring to? one of them might be frontend developers(ui,js,html,css,etc)? what is the other one? I'm a low-level guy and learning some web coding these days, so I can tell the difference views on software between HN and other places.

Mainly the group that thinks of everything in terms of the mathematics of CS, and the group who thinks in terms primarily of "just ship, ship, ship code 'pragmatists'."

It isn't really divided by front end versus back end or the like.

Post reply on HN