Skip to content

Lesson 2 of 9 · 26m

Tutorials, How-Tos, Reference, and Explanation Are Different Jobs

Choose the document type before writing so learning material, procedures, exact behavior, and design rationale stop fighting each other.

A senior engineer once asked me why our "getting started" guide was impossible to finish. The answer was simple: it was not a tutorial. It was a reference manual wearing a tutorial costume. Every step branched into optional configuration, edge cases, and theory. The reader never got a working result. Choosing the document type is not taxonomy pedantry; it is how you protect the reader's momentum.

The four types solve different problems

The Diátaxis names are useful because they describe intent:

Tutorial       learning-oriented      guided success for a beginner
How-to guide   task-oriented           solve a specific real problem
Reference      information-oriented    exact lookup of behavior and options
Explanation    understanding-oriented  concepts, trade-offs, design rationale

The same product feature may need all four, but they should not be the same page. A tutorial must be safe, linear, and achievable. A reference page must be complete and precise. A how-to can assume competence. An explanation can be discursive because the reader is there to understand, not to copy commands.

Tutorials are contracts

A tutorial promises that if the reader follows the steps in order, they will reach a visible result. That means controlled inputs and controlled outcomes:

## Build your first audit report
In this tutorial you will scan the sample host manifest and generate an
HTML report. It takes about ten minutes.
### 1. Download the sample manifest
```bash
curl -O https://downloads.sudosecurity.org/examples/webserver.toml
```
### 2. Run the audit
```bash
hardline audit --input webserver.toml --report report.html
```
### 3. Open the report
You should see `12 passed`, `3 warnings`, and `1 failed control`.

Notice what is absent: six installation methods, every command flag, and a discussion of report architecture. Those belong elsewhere. The tutorial's job is confidence and momentum.

How-to guides are allowed to be narrow

A how-to does not teach the whole system. It solves a problem the reader already recognizes:

# Rotate an expired API token
Use this when automation fails with `401 token_expired` and the token was
issued by the legacy integration panel.

Then give the shortest safe procedure. Link to authentication concepts and token reference instead of embedding them. If there are variants, make the decision rule explicit: "Use the control panel for user tokens; use sso token rotate for service tokens."

Reference is where precision lives

Reference pages need stable identifiers, types, defaults, constraints, examples, errors, and version behavior:

--snapshot NAME
Type: string
Default: none
Required: yes when --restore is present
Behavior: selects an existing snapshot; does not create one
Errors:
  snapshot_not_found      NAME is not in the local snapshot index
  snapshot_corrupt        manifest checksum mismatch
Since: 0.8.0

Do not use tutorial tone in reference. "Simply add the flag" is not precision. The reader wants to know exactly what the software accepts and does.

Explanation prevents repeated mistakes

Explanation answers why the system is shaped this way: security boundaries, consistency models, trade-offs, and the reasons not to use a feature. This content reduces misuse because it gives engineers a model they can apply to novel cases. It is valuable, but it is not where emergency procedures belong.

Field notes

  • If a tutorial has more than two optional branches, it is probably a how-to collection pretending to be a tutorial.
  • "Getting started" should produce a result in minutes, not install every production integration.
  • Reference pages without examples are hard to use; examples without exact semantics are dangerous.
  • Rename pages when their job changes. Search results carry the wrong expectations when titles stay vague.

Was this lesson helpful?

Sign in to rate