📃 We’ve written a lot of documentation for a lot of projects. We’ve also read a lot of documentation for a lot of projects and had mixed experiences with what it taught us. Across that work, we’ve found four guidelines that make documentation easy to write and valuable to readers. Hopefully they save you some time and some frustration!
All four come from one principle:
Documentation exists to help users with generic experience learn your specific system.
Generic experience is a prerequisite. Documentation isn’t a substitute for knowing the basics of the tooling your project uses, it’s a quick way for knowledgeable readers to learn the specific ways your project uses those tools.
Don’t Write Click-by-Click Instructions
❌ This is way too much detail:
- Go to https://console.aws.amazon.com/cloudwatch/home
- Click Log Groups on the left
- Type “widgets-dev-async-processor” in the search box
- Click the magnifying glass icon
- Find the “widgets-dev-async-processor” in the search results
- Click “widgets-dev-async-processor”
- Click the first stream in the list
- Read the log entries
It’s frustratingly tedious for experienced users. Users who are so new that they need this level of detail are unlikely to get much from the logs it helps them find.
This will also go out of date as soon as the CloudWatch UI changes. You won’t always notice when it changes, and even if you do it’s easy to forget to update your docs.
Use simple text directions instead:
Open the widgets-dev-async-processor Log Group in the AWS CloudWatch web console.
That’s easy to read, tells the reader what they need and where to find it, and won’t go out of date until you change how your logs are stored.
Limit Use of Screenshots
🔍 Searches can’t see into images, so anything captured in a screenshot won’t show up in search results. Similarly, readers can’t copy/paste from images.
Also, like click-by-click instructions, screenshots are tedious for experienced readers, they don’t help new users understand the system, and they’re impractical to keep up to date.
Most of the time, simple text directions like the ones given above are more usable.
Link Instead of Duplicating
Duplicated docs always diverge. Here’s a common example:
Infrastructure code and application code live in different repos. Engineers of both need to export AWS credentials into their environment variables. Infra engineers need them to run terraform, app engineers need them to query DynamoDB tables. Trying to make it easy for everybody to find what they need, someone documents the steps in each repo. Later, the way users get their credentials changes. The engineer making that change only works on terraform and rarely uses the app repo. They forget to update its instructions. A new engineer joins the app team, follows those (outdated) instructions, and gets access errors. There’s churn while they diagnose.
It’s better to document the steps in one repo and link 🔗 to those steps from the other. Then, everyone is looking at the same document, not just the same steps. It’s easy to update all docs because there’s only one doc. Readers know they’re looking at the most current doc because there’s only one doc.
This is also true for upstream docs. For example, if it’s already covered in HashiCorp’s excellent terraform documentation, just link to it. A copy will go out of date. Always link to the specific sections of pages that cover the details your readers need. Don’t send them to the header page and force them to search.
Keep a Small Set of Accurate Documentation
If you write too many docs, they’ll eventually rot. You’ll forget to update some. You won’t have time to update others. Users will read those docs and do the wrong thing. Errors are inevitable. It’s better to have a small set of accurate docs than a large set of questionable ones. Only write as many docs as it’s practical to maintain.
Writing docs can be a lot of work. Sometimes they just cause more errors. Hopefully, these guidelines will make your docs easier to write and more valuable to your readers.
Need more than just this article? We’re available to consult.
You might also want to check out these related articles: