Live data from Hacker News

Ask HN: How do you organize software documentation at work?

news.ycombinator.com

41–50 of 93 posts

Re: Ask HN: How do you organize software documentation at work?

#41
post #38
post #36

Earlier quoted context omitted.

Sure it does. As part of your CI process, build your markdown into HTML or whatever and host it.

Slack message received: "Hey, I was reading the documentation and walking through the process and encountered this and this . Can you fix and re-export the documentation? Thanks!"

I mean, yeah! That's ideal! If someone doesn't have write access to a repo, then they shouldn't be able to edit the docs for the stuff the repo contains without review either. Just like if they found a bug in the code, they should open a ticket for the problem and the dev responsible for those docs will go fix it.

Re: Ask HN: How do you organize software documentation at work?

#42
I generally like using a combination of the following:

* Wikis for general information, environment setups that are not project specific, etc.

* Repositories to host code and system specific information, usually in Markdown documents.

* Google Docs or Microsoft 365 for working documents that need to be collaborated on, commented on, and shared without the rigmarole of pull requests and the more static nature of wikis.

* Slack is for ephemeral information. If it contains documentation, specification, FAQ, debug steps, process explanations, etc., those should be captured and moved to the appropriate documentation location.

The one thing I really struggle with are diagrams. Cloud-based diagram tools like Visio and Lucidchart are great, but they are tough to save in a good location outside of the cloud environment. It requires exported the file and/or a PDF export. Then, these fit rather poorly into source-code control. There is the concept of "diagrams as code", but all of those systems are generally terrible at layout. There really is no good solution, as there are major trade-offs to both.

Re: Ask HN: How do you organize software documentation at work?

#43
post #29

Earlier quoted context omitted.

So what do you use instead?

The same tool you use for merging code, with the same ownership & maintainer model. In our case, that's git, and our docs live in markdown files in a docs/ folder.

So in order to find documentation, you need to know which repo to look in?

How do you deal with cross-cutting concerns, docs that span multiple code repositories?

Re: Ask HN: How do you organize software documentation at work?

#45
post #40
post #37

Earlier quoted context omitted.

Five years and 80% employee turnover from now, your wiki will be a completely unsearchable pile of outdated trash from employees who don't work there anymore. Wikis are not documentation, they are dumpsters you can rummage through and try to find a nugget of wisdom. Don't make your new employees rummage through dumpsters.

Just because someone is bad at curating documentation doesn't mean it is inherent to wikis. Wikis and repository-sourced documentation are under the same constraints of requiring curation. There is no "automatic" documentation that happens. It has to be written, updated, maintained, and publicized. People's problems with documentation are they don't want to deal with it. It's usually not about the systems used to doc…

Sure you could re-invent source control, ownership models, bug tracking, change review and merge processes in a wiki. Or you can use the tools that we already have for that.

The main point is you need ownership and responsibility. Wikis by design don't have those things, and it shows in how people actually use them. Wiki dumpsters are popular exactly because they let people abdicate responsibility, which means docs are no one's responsibility, because no one likes writing docs.

Re: Ask HN: How do you organize software documentation at work?

#46
post #29

Earlier quoted context omitted.

So what do you use instead?

The same tool you use for merging code, with the same ownership & maintainer model. In our case, that's git, and our docs live in markdown files in a docs/ folder.

Fossil SCM, which comes up on HN every once in a while, rolls a wiki and issue tracker in the same repository as source code.

https://fossil-scm.org

Re: Ask HN: How do you organize software documentation at work?

#47
post #34

I hate, hate software documentation as a concept. It gets out of date and is hard to use. It's a last resort, only for specialized cases. I prefer two types of documentation: 1. Executable documentation - tests, asserts, even things like Jupyter notebooks that can be tested and executed 2. Timestamped documentation - documentation that has a clear date on it of when it was valid. So the reader has an expectation "Thi…

> I hate, hate software documentation as a concept. It gets out of date and is hard to use. My response is almost "too bad". :) Keeping things documented is part of the work , and if it isn't done, then the work is not completed. Your suggestions of (1) and (2) are great suggestions to have as components to the documentation system. Notebooks are really fantastic for this.

> Keeping things documented is part of the work, and if it isn't done, then the work is not completed.

Absolutely. Part of reviewing is checking that the eg. README is up to date and works as expected.

Re: Ask HN: How do you organize software documentation at work?

#48
I forget the terminology, but there's a good "grid" breakdown of documentation types (I think this one: https://documentation.divio.com ) that I've simplified a bit for the internal documentation I'm involved with.

* README, HOWTO, INFO, PROJECT, DESIGN, NOTES, FAQ

When I pull down a `git` repo, I read the `README.md` (of course). I make my own `NOTES.md` (eg: `.gitignore`'d) of what commands, environment variables, useful blog posts, search results, whatever. Rarely do I share or encourage sharing of `NOTES.md` wholesale, but it's helpful to be able to pull out a few snippets or re-orient myself when coming back to that software/project.

Then, other documents get prefixed with "HOWTO-Do-Some-Specific-Thing.md", or "INFO-Some-Particular-Component.md".

"PROJECT-...", and "DESIGN-..." are "dangerous" ones in that they can quickly fall out of date, but they can be very useful while they're being actively managed. I guess personally I've started making sure to include dates or "eras" in the title, eg: "PROJECT-[2024-Feb]-Add-Foo-Support.md" or "DESIGN-[2024-02-14]-...". Stuff that's outlived its usefulness can probably be moved to an `ARCHIVE/...` in case you need it later, but keep it out of the way from confusing newcomers 1-3 years from now.

"FAQ-..." almost never comes into play (hopefully) b/c it should mostly get absorbed into "HOWTO-..." or product improvements, and few products seem to rise to the level of needing FREQUENTLY asked questions. Ideally FAQ's would "go away" with work on the product or other documentation, but I've had some success with it as like sales-oriented (and ideally: sales-managed) FAQ / Canned Customer Response learnings.

Putting it all together you get something like:

  * README.md
  * HOWTO-Backup-to-S3.md
  * HOWTO-Backup-to-BackBlaze.md
  * HOWTO-Manage-Existing-Backups.md
  * HOWTO-Exclude-Frequently-Changing-Files.md
  * INFO-Supported-Backup-Systems.md
  * PROJECT-[2024-Feb]-Backup-9000.md
  * DESIGN-[2024-Jan]-Auto-Backup-Detection-and-Failover.md
  * NOTES.md (private!)
  * FAQ-Residential-Customers.md
  * FAQ-Business-Customers.md
  * FAQ-Backup-Recovery-Issues.md
Generally, they wouldn't all be "git-adjacent", but `README.md` should link to the other sources, `HOWTO-...` and `INFO-...` is generally good for your wiki/confluence/"published" documentation. PROJECT, DESIGN, and FAQ are all best as "loose" shared docs. Multiplayer by default with low barrier to edit/contribute. Sometimes DESIGN could be INFO-Design-..., or DESIGN might even be a DIAGRAM. You'll know it when you see it.

Prefixing the documentation with the TYPE has been super-critical in adoption. It clarifies that it's not "DOCUMENTATION-About-Some-Thing.md", but instead "HOWTO...(you're gonna do something, goal-oriented)", or "INFO...(you're gonna learn something, no specific outcome)".

If you START introducing new prefixes, then you'll hopefully see them propagate (as appropriate), but ideally whatever vocabulary your business/team ends up using is small (~5-10 documentation types) would cover a good 80-90% of your use cases, and they should be brain-dead simple enough that it's clear their categorization is useful.

Re: Ask HN: How do you organize software documentation at work?

#49
Location: Separate Documentation repository in a GitLab group project. That way you have history, notes, membership, ownership, and processes (templates, merge permissions, reviewers)! This can also be included as a submodule in your software repo. And can be used to read/edit by devs in their chosen IDE, or R/W on GitLab via html, or can generate static html documentation via pipelines. Oh, and you can build pipelines to generate html outputs for different use cases, and perform checks, run scripts, etc.

Framework: Choose a framework, like Arc42 for general layout as a good starting point. Remember you have company, quality, project, program, product, process, user, internal how-to's, etc. documentation types not just... user-guides and systems-architecture..so this will be dependent on your org/product. Go for MVP and 80-20.

Plan: Write a plan as part of the documentation that details all of these facets and rules so all contributors understand it.

Formats: drawio.svg for complex diagrams, mermaid for simple diagrams or if important to change manage like code, asciidoc for complex documents, markdown for most/simpler docs. Tables in csv or asciidoc. Images in svg, or png. Everything aforementioned renders on GitLab.

Other rules: Automate everything possible to reduce [manual] documentation. Use text/code vs proprietary formats.

You can get more and more complex with the tech writers, dev, ops, systems, all under one roof and coordinating documentation and pipeline scripting.

Re: Ask HN: How do you organize software documentation at work?

#50
post #42

I generally like using a combination of the following: * Wikis for general information, environment setups that are not project specific, etc. * Repositories to host code and system specific information, usually in Markdown documents. * Google Docs or Microsoft 365 for working documents that need to be collaborated on, commented on, and shared without the rigmarole of pull requests and the more static nature of wikis…

https://app.diagrams.net (formerly known as draw.io) can be exported and imported as an XML. At one company we just exported the diagram as a png/jpg and as an xml, committed both to the wiki repo or source repo under the docs/ directory. Then next time, just import the diagram xml into the app and repeat. I think that's a good enough approach if diagrams are useful but updated infrequently.

I've started using a similar approach, minus the png/jpg, for my personal markdown based wiki.git, saving the xml as a file that I can reimport in the future. I usually do this for prototyping or grokking some new system.

edit: just remembed, github also supports mermaid diagrams, https://docs.github.com/en/get-started/writing-on-github/wor...

Post reply on HN