Live data from Hacker News

Ask HN: Do you still use UML?

news.ycombinator.com

101–110 of 188 posts

Re: Ask HN: Do you still use UML?

#102

UML is too heavy and rigid. I use my own subset/version of UML, which uses a simplified "grammar", and allows you to express basically only the following: - Class with attributes - Parent/child relationship - One-to-one relationship - One-to-many relationship - Many-to-many relationship If I have some other need (rare), then I improvise. Usually I'm the only one who looks at these, but if a client or someone else nee…

An ERD (Entity Relationship Diagram) might be simpler and clearer. In my experiences, stakeholders find them easier to follow than UML class diagrams.

Agreed. You are right – what I do is much more similar to ERD than UML.

Re: Ask HN: Do you still use UML?

#103
post #77

It is useful if you are able to generate code from it. I know one big software company (more than 3000 employee) that generate 90% of all it's code base (~20M lines of code).

Must be some pretty trivial software, since 90% of the code base is apparently class and function declarations filled with empty or pointless (get/set) OO garbage.

Some enterprise software, most of the patterns are well know and the customization point are well defined. I would describe more as a well know domain with clear constraints than trivial software. They generate a lot of code also for high critical real time software (avionics and space) but that is not really trivial.

Re: Ask HN: Do you still use UML?

#104
post #77

It is useful if you are able to generate code from it. I know one big software company (more than 3000 employee) that generate 90% of all it's code base (~20M lines of code).

Must be some pretty trivial software, since 90% of the code base is apparently class and function declarations filled with empty or pointless (get/set) OO garbage.

Some enterprise software, most of the patterns are well know and the customization point are well defined. I would describe more as a well know domain with clear constraints than trivial software. They generate a lot of code also for high critical real time software (avionics and space) but that is not really trivial.

Re: Ask HN: Do you still use UML?

#105

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.

I think there's lots of potential for abuse/time wasting with UML. But consider the fact that when you're writing code, you're often focusing on two distinct concepts: implementation and design.

When designing, you are implicitly asking yourself: "what problem am I trying to solve, what data structures should I use to represent the elements of this problem, how should they relate to one another, what should this system interface look like, etc".

And when implementing, you are focusing on mapping those concepts from design into code. Often during implementation you can discover new elements of the problem or requirements that need solving. So implementation itself is valuable.

But design can be considered and reasoned about without requiring an implementation. Even without a peer to discuss the design with, considering "what if I decompose the data structures this way?" is a valuable exercise. Now, you don't need UML to do that. But you can leverage it to do that. I will posit that the screen-to-brain throughput of a UML diagram is greater than that of code or prose. Also, the brain-to-screen throughput of UML is probably better than those.

You might be surprised at the discussion inspired by a simple class diagram:

"Ok, sure, but which class holds the file descriptor?"

"None -- fred's working on a library that does that"

"No, Fred's library only considers the command line args but doesn't open the files."

Re: Ask HN: Do you still use UML?

#106
post #54

UML can be a great communication tool in specific situations but when it becomes a religion your organization will suffer. I'm older than most here, drank the cool-aid that predicted code generation and round tripping but spit it back up before the poison had a chance to set in. A bonus comment for the youngin's ... When you hear that some new system will allow "the common man" to write his own software without devel…

The youngins say AI will solve this. They're wrong.

AGI will solve it. I think we've got a while yet before that becomes an issue for us devs though.

Re: Ask HN: Do you still use UML?

#108
post #54

UML can be a great communication tool in specific situations but when it becomes a religion your organization will suffer. I'm older than most here, drank the cool-aid that predicted code generation and round tripping but spit it back up before the poison had a chance to set in. A bonus comment for the youngin's ... When you hear that some new system will allow "the common man" to write his own software without devel…

> some new system will allow "the common man" to write his own software without developers

"The common man" often seems to think that mastering the syntax of a programming language is the hard bit, and that replacing textual syntax with some pretty graphics will magically make software easy to build.

Of course, the real challenge is accurately specifying what you're trying to accomplish, and exactly how you want it to happen. Everything else is just window-dressing.

Re: Ask HN: Do you still use UML?

#109
post #38

Yes I do. When you have a team of developers with different model of how the system should work or works, it's usually a recipe for disaster. By modeling, we get to unify our thoughts and idea of the system. When starting out a project, I tend to lean more towards well labeled conceptual diagrams. I will also use activity diagram, sequence and state diagrams. While I have often read about people designing class diagr…

Any tool in particular that you suggest to make diagrams? Or maybe just pen and paper? I tried StarUML 2 and it's ok but I found it slightly clunky (it also does not have a realtime collaboration feature as far as I know, that would be nice to have when your team is remote IMHO)

You should try https://www.genmymodel.com It is the first online modeling platform. It supports UML and real-time collaboration.

Re: Ask HN: Do you still use UML?

#110
I use sequence and communication diagrams, but I find the other diagramming techniques less applicable to the type of work I do. In the systems I work with most problems arise from transitions between states and from communication issues between isolated units. I find that static models just end up having to change rapidly throughout the implementation, so I focus on creating APIs and tests instead.
Post reply on HN