Why is the OpenBSD documentation so good?
dataswamp.org
dataswamp.org
The man pages sometimes document things only by implication, or with confusing wording, such that if you already know the answer it makes sense, but if you don’t it’s near-impossible to find out. (To be fair, this affliction is definitely not exclusive to OpenBSD’s manpages.)
From what I can figure out, their 'ksh' is a vendored copy that they forked and made a bunch of changes to without ever updating the version string, so despite claiming to be “PD KSH v5.2.14 99/07/13.2” it’s got 20 years of patches added on top and won’t match any ksh you’ll find anywhere else. This is not explained anywhere that I could find.
There are some questions in the installer about 802.11 setup which are terse to the point of incomprehensibility and AFAICT entirely undocumented. (I had to go rummaging around in the source code and read the installer script to figure out what it was trying to get me to do.)
A particular peeve is that the sh and ksh manpages are completely different, despite documenting the same program. (They’re the same binary, with the non-POSIX bits left out of the sh manpage.) It’s particularly frustrating that there are some things documented well in one but poorly in the other, so once you’ve found the same documentation on both sides you still have to figure out what’s actual differences and what’s just bad phrasing.
OpenBSD’s maintainers also seem very insular and their mailing lists have a reputation for being very abrasive, so it’s also very intimidating to propose improvements; as a result these papercuts stick around (not being very obvious to the developers, who already know how these things work and so miss them) and continue to mar the polish.
That was my experience, not being familiar with unix / Linux - but the https://www.openbsd.org/faq/ does go along way to bridge the gap between the man pages and “How can this OS be configured to do what I want?”.
The documentation I found much better was MS in the 1990s where you git an overview as well as the details.
Apple documentation used to be quite good but all their overview docs are now in archive and not updated and you just get the API.
Keep it at a pure technical level. It helped me when I had answers that I would have considered rude but where technically correct.
Man pages were not meant to be the only documentation except in the case of simple programs. For everything else man pages were meant to be a concise reference for people who already know how to use the program but needed to jog their memory about some aspect of it.
If you needed to learn something complicated, such as sed or awk, you weren't supposed to try to learn from the man pages. You were supposed to reach for your copy of the Unix Programmer's Manual.
Man pages contain at least reference information, but they're very inconsistent about including how-to guides and and explanations, and almost never contain tutorials.
Big mistake.
You propose a change:
- if it's interesting, you will get advice on how to make it good
- if it's good it will get committed
- if it's not relevant, you will be told
Here are some examples: https://marc.info/?l=openbsd-tech&m=155934125101222&w=2 https://marc.info/?l=openbsd-tech&m=156256473722583&w=2
What reaction did you get when you proposed a documentation patch?
Obviously "better docs" would be better for the users of software, but most people contributing to most open source projects (or indeed to most non-open source software!) are not doing so primarily for the altruistic goal of making users' lives easier. So the default position ends up being "do the stuff you find fun" or "do the stuff that your employer cares most about" or "do the stuff that fixes problems you personally are running into", which will often not be "great docs".
(I speak as somebody who's involved with an open source project whose documentation is overall not all that great and which doesn't have a "new changes must have docs" rule, so I don't mean to throw stones here -- just trying to argue that you should probably expect that poor docs are the norm and good ones the rarity.)
It's a bad example.
> If you want to try FreeBSD just use the Handbook, it documents FreeBSD very well. That said betrays childish aspects e.g. they refuse to list that FreeBSD can run on Linux/KVM (the mere fact it can, I'm not talking in depth instructions).
(from id=32369189#32372408)
https://docs.freebsd.org/en/books/handbook/virtualization/
goes way back... (and into the contained bug report)
https://forums.freebsd.org/threads/please-give-some-ideas-ab...
The comprehensive and well-written man-pages are one of the reasons why OpenBSD feels so "complete". In German, you'd say "aus einem Guss", which almost literally translated means "from a single mold".
Linux often feels like a bunch of different things thrown together (which it always was), and the quality, or even just existence, of the documentation differs accordingly.
On the Linux side, there was a Linux utility mentioned on HN and it was broadly praised. So one "pamac install" later, I was reading its man page. I had to resort to Google because I couldn't even tell what the program was supposed to do from its own manual.
In the good 'ole days, I'd work completely offline, using only the documentation provided by Microsoft in Visual Studio. It was complete, correct, and had samples. No distractions, not googling, and no HN out of the blue!
Always look for adequate docs before adopting any library into a project. It is a lesson you need taught only once.
And it was quite good. You could learn just about everything you needed to work from it, offline and from one source.
There are many things I did not like about Microsoft back then but their developer ecosystem was not one of them. Tools were expensive and closed but quite complete and well put together.
Until I learned about open source and free software I considered MSDN to be the pinnacle of how software development should be.
These days it just feels like MS can't decide between free or prosperity and so can't seem to get either one right.
Also, another H/T for Rails docs, they are very good... but far from comprehensive
Documentation is expensive. Good documentation is more expensive, requires different skillsets than most engineers have, and requires a bit of an organizational commitment to make work.
That last part is more difficult in Linux-land than BSD-land, which is only a partial excuse. The main reason it almost universally sucks is that people put up with it, so managers are more than happy to cut those expensive tech writers.
And if it’s not tracked… it’s invisible
I can't place it, but I seem to remember Richard Stallman stating in some early GNU project goals that he'd seen much software usefulness hindered by poor documentation and made it a notable priority for the GNU project to have good documentation from the beginning.
GNU manuals online: https://www.gnu.org/manual/
Particularly: man pages were fine for PDP-11 Unix utilities, when they were formatted with nroff/troff and the printed versious usually literally fit onto one page (a few of them ran over into two pages). So they don't have any navigation features, TOC's, indices, or whatever. That fails badly when the man page is large: I see rsync's is 4341 lines (72 pages) and bash's is over 100 pages. There are many other large ones as well.
The only way you can find stuff in a large man page is search the text, which is a pain because there is no metadata to distinguish the search hits. Texinfo on the other hand produces navigable hypertext doc and an organized printed manual with an index, TOC, cross-references with page numbers, and so on. So it is a much superior format.
None of this is not to say that GNU didn't do a good job with documentation. The documentation is often excellent. But the documentation format and tooling needed replacing two decades ago. Texinfo is an anachronism. It's painful to author (I have written a Texinfo manual, later replaced by DocBook) and limited in its output capabilities. But today we have Sphinx and other tools which are greatly superior in their ease of use and capabilities.
While in some respects Texinfo was more structured than troff dot codes, it was at the same time vastly less flexible with its formatting, figures, tables and equations. troff let you use tbl, pic and eqn etc. I personally find it easier to search a single massive manpage than hunt through all of the Info nodes. The nagivigability of Info documents is atrocious.
But that's all ancient history. Both troff and Texinfo are several decades out of date at this point. Arguing which is better is pointless when both have been eclipsed by far superior replacements. Which can generate manpages, HTML and PDFs with ease.
It's the difference between man/less showing '(press h for help or q to quit)' and Info showing 'Type H for help, h for tutorial.' I accept Info's technical superiority, but I've never intentionally used it because man/less works well enough without having to learn a new interface.
(the other elephant in the room is HTML/web browsers, which I think eclipse Info in reach and familiarity so much that no-one would want to learn a secondary rich-text hyperlinked document viewer)
An example: to get to the inet option in ifconfig, the normal '/inet' search will have a lot of false positives. but the tag ':tinet' search goes to the item in question.
Nothing against gnu info pages but I always preferred man pages as it feels like less cognitive effort to use. The less tags are indicative of openbsd culture where they try to improve existing systems. linux(due to it's development model) has a tricky problem where it is very hard to improve anything. you can only create something new and abandon the old.
This is a big help in reading openbsd docs, where they tend to put a lot in one page. For example, linux will split up the openssl man pages, one for each subcommand. OpenBSD has one page. With less as my PAGER, hitting :tx509 makes that a lot easier. Also discovered you can do this:
man -O tag=x509 openssl
Thanks!I do constantly use the Info documentation for Org-mode and a few other things, but it is observable (and annoying) that some large GNU programs like bash are documented only as man pages afaict.
GNU bash also has fairly good info documentation.
Afterwards I was like, wow, where has this been all my life???
So my answer to your question would be inertia.
/usr/share/doc
man pages. No one uses info pages, whoever says he does is lying.
1. In general, new programs, and updates to extending programs, tend not to get committed without the requisite manual pages or related manual page updates.
2. "Bugs" in OpenBSD's manual pages are treated no differently than bugs in other areas of the source tree. Find a problem in a manual page? Submit a diff file for it and it'll get reviewed and committed.
Good docs look like Tailscale[0] and that similar style where it has the Getting Started at the beginning, along with a nice menu tree on the side that gives an overview and provides easy navigation. You shouldn't need to know what you are looking for when you are learning a platform.
First, there are seven listed sources for documentation. Seven places I might have to look through to get the answers I need. I cannot imagine a reason to have more than two - "static" documentation (the four kinds of docs in the Divio documentation system) and release notes.
Second, there's no mention of awareness of the distinction between the four kinds of documentation (https://documentation.divio.com/), and lots of discussion on the implementation details of man pages but nothing on the actual content. Man pages are pretty well-known for being decent references, but often lacking how-to guides and explanation, and having terrible/nonexistent tutorial information. This makes me think that the author is confusing "documentation" with "reference manuals".
Third, the lack of a community wiki is explicitly counted as a feature. It's not. Users need a place where they can collaborate with other users, and quickly write down their observations and hacks and problems while they're trying to get their job done - they don't have time to start a lengthy conversation with the mailing list developers or go through an involved process for patching the official documentation. Source: me, a user who has to work in a corporate environment and whose job is not working on OpenBSD, as well as many of my co-workers who often don't even take a few minutes to edit the wiki when they find a problem or fix.
I mean, it makes sense since the internals are probably moving more than the interfaces and since everybody reads code anyway they can just do that. On the other hand, design documentation allows one to quickly figure out how a particular feature works, which is more tedious to do from just reading code. Barrier for use is lower, but barrier for contributing is higher, or something...
There are downsides to it too, Linux has a lot faster development and broader compatibility but this also results in more complex amd harder to maintain docs.
Who's updating it? Volunteers, paid contributors, developers?
That said, I'm happy that Arch wiki exists. It has become the defacto place where people elaborate their solutions for Linux.
Which is a shame. Some of the core pieces of GNU are really well documented, but people who start out in Debian dont realize this and are left reading mediocre man pages and outdated wikis on Debian.org.
But I do think Debian and friends do a disservice to linux by not installing the GNU documentation by default.
The GNU Free Documentation Licence has (optional) clauses in it ("invariant sections") which preclude making modifications to certain parts of the documentation, which makes it effectively non-free. While some manuals licensed under the terms of the GFDL are entirely free, several of the major GNU projects have large political rants embedded within them, which can't be altered.
I can see both points of view here. If you write opinion pieces you might not want your opinion altering and republishing without your consent. However, I would also argue that a free software technical manual might not be the best place to put such opinion pieces, because there is a certain hypocritical aspect to championing free software rights, but not applying the same principles to the documentation of the same. It would not be difficult to keep the twain separate.
Full disclosure: I voted against keeping GFDL documentation with invariant sections in the Debian archive back when I was a Debian developer. This is because one of the primary benefits of free software is that everyone has the same rights and responsibilities as everyone else. Distributors and end users have the same rights to distribute and modify as do the original maintainers (albeit they can't relicense under different terms). The GFDL invariant sections make one organisation or individual "more equal" than others, and that's against the entire spirit of what free software is all about. This is one instance where I think RMS really dropped the ball. I might not agree with all of his philosophy but it's usually well thought out, and in this case I think it's not well thought out at all.
Debian has the Debian Free Software Guidelines, upon which the OSI Open Source Definition is based. If you read them, you'll see that the GFDL with invariant sections fails the clause regarding "modification and derived works". Because it explicitly restricts your ability to modify and distribute.
Trisquel may have a different interpretation. I understand they are closely aligned with the FSF, so may not agree with the Debian stance.
This is one point upon which I do think the FSF is entirely wrong. Putting invariant sections into the GFDL made the licence firstly overly complex, and secondly made it incompatible with the OSI and DFSG interpretation of freedom. All just so they could include immutable political content in their documentation. The fallout from this made it a very poor choice to use for documentation, and was a spectacular own goal. If you follow the licence to the letter, it means you can't embed source code examples without being required to also include the invariant sections (you aren't permitted to delete them). This makes the licence impractical to comply with for a lot of common use cases. Overall, it's simpler to ignore the licence entirely and simply use the same licence as used by the rest of a given project's codebase. I did use the GFDL in a few projects at the time of its creation, but no longer do so after getting a better understanding of it. It's a bad licence.
The sale of support, OTOH, absolutely was an early business model. See, e.g., Cygnus Solutions, Red Hat, etc. And today many project maintainers make money in a similar manner, through contracts or outright full-time employment related to feature development and integration. But this happens just as often in BSD land as Linux land.