r/AskProgramming • • Nov 10 '19

Software engineers, how often do you create/use any form of UML?

54 Upvotes

52 comments sorted by

94

u/TheTechLeadsWife Nov 10 '19

Never.

12

u/UnknowBan Nov 10 '19

You give me motivation to learn this /s lol it's part of my degree rip

37

u/[deleted] Nov 10 '19

You’ll learn lots of stuff in college that you won’t directly apply in your career, but it’ll help you think more like a programmer and be able to speak the language with others in the industry!

6

u/RushTfe Nov 10 '19

It's not the thing you'll be using everyday, but sometimes it's useful to help you get a solution to a problem

1

u/nutrecht Nov 10 '19

You should. The 'never' answers just show a lot about the type of projects they're working on.

6

u/praetor- Nov 10 '19

My first reaction to this question was "never" until I remembered that flow/activity/sequence/state diagrams are also UML, and I use those all the time.

UML class diagrams, however, are still a "never".

→ More replies (2)
→ More replies (2)

31

u/[deleted] Nov 10 '19

Never.

14

u/YMK1234 Nov 10 '19

I use lazy UML interaction diagrams quite often when it comes to explaining flows between different actors.

PS: this stuff ... I would call what I draw at best "uml inspired" though. Definitely not according to any spec.

9

u/mnkb99 Nov 10 '19

You basically have a mix between never and often. So the answer, like for everything else, is sometimes. Depends on the company

8

u/[deleted] Nov 10 '19

The closest things I occasionally create are database diagrams.

6

u/nutrecht Nov 10 '19

Quite often, typically using PlantUML diagrams. It's often important to 'draw out' complex flows in documentation.

5

u/0llylicious Nov 10 '19

Quite often. Many times I need to document my architecture for approval by different aspects of the companies I work for. I also use it as a high level design tool for some complex systems I need to design

5

u/[deleted] Nov 10 '19

Not strictly UML Syntax. But lots of diagrams as documentation of how data flows between systems or a process in the form of a flow chart.

3

u/TheCaffeineHigh Nov 10 '19

Once a month or so.

3

u/hottubtimemachines Nov 10 '19

I've made a few for documentation purposes at both a top 10 US bank and a unicorn which recently went public.

2

u/aneasymistake Nov 10 '19

I’ve never used a UML diagram at work. I’m about 22 years or so into my career and have worked in video games, online gambling and security. I’ve also never been asked about them in an interview and can’t remember anyone talking about them at work. I suspect every one of my colleagues knows what they are, though.

2

u/Makhiel Nov 10 '19

Never but my work consists of maintaining pre-existing projects. If I had to create something from scratch I'd probably use it.

2

u/Delphicon Nov 10 '19

Never but it taught me a lot about programming that I still use. Beyond just meeting the requirements, keeping complexity down is arguably the most important thing to consider. UML diagrams are about considering the relationships between pieces of code and the implications of those relationships. This is important because as a product grows and changes, that complexity becomes a huge factor in the ability of developers to get things done.

When people talk about legacy code and how shitty it is to work on it's because the codebase is really complex. After a certain point a codebase is just too big to think about all at once. If it also was haphazardly written without considering the way the code is organized then you'll wind up in a situation where you can't really make changes without unexpectedly breaking something else. Its paralyzing and its why you can have 100 developers working on the same large codebase.

2

u/snot3353 Nov 10 '19

Not UML specifically but I have started to create UML-like diagrams using LucidChart pretty often as part of design on larger projects.

2

u/[deleted] Nov 10 '19

Only during job interviews...

2

u/chjacobsen Nov 10 '19

I do a lot of flowcharts and diagrams (usually decision trees and entity relationships), but I never give a damn about whether I follow proper UML legend.

If your system needs formal UML, your description is probably too detailed, or your system is too complicated.

2

u/phaeth0n Nov 10 '19

Never, but the system I work with could really use a UML diag like the ones my professors gave in our introductory OOP classes. I'm about to start integrating a new feature I prototyped in Python and I'm basically at the mercy of the few senior engineers who know it inside out for whatever direction they can provide.

If I saw someone had created one unprompted for something they'd written I'd think that person was a saint.

2

u/[deleted] Nov 10 '19

Never, and I would advise not to get a job that requires it.

The reason being that those documents typically live one of two lives:

  1. They propagate throughout the company whenever someone needs to reference your project architecture, but they will not be up to date with the system and only exist to cause confusion under the guise of an easy-to-access architecture reference. Architectures change quickly when you produce anything of value. Don't get in the way of first-party communication. The engineers can also be incorrect about the system; the system is the only thing that will tell you the truth about its own state.

  2. The docs are written-in-stone the company is stuck to a written-in-stone architecture, cannot iterate, and likely releases using the waterfall method.

2

u/FlapyG Nov 10 '19

Once. In 2 years...

2

u/[deleted] Nov 10 '19

Once, so far. Was tired of figuring out a class structure and right clicked generate uml in intellij and it was helpful

1

u/[deleted] Nov 10 '19

never

1

u/emirg_95 Nov 10 '19

Create never. Use/Read sometimes. It's useful to have one when you are dealing with big DB to understand what information you actually need.

1

u/[deleted] Nov 10 '19

If I'm diagramming with another engineer, it's likely a brainstorming session and we're not going to get caught up semantics of UML.

If I'm diagramming with a non-technical person (like a designer or project manager), UML is way to technical. Any value of UML is completely lost.

I think UML makes sense in a highly regulated or life critical field - like aerospace, surgery, etc. It's a lot more common to require provable otucomes in these spaces. This means you get into highly technical details very early in the planning process.

1

u/JohnnyGuitarFNV Nov 10 '19

Never but should. It would really help but most of the time people are just like "meh, waste of time"

1

u/LukeStonier Nov 10 '19

When I started university we started learning about UML... The lecture started with “Although you’ll never use it...” I dropped out soon after (for other reasons as well) landed a software engineer job and have been here 2 years (No regrets, I love everything about my job) but half the other devs have no idea what UML is 🤷🏼‍♂️

1

u/DarkwingDuck3 Nov 10 '19

Almost never. but I really like https://develop.spacemacs.org/layers/+lang/plantuml/README.html

Tried it a few times, really convenient for README.md and github

1

u/NeoMarxismIsEvil Nov 10 '19

Almost never. Sometimes there’s some sort of debate or confusion over how workflow should work, and it makes sense to draw something like a use case diagram in order to make sure everyone is on the same page with how something should be implemented, but 1) it doesn’t really have to be UML and 2) it can be done on scraps of paper, a whiteboard, or whatever.

I’ve never drawn class diagrams as proper UML because the situation is usually similar to the above. The main thing the class diagrams are useful for is the book on design patterns, but once people know what those are all you have to do is tell someone “this uses the factory pattern” or “this uses the observer pattern” or whatever. You don’t need to know the standardized way to draw the same thing repeatedly just to get the idea across.

Some types of projects probably need UML because they’re really big and need more documentation, they involve lots of process flow and use case stuff where nontechnical people need to be involved in the communication, or they’re expected to get used for 30 years and need to be well documented so future people can maintain them more easily. Some critical systems have extra documentation just to check standards compliance and make sure every design decision gets double and triple checked.

So it’s not like this stuff is totally useless, but you’re probably going to get either “often” or “never” depending on what people are doing.

1

u/Fuzzietomato Nov 10 '19

Last week was the first time since school that I created a UML diagram, and it was for a unity game I was designing

1

u/VernorVinge93 Nov 10 '19

In three years: once.

And it wasn't used as "UML" is was an engineer drawing boxes and explaining them as they went and me going "Hey look, that's valid UML, there really is a first time for everything"

1

u/PureArachnid2 Nov 11 '19

We use sequence diagrams from PlantUML as a sort of quick documentation of the happy case for various services (due to the specifics of the system we often do 5+ calls per each of calls to our services, most of that in parallel). I believe there's also one which explains how our CICD pipeline works (there's several systems there and it might not be immediately obvious what talks with what).

1

u/umlcat Nov 11 '19 edited Nov 11 '19

Software Developer here, I do, often.

Please remember, that UML can be used for unleast two things: Requirement Analisys and Software Modeling.

But applying, it depends part of the developer, the company and the circumstances.

In some companies, is a policy / rule programmer does not do any at all.

In some, the company just pressure people, to program, even take people why out if their Analyst/Modeler job to progrsm.

1

u/kluzzebass Nov 11 '19

Once in 22 years.

1

u/watsonb8 Nov 11 '19

I use UML diagrams only to explain something to somebody else or during architecture discussions. I use sequence diagrams frequently to organize my thoughts about an API or algorithm I am writing.

1

u/exotic_anakin Nov 11 '19 edited Nov 11 '19

Learning UML has value. It makes you think about ways to visually talk talk about software. And common metaphors are good. In practice, you won't do very much actual UML, but doesn't mean it won't positively influence the way you whiteboard, think about, and design software.

I don't have a quote or anything handy, but having read Martin Fowler's book on UML, I remember him even making a point that you shouldn't get caught up in "proper" UML and at best, you can pick and choose between different ideas UML puts forward.

As others have noted, the sequence diagrams come up pretty often. Might as well get comfortable reading 'em. And you inevitably will come across create all manner of diagrams with different software components connected with lines, and arrows, and with different shaped boxes. These rarely follow UML to the letter, but the different shapes, the directions of the lines, and other things are frequently borrowed from UML. It makes sense to use some already established patterns in your own diagrams.

tl;dr you use UML rarely, if ever, but still pay attention in class ;)

1

u/noratat Nov 11 '19

Never.

That said, knowing how to diagram things in an easy to follow way is still pretty valuable, I just don’t how much UML specifically is used.

Also, I mainly work in automation and tooling.

1

u/theCumCatcher Nov 12 '19

I mean I make flow charts but nothing that rises to the level of discipline of UML

Use jira for that

1

u/LargeHard0nCollider Nov 24 '19

Like everyone else, no uml diagrams specifically, but design docs, which show the general architecture of whatever we’re making, are very common

0

u/[deleted] Nov 10 '19

[deleted]

4

u/Shitty_Orangutan Nov 10 '19

Ditto. Uml-ish is about as good as I get.