• @matzler@lemmy.ml
    link
    fedilink
    English
    1110 months ago

    Do you have some reading recommendations on how to write good documentation, e.g. readmes for end users?

    • @SynopsisTantilize@lemm.ee
      link
      fedilink
      English
      1710 months ago

      Yes. Here: "1.You aren’t writing an SOP for smart or even capable people., every. Single. Person. Needs their hand held all the way through every step regardless of technical skill. "

      “2.if you didnt state it needed to be done in the SOP, it will not be done when the end user follows the SOP”

      “3.MAKE someone else run through your SOP without you being involved. If they can successfully achieve what they needed using your SOP > congrats. If not > fix the errors that brought you to this mess.”

      “4. Everyone is fucking stupid, be clear, and verbose.” We’re talking about where the start menu is, clicking on the “OK” for prompts, how to spell and type things out.

      Change my given values per SOP and what it’s for. But those are my main tenants.

      • @brognak@lemm.ee
        link
        fedilink
        English
        910 months ago

        In elemental school we had to write instructions on how to make a pb&j sandwich. The teacher then acted out your instructions literally, without adding or removing a step. I don’t think there was a single sandwich made that day.

    • @Voroxpete@sh.itjust.works
      link
      fedilink
      English
      9
      edit-2
      10 months ago

      I’ll see about digging up recommendations if I can, but I’m on my phone right now.

      My biggest single piece of advice would be this: Understand that your reader does not share your context.

      What this means is that you have to question your assumptions. Ask yourself, is this something everyone knows, or something only I know? Is this something that’s an accepted standard, or is it simply my personal default? If it is an accepted standard, how widely can I assume that accepted standard is known?

      A really common example of this in self-hosting is poorly documented Docker instructions. A lot of projects suffer from either a lack of instructions for Docker deployment, because they assume that anyone deploying the project has spent 200 hours learning the specifics of chroot and namespaces and can build their own OCI runtime from scratch, or needlessly precise Docker instructions built around one hyper-specific deployment method that completely break when you try to use them in a slightly different context.

      A particularly important element of this is explaining the choices you’re making as you make them. For example a lot of self-hosted projects will include a compose file, but will refuse to in any way discuss what elements are required, and what elements are customisable. Someone who knows enough about Docker, and has lots of other detailed knowledge about the Linux file system, networking, etc, can generally puzzle it out for themselves, but most people aren’t going to be coming in with that kind of knowledge. The problem is that programmers do have that knowledge, and as the Xkcd comic says, even when they try to compensate for it they still vastly overestimate how much everyone else knows.

      OK, I said I’d try for examples later, but while writing this one did come to mind. Haugene’s transmission-openvpn container implementation has absolutely incredible documentation. Like, this is top tier, absolutely how to do it; https://haugene.github.io/docker-transmission-openvpn/

      Starts off with a section that every doc should include; what this does and how it does it. Then goes into specific steps, with, wonder of wonders, notes on what assumptions they’ve made and what things you might want to change. And then, most importantly, detailed instructions on every single configuration option, what it does, and how to set it correctly, including a written example for every single option. Absolutely beautiful. Making docs like this is more work, for sure, but it makes your project - even something like this that’s just implementing other people’s apps in a container - a thousand times more usable.

      (I’ve focused on docker in all my examples here, but all of this applies to non-containerized apps too)

    • @IronKrill@lemmy.ca
      link
      fedilink
      English
      610 months ago

      Well a good indicator is if I have to check the source code of a packaged program to understand what something does, the documentation is not good enough. And yes I’ve had to do this far too much.

      • @corsicanguppy@lemmy.ca
        link
        fedilink
        English
        410 months ago

        have to check the source code

        Use the source, Luke.

        But yeah: disappointing. I just swapped out my Chef ZFS module because, looking at the source, it was incomplete in ways I didn’t want to rat-hole and extend while this other two-piece kit was there.

        I should use the source earlier.