Library Writing Realizations (2015)
cbloomrants.blogspot.com
cbloomrants.blogspot.com
> Docs are almost useless. Nobody reads them.
> They'll read a one page quick start, and then they want to just start digging in writing code.
> Keep the intros very minimal and very focused on getting things working.
I, for one, read the docs. May fortune smile on those who put effort into https://rasterio.readthedocs.io/
They are terse, but enough breadcrumbs to fumble my way to a working input for gdal_proximity.py
Possibly I'm not a representative sample, but one of my mantras at the office is "If you ain't doc'in', you ain't rockin'."
(Though we are only doing ransom note wiki pages, not library documentation.)
If the package doesn't have shiny Sphynx docs, at least afford us a few cryptic utterances in the source code.
I generally agree with everything he wrote. One page quick start, focus on getting things working, people will dig into writing code right away. Yes, yes, yes. But, then what? People tend to read documentation extensively when something doesn't work the way they think it should. You can make your API as self-documenting as humanly possible, but there's no way to know if the person using your API is going to be on the same wavelength.
My go-to example here is Ruby. I once got stuck on an interactive ruby tutorial because you're supposed to be able to guess the names of the commonly used functions in ruby. This particular tutorial wouldn't let you pass until you figured it out. I had to google it. For whatever reason, it was not the word I would have chosen. The word they chose makes complete sense in hindsight, but it's simply not the word that comes to mind to me.
I kept running into that again and again with Ruby and later with Rails. I just wasn't getting it. The documentation became very important for me to get anything done.
Context: He works for RAD Game Tools, now a subsidary of Epic Games, and worked on the Oodle data compression suite for a long time. As such I believe there were tons of direct customers who would contact him and other team members whenever things went hairy. (There were no free version of Oodle so every user is a paying customer or sometimes an evaluator.) Therefore I guess he does have some data but no hard numbers.
What absolutely needs to be present is some sort of index of all functions/data types, ideally with a link to the underlying source code. Don't make people try and guess what your library exposes.
Tabulator (http://tabulator.info/docs/5.3) is the last example that comes to mind, had to use it earlier this year.
First, since writing a library is a lot about design, and design is about communication, documentation provides many indirect but useful signals. Second, no project (whether dev-to-dev or dev-to-end-user) exists at a discrete point in time, and as every piece evolves documentation will be critical for making it manageable, especially if the project is not something done for hire.
Being able to link said docs saves on having to re-explain everything from scratch when asked questions - helping contextualize and give background to a terser answer, assuming the docs don't answer the problem outright. They can also be helpful to refresh my own memory when explaining things, or when I'm trying to remember how to use my own code.
> People will not read the docs.
Reminds me of a pull request I made a while ago
https://github.com/krisajenkins/yesql/pull/151/files
The first piece of code on the readme is "not the solution" (lol), and everybody I knew who was trying to use that library was copy-pasting that specific piece of code from the readme.
https://docs.python.org/3/library/csv.html
Of course most readers who copy paste this garbage will be first confused by the results and then will find the actual answer on stackoverflow
The list is pretty good, although I am still in favor of good docs since software is not only supposed to be used, it's also there to be studied by future people who want to learn new ideas.. I loved reading manuals for programming languages for more than a decade, but now I am a bit bored with the genre, writing software has also become a bit more fun than before... I'm sure these things correlate.