Four kinds of documentation
This is a nice article (though i think a bit too wordy). Note that what it calls &quot;tutorial&quot;, &quot;how-to guides&quot; and &quot;explanation&quot; is sometimes called &quot;guides&quot;, &quot;howtos&quot; and &quot;rationale&quot;.<p>As an application of this, I always thought that the Windows API help, especially those around Win3.1&#x2F;95 had one of the better approaches for an API&#x2F;library: the API is split in functional parts&#x2F;groups (windows, fonts, messages, fonts, controls, etc) and for each group there is an &quot;overview&quot; section (e.g. Windows introduces the windows concept), then a reference (often split in several parts itself) and finally one or two examples (though that was optional).<p>The help itself didn&#x27;t have &quot;howtos&quot; or &quot;rationales&quot; but those were available through MSDN (later at least) as knowledge base articles.<p>(modern winapi documentation is a mess on that regard, especially if you do not already have a vague knowledge of what you are looking for, because even though it is largely the same text, they have split and moved things around too much and put irrelevant distracting links everywhere)<p>On the Unix world, the original X11 documentation follows a similar pattern, though for other more recent projects there is usually a very one-sided approach: as the article says, most projects only provide API references and perhaps a single (often unfinished) tutorial.<p>GNU projects usually have documentation in texinfo which is laid out as a book and is often very good (most disagreements come from the default GNU info viewer, not the source documentation system that allows for HTML and PDF output nor really the info format itself that has more usable viewers like tkinfo). It also has a similar approach as the Win3.1&#x2F;95 docs, though i think the lines between &quot;guide&quot; and &quot;reference&quot; are often blurred. This largely depends on the project though (e.g. the glibc manual has these better divided, whereas the bash manual tends to be more &quot;blurry&quot;). Also i&#x27;m not fan of GNU&#x27;s style of function references - i prefer the more common&#x2F;manpage-like style where for each function&#x2F;macro&#x2F;struct&#x2F;etc you have an isolated page a very brief description about its purpose, its declaration, a list of what each parameter (for functions and macros) does, its return value (if any), a detailed description (if necessary), any requirements (e.g. headers, for APIs with multiple headers) and links to other relevant functions and guides.<p>Also i find examples for each function to be nice though this is even more rare than guides.<p>As a sidenote, i loathe autogenerated documentation and &quot;docgen comments&quot; in source code (and not only because they tend to enforce the &quot;reference-only&quot; approach). I think those should be totally separate and not pollute the code with documentation (especially headers as that makes it harder to read the headers that also act as a quick overview for an API).<p>Though having a tool to automatically check docs and sources for mismatches (missing functions and&#x2F;or functions with wrong declarations in the docs) is helpful. But i&#x27;m not aware of anything that does that.