Live data from Hacker News

Guide to Software Architecture Documentation

workingsoftware.dev

41–50 of 60 posts

Re: Guide to Software Architecture Documentation

#41

As with all documentation.. it will be out of date after a while.

Don't tell me it's impossible, tell me "I can't do it"...

We had architecture sketches (informal, but highly taylored to show the gist of a system) that stayed valid and were used from after the first prototype to well after release, over a course of more than five years. It was a system of six embedded processors, 2 FPGAs, 5 different bus technologies, (luckily only) two different endianesses and coding and debugging would have gone horribly wrong without that overview sketch of just enough detail. There are cars in your town that drive around with it for a dozen of years now.

Re: Guide to Software Architecture Documentation

#42
In day to day work, checklists and Standard Operating Procedures are much more useful than diagrams.

If there's a yak-shaving exercise, write it down as an SOP. It'll become obvious if the process is flawed or a target for automation.

If making schema changes, document exactly all the steps required to integrate, test and deploy the change. It's complicated and easy to screw up - but a checklist can prevent the silly mistakes tired devs make.

The Checklist Manifesto [0] was written by a surgeon and has been shown to drastically improve surgery success rates. I'd love to see more checklists documenting development procedures - many of these could be shared as best-practice.

[0] https://www.npr.org/2010/01/05/122226184/atul-gawandes-check...

Re: Guide to Software Architecture Documentation

#43

In day to day work, checklists and Standard Operating Procedures are much more useful than diagrams. If there's a yak-shaving exercise, write it down as an SOP. It'll become obvious if the process is flawed or a target for automation. If making schema changes, document exactly all the steps required to integrate, test and deploy the change. It's complicated and easy to screw up - but a checklist can prevent the silly…

These aren't the same type of thing. Diagrams are to communicate and discuss what could be/what is. Checklists are to remember to do things.

Re: Guide to Software Architecture Documentation

#44

Diagrams are where architecture goes to die. In my experience as a former head IT architect, the value of an architectural process is in management and communications. For example, finding out and documenting where your thought leaders are going (a technology acquisition plan) and how they plan to get there (a technology implementation plan). Those are from COBIT 4 BTW.

What you're talking about sounds more like IT estate change management. I think this is about software construction.

Re: Guide to Software Architecture Documentation

#45

As with all documentation.. it will be out of date after a while.

So what?

This argument gets thrown up by someone nearly every time documentation gets mentioned.

1. Does it matter if not entirely accurate with the as-is? It showed the previous state or intention, that is typically very useful and a lit better than nothing.

2. Your unit test are out of date when your change code yet that typically gets updated, or new tests added, and is typically more work than updating the docs.

3. If what you document is so wildly different to the solution, you're probably documenting too much detail (this is where most junior devs go wrong), if it's that your arch has actually radically changed it sounds like your documenting too early, do you do spikes etc to figure out your arch before you commit to it?

Re: Guide to Software Architecture Documentation

#46
post #7

Big fan of C4. It's so simple most devs can contribute once some groundwork (initial diagrams) are done. Benefit is that software architecture is owned by the team, not just the architect. Haven't used arc42. Seems mostly a German thing. Has anyone outside German speaking countries experience with it?

All of the arc42 documentation is written in English, and the template itself is available in seven different languages.

See, e.g., https://docs.arc42.org

Apart from one of the founders (me) being German, it's no "German thing", but hopefully helpful to all kinds of systems.

Re: Guide to Software Architecture Documentation

#47
post #46
post #7

Big fan of C4. It's so simple most devs can contribute once some groundwork (initial diagrams) are done. Benefit is that software architecture is owned by the team, not just the architect. Haven't used arc42. Seems mostly a German thing. Has anyone outside German speaking countries experience with it?

All of the arc42 documentation is written in English, and the template itself is available in seven different languages. See, e.g., https://docs.arc42.org Apart from one of the founders (me) being German, it's no "German thing", but hopefully helpful to all kinds of systems.

Tx, good to know.

Re: Guide to Software Architecture Documentation

#48
post #27

This feels like another scrum workshop or whatever they teach to non tech managers. Forcing a specific workflow without ever explaining why (context -> containers -> components -> code), not a single mention about the problem domain but just a generic framework you are expected to fit all problem domains into. You learn more about the framework before you learn about the problem. Example: "Here's a container! It is e…

It's called abstraction, which is used when modelling categories of things, you do it lots when you write code right, so things are reusable.

Like you probably have something called an iterrable in your programming language of choice, so why not just call it a linked list, or a vector, is basically the argument you're making in my opinion.

To be fair, I do find some modelling languages do disappear into too much abstraction, they basically end up like being a Upper Ontology [1] and lack instances/examples that make them approachable in practice.

[1] https://en.wikipedia.org/wiki/Upper_ontology

Re: Guide to Software Architecture Documentation

#49
> An proven approach to structuring software architecture documentation is the arc42 template.

404 Page not found

Here's a working link to the overview in English (the other links seem to be for the German site), in case anyone is curious: https://arc42.org/overview

As for documentation in general:

  - in my eyes, documentation that is "live" is the best (e.g. ER diagram of your DB, generated network topology diagram, like in Apache Skywalking and so on), though you can't generate everything
  - documentation that people care about and that isn't cumbersome to work with and can be searched (e.g. text based formats instead of niche tools or binaries) is also good
  - documentation that's mandated in a top-down approach, using overcomplicated frameworks or tools, with people who don't care or don't see value in them, or won't update it (or even know that this should be done) is a waste of time
  - code isn't enough either, something like ADRs (https://adr.github.io/) and comments/issue management systems that explain business requirements, or stuff around the code (the WHY? not HOW?) is still needed, but again, only if people care
  - people won't always care, you'll sometimes have to work with incomplete information, it will be a total pain, sometimes people won't even realize or want to fix this
  - also, if you do have documentation, please make sure it's accurate: it should be a look at how things ARE, not just what they SHOULD BE (if your system is a mess, maybe have both descriptions, not just some idealistic view)

Re: Guide to Software Architecture Documentation

#50

As with all documentation.. it will be out of date after a while.

It's like code... code can be out of date after a while, too. The question is how easy it is to keep it updated and current. I think that's the biggest argument behind diagrams as code. Imagine you throw away your codebase each time you deploy your executable.

> It's like code... code can be out of date after a while, too. The question is how easy it is to keep it updated and current. I think that's the biggest argument behind diagrams as code.

I agree that documentation is nice even with the maintenance burden, but most would be surprised at just how much outdated code is out there. If many struggle to keep even their code up to date and not full of CVEs, what makes you think that they will also be able to have up to date documentation?

> Imagine you throw away your codebase each time you deploy your executable.

Honestly, I'm tempted to do this sometimes.

For example, consider splitting up monoliths and replacing them with many smaller services. If there is a problem with updating one part of the system, it can be left to slowly rot in the backlog, until it becomes a priority, at the same time without blocking doing the things that matter in the other parts of the system. Code should be not just easy to read and change, but also throw away. Not only that, but some more modern frameworks are just less painful to work with than the old ones (e.g. no more XML configuration hell) and you also often realize that you can do things better than the first implementation.

In a sense, one can say the same about docs: make it a Markdown file when you need to write something down, that can be easily changed/replaced and included with a merge/pull request, as opposed to some 50 page .docx file with no version control in some random network drive subdirectory.

Post reply on HN