Live data from Hacker News

Architecture diagrams enable better conversations

unravelled.dev

101–110 of 141 posts

Re: Architecture diagrams enable better conversations

#101

(article with no diagrams)

Hi, article author here, the reason this post has no diagrams is because it isn't about how to draw C4 diagrams but rather about some of the benefits I've found being able to refer to them in different circumstances. Given the traction this post has received I'm thinking of doing a follow up and try to explain the process I've gone through to build the ones my team uses. Would that be useful for you?

Re: Architecture diagrams enable better conversations

#102
post #33

I've been using https://structurizr.com/ to automatically generate C4 diagrams from a model (rather than drawing them by hand). It works well with the approach for written documentation as proposed in https://arc42.org/ . It's very easy to embed a C4 diagram into a markdown document. The result is a set of documents and diagrams under version control that can be rendered using the structurizr documentation server (fo…

Recently been doing the same Structurizr consolidation since amongst our various teams we had a mish-mash of Lucidchart, Miro, and other collaborative design tools. One thing I was experimenting with (read: struggling with!) was a way to keep per-service (per-repo) architecture workspaces which are also synchronized on-commit to a central workspace and used !include to bind them together. The moving parts are not dif…

I strongly recommend appmap.io .. literally just go see for yourself.

Re: Architecture diagrams enable better conversations

#103
I strongly recommend appmap.io The most useful feature I have found is the request recording which is pretty much instantaneous and outputs an array of beautiful diagrams of your application code: sequence diagrams, dependency maps, flame graphs, and very in-depth After reading most of the replies here I will say that while there are some great products made and in the making, appmap crosses off a lot of boxes when it comes to a developer driven tool. We plan to use this as the catalyst for onboarding developers into the complex world that is fintech, where encryption and abstraction drive product and productivity. having setup different models and pocs using this tool myself as well as platform and staff engineers have been impressed. It even logs the data so there’s something for the data scientists to gain from the work of this tool as well. Most importantly the dev team currently grinding the gears on this thing are very responsive and as an early user I’m impressed! I found an issue and in the slack community they monitor we’ve logged and found multiple ways to overcome obstacles. Definitely recommend it. Especially for devs who are onboarding and managers with new devs they’re onboarding.

Re: Architecture diagrams enable better conversations

#104
I feel like C4 tries to be a common language for back-of-the-envelope sketches, which is a laudable goal. UML tried to be a formal standard for back-of-the-envelope sketching, which was lunacy. But if we can all agree on basically what we're drawing, that'd help, surely.

But C4 seems almost too lightweight to merit a name. Its drawing toolbox is just boxes, arrows, stick figures and datastore, with 'boxes' meaning one of four different things depending on the diagram level (Context, container, component, code). But the boxes are the easy part! The only thing I want a diagramming standard to settle on is 'what do the arrows mean, and which direction do they go in', and C4 fails on that front - the arrows mean 'whatever you label them to mean' - they are literally just 'relationships', so on one C4 diagram you might have one arrow that means 'writes data to' and another one that means 'is written to by', and that's fine.

The C4 docs say little of relationships, apart from, 'Try to be as specific as possible with the label, ideally avoiding single words like, "Uses".'

The C4 examples contain lots of relationships labelled as 'Uses'.

So I'm sorry, but I just don't see the value C4 brings to the table. Do I need to pay for the training?

Re: Architecture diagrams enable better conversations

#105
post #54

What are the tools people use to draw diagrams? I've tried many things and settled on Miro on an iPad (infinite canvas + pencil), but I still think this space is underinvested in. The downside of diagrams from code is the loss of the wysiwyg aspect -- I want to be able to manipulate things visually.

Cell phone camera on a little holder pointed at a piece of paper. Then I join as a second participant, mute it, and turn the volume off. Or ipad and apple pencil on google docs jamboard using Duet to sketch things out.

The one issue I’ve found is that most services seem to retain _much_ less precision for participant video versus screen sharing. Text can often become really blocky and blurry.

I did something similar, but used OBS. There are a few ways to feed video from a cell phone into it. Gives you the chance to do any zooming/cropping/etc to account for limitations in where you can place the phone. As well as adjust brightness/contrast/white balance if you’re really anal about that kind of stuff.

From there I open the feed in a “projector” window and screen share that.

Re: Architecture diagrams enable better conversations

#106
I'll go on a limb and share a counter-point for why I struggle with diagrams: it's anecdotal but might help someone else accept that diagrams are not for everyone.

As someone with aphantasia, they don't help me memorize relationships, so to get them into my working memory, I have to translate a diagram into bullet points: it's so much easier just to start with those bullet points of what components we've got, what they consist of and what relationships they have (you know, just like code itself).

And having done theoretical (read: abstract) maths too, that's good enough for me to work with complex and intricate relationships.

I still understand that it's not like that for most everybody else, but for some minority of us, they are just a bad way to write text/thoughts out as the graphical layout has no benefits. Yes, you do learn to read and create them, but it's an extra effort that you do for others' benefit.

Re: Architecture diagrams enable better conversations

#107

I've had the idea that graph diagrams (including architecture diagrams) can be paged - you show a different set of links/vertices on each page of the same graph (show the same node but different enumeration of edges). Many codebase visualisations I've seen were too complicated to understand because the diagrams were so large. (I've seen some visualisations generated from code that were so small when panned around you…

D2 has keywords to split up diagrams into multiple pages: https://d2lang.com/tour/layers disclaimer: i work on it.

And I wholeheartedly endorse and love D2, as well as the Terrastruct Studio web interface for it. Although Iainly use the VSCode extension now and the local TALA install.

Now if I could only get Posit to put D2 into Quarto alongside Mermaid and GraphViz, I would be set.

Re: Architecture diagrams enable better conversations

#108
post #72

I introduced C4 into my org a few years ago after disparate and unfocused documentation (if there even was any) and a lack of organizational competency on our own systems. We’ve found that you get a lot of value out of the first two levels of C4 alone. If your shop is good at UML and keeping it up-to-date, awesome, that work snaps right in as the additional layers. But whether you do 3 and 4 or not, context and conta…

I found my big problem with C4 was that it was too rigid to get the architecture quite right, so I ended up either with a diagram that felt overall too low-level (because I'd had to drop down a level to get the relevant details in), or a diagram that was too high level (where I'd just skipped the bits that were with discussion, and now needed to add more written documentation to make up for it). I really like diagram…

I had the same issue as you with C4, and d2 was the perfect balance of simple enough for creating diagrams almost at thinking speed, but with enough features (and growing) that I have been very pleased with it.

Re: Architecture diagrams enable better conversations

#109
post #72

I introduced C4 into my org a few years ago after disparate and unfocused documentation (if there even was any) and a lack of organizational competency on our own systems. We’ve found that you get a lot of value out of the first two levels of C4 alone. If your shop is good at UML and keeping it up-to-date, awesome, that work snaps right in as the additional layers. But whether you do 3 and 4 or not, context and conta…

I found my big problem with C4 was that it was too rigid to get the architecture quite right, so I ended up either with a diagram that felt overall too low-level (because I'd had to drop down a level to get the relevant details in), or a diagram that was too high level (where I'd just skipped the bits that were with discussion, and now needed to add more written documentation to make up for it). I really like diagram…

I can see having to swap back and forth between levels to pull up technical specifics as mildly annoying. I guess I’ve gotten used to it, either way having a source of truth that multiple roles can consume has been worth it in my org.

If you have smaller or less complicated systems, or your audience is smaller or all peers, then I could also see C4 as having fewer benefits.

Re: Architecture diagrams enable better conversations

#110
post #17

Code should generate diagrams automatically as you write it. Then you can see the complexity increase as you go, instead of looking back on a tangled mess.

I've worked with documentation auto-generators before, and the problem they have is that they can't figure out which references are relevant and which aren't. I remember auto-generating a class diagram of a Java project in the late 90's and it showed every class having a reference to the class "java.lang.String". Generators have gotten (a little) smarter with one-off heuristics like "treat the class String as if it w…

What we do with appmap.io is to depict only your own code and not dependencies. Also, each diagram depicts a runtime trace and not just static imports. It produces a more focused diagram, and it also clearly illuminates factors like HTTP client and server requests, and SQL, that static analysis can’t see. The data can be depicted as a dependency map, sequence diagram, detailed trace, and flame graph.
Post reply on HN