News for hackers. Stuff that matters.
Re:Ask HN: Is there a better way to document complex softwar... by henrik_w on Sunday November 25, 2018 @01:57PM (#18528265)
I've been developing software professionally for 25 years. I've never found them to be useful. Even if you have them, they're usually out of date, and anyway they don't really help answering the questions you have. None of the places I have worked at have put a lot of emphasis on UML diagrams.
Re:Ask HN: Is there a better way to document complex softwar... by PopeDotNinja on Sunday November 25, 2018 @04:04PM (#18529022)
I tend to write up (not necessarily formal UML) diagrams in 2 cases:

1. I'm brainstorming with myself about how I want the software to behave

2. The software is basically done & tested, it's unlikely to change, and communicating the behavior to other people is of value, especially when describing a system that spans multiple components

Re:Ask HN: Is there a better way to document complex softwar... by trading_wheels on Sunday November 25, 2018 @04:40PM (#18529229)
I'll add (3) When I'm learning a new system, especially if it's big and/or old.

The idea is that if I go to the trouble to document it then the next person won't have to; this is seldom the case because as stated above the get out of date so fast. It's still a great way to learn and confirm your understanding though.

Re:Ask HN: Is there a better way to document complex softwar... by rorykoehler on Sunday November 25, 2018 @10:14PM (#18530774)
(4) Security audits
Re:Ask HN: Is there a better way to document complex softwar... by cs02rm0 on Sunday November 25, 2018 @04:18PM (#18529109)
Just 15 years here. I've worked at somewhere where they did put a lot of emphasis on UML diagrams.

To the point they had a product where some of the code was generated from UML, not once moving from the initial design to code, but repeatedly every time the design became out of date. It became the project everyone tried to get away from and project all new joiners were thrown into the deep end on, many quitting as a result.

A couple of years ago I interviewed for a contract role with a sister company and they waxed lyrical about their love of "best practice" UML in the interview. I declined the offer, I'm too old for worrying about which arrow type to use when no one reading it's going to understand the significance anyway. I think there are a lot of attempts to move away from code because it's complex, but the bottom line is it's the best we have for now.

Re:Ask HN: Is there a better way to document complex softwar... by zanny on Sunday November 25, 2018 @07:00PM (#18529901)
What would be useful is the ability to generate diagrams like UML from an AST. I'm sure theres already a Rust crate for it out there somewhere...

Then it could just be the case where you pick out a root struct / mod / something and a depth and let the software generate you a pretty graph to stick on a slide for the meeting in 15.

Re:Ask HN: Is there a better way to document complex softwar... by azhenley on Sunday November 25, 2018 @09:07PM (#18530491)
A lot of tools exist for generating UML from code (and some for generating code from UML).

I've never found any of the generated UML to be helpful (too big, too many details, and too much effort for me to simplify). Funny enough, Visual Studio cut out the builtin UML designer from VS 2017.

Re:Ask HN: Is there a better way to document complex softwar... by Pamar on Sunday November 25, 2018 @02:40PM (#18528554)
Ditto, except that I have 30 years professional experience.
Re:Ask HN: Is there a better way to document complex softwar... by derangedHorse on Sunday November 25, 2018 @06:21PM (#18529739)
As someone who's been in software development for only a couple years by comparison, I don't see huge architectural changes happen too often for any of our products. This is something that I'm currently trying to improve upon within my company, but I've gotten pretty discouraged with all these comments lol. Is there any way to mitigate the obsoletion of these models?
Re:Ask HN: Is there a better way to document complex softwar... by slimbods on Tuesday November 27, 2018 @04:06PM (#18546748)
Make a tool that generates architectural diagrams from the code?