Live data from Hacker News

Ask HN: What do you use for diagramming in software engineering?

news.ycombinator.com

1–10 of 55 posts

Ask HN: What do you use for diagramming in software engineering?

#1
What are the popular common tools today for (visually) documenting architecture, component, and interaction diagrams?

The core purpose is to facilitate the efficient communication of technical information between software engineers on the team at a high level / bird's eye view (as opposed to a more granular level line by line comment inside of code).

Specifically, something persistent & electronically scalable (not just a temporary whiteboard sketch that goes away!)

Not just for a one-off communication, but something long-term so that institutional knowledge stays with the organization, even if people come and go.

I'm thinking out loud here but some kind of product / solution that can be baked into a code review process.

Re: Ask HN: What do you use for diagramming in software engineering?

#3

A whiteboard and imagination from the oral documentation. It's actually something I'm working on getting my team to fix sense I got here. I'm interested in this topic.

I use whiteboarding too, but yeah, it's basically a snapshot / dump of institutional knowledge that resides in an individual's head. Updated my post to mention that I'm looking for something electronic / scalable

Re: Ask HN: What do you use for diagramming in software engineering?

#4
It depends on the exact problem and how long term you need to documentation to exist. For a lot of things physically drawing out diagrams is great. It's fast to do and based upon the questions you get it's easy to draw more detail on the area being discussed.

For more long form docs I tend to use a mix of LaTeX's TiKZ (though I used to use PSTricks) for block diagrams and for a somewhat faster workflow I've used some of the diagramming tools which integrate nicely into an asciidoc based document. That can be graphviz, blockdiag, seqdiag, etc ( https://asciidoctor.org/docs/asciidoctor-diagram/ has a decent list of some of the options).

With any option it's easier to quickly sketch something out than it is to have some clear well organized diagrams which don't need any external context to understand.

Re: Ask HN: What do you use for diagramming in software engineering?

#5
post #3

A whiteboard and imagination from the oral documentation. It's actually something I'm working on getting my team to fix sense I got here. I'm interested in this topic.

I use whiteboarding too, but yeah, it's basically a snapshot / dump of institutional knowledge that resides in an individual's head. Updated my post to mention that I'm looking for something electronic / scalable

Depending upon the situation it can make sense to just take a picture of the whiteboard with a camera (or use a smartboard) and save that image somewhere. At that point the diagram isn't 'editable' per-say, but that can still be great solution.

Re: Ask HN: What do you use for diagramming in software engineering?

#6

It depends on the exact problem and how long term you need to documentation to exist. For a lot of things physically drawing out diagrams is great. It's fast to do and based upon the questions you get it's easy to draw more detail on the area being discussed. For more long form docs I tend to use a mix of LaTeX's TiKZ (though I used to use PSTricks) for block diagrams and for a somewhat faster workflow I've used some…

Something long term, that you can use to onboard new employees. They can just look a the visual and reconstruct a mental map of how things are laid out at a high level, without this institutional knowledge having to be passed around verbally and subject to the quirks of human memory (and subject to individuals possessing this knowledge potentially leaving the team!)

Re: Ask HN: What do you use for diagramming in software engineering?

#7
post #3

Earlier quoted context omitted.

I use whiteboarding too, but yeah, it's basically a snapshot / dump of institutional knowledge that resides in an individual's head. Updated my post to mention that I'm looking for something electronic / scalable

Depending upon the situation it can make sense to just take a picture of the whiteboard with a camera (or use a smartboard) and save that image somewhere. At that point the diagram isn't 'editable' per-say, but that can still be great solution.

I definitely prefer something editable. The use-case is if someone improves the system, then this visual diagram needs to be updated.

I want to avoid the situation where the left hand doesn't know what the right hand is doing. Any person on the team doesn't have to go hunt down the person who knows the system, but can just look up the diagram at a high level and know where to start.

Re: Ask HN: What do you use for diagramming in software engineering?

#9
I generally use either a wiki page (if there is an agreed upon common wiki), or a short memo document. A wiki is nice because it's easy to include a URL into a commit.

The diagramming tool is a minor consideration except it should be easily editable by someone coming along later. The important thing isn't the tool, but that there is a common, known place to look and collect the info for the team. It could be as simple as a shared folder as long as everyone agrees.

In general, I write and try to encourage "tech memos" that are short of capital-D official, complete Documentation, and instead focus on capturing the high-level view of some scoped aspect of the total system. Memos that cover say a walk-thru of one type of operation through the entire system, how a single feature interacts with the larger system, or a tricky bit of analysis, logic, or assumptions on some key point; all tend to be popular reading. Whiteboard pics are often included just for convenience if needed too.

Re: Ask HN: What do you use for diagramming in software engineering?

#10
I use a combination of tools for visual documentation. Block diagrams and sequence diagrams together are a pretty effective means of communicating.

For block diagrams that illustrate relationships between components as a sort of directed graph, I prefer Omnigraffle (on OSX). It's fast and effective, easy to label boxes, lines, and interactions, and supports exports to pdf and png for quick sharing. Where omnigraffle falls over is in terms of its popularity and accessibility. You can't really review the diagram source as a part of the code review process, and the output diagrams are not useful to the visually impaired. Popularity is a factor because even if a dev knows some piece of block diagram software well, it's likely that they know a different one than anyone else. For that reason, we're not prescriptive about the tool used on our team, only that some form of block diagram is included with the documentation for a feature or component.

For sequence diagrams I use web sequence diagrams, for which I hold a commercial license. These diagrams are great for illustrating different workflows, with the caveat that we generally need several very similar diagrams to explain even the simplest features. These also benefit from having a straightforward text format that can be shared as a reviewable part of the source tree, and which can be read and edited by the visually impaired. Sequence diagrams are a more effective tool for demonstrating the veracity of code against a desired specification than block diagrams are, but understanding the top-level component layout is generally a prerequisite.

Not sure about the general popularity of either of these, but they've been an effective toolchain for me so far.

Post reply on HN