What is the deal with API documentation that can seem so terse to a hobbyist?

https://lemmy.world/post/16886815

What is the deal with API documentation that can seem so terse to a hobbyist? - Lemmy.World

I’ve encountered this many times where I simply don’t understand the context and use of an API based of the API documentation unless I can find an example that already utilizes it in a working project. The first thing that comes to mind is Py Torch. I’ve tried to figure out how some API features work, or what they are doing in model loader code related to checkpoint caching but failed to contextualize. What harebrain details are obviously missing from someone who asks such a silly question?

It’s because the same people who wrote the code usually write the docs, and people who are really good at writing code usually aren’t good at writing docs. It’s two different skill sets that usually don’t coincide.

Case in point: my own documentation for nymph.io

I know it’s bad, but I don’t know how to make it good. The code, however, is pretty good. It runs my email service.

Open source projects also aren’t very good at attracting people who both want to volunteer their time writing technical documentation and can.

Nymph

Object relational mapper for Node.js and the browser

Nymph

Here’s a tip on good documentation: try to write the documentation first. Use it as your planning process, to spec out exactly what you’re going to build.

And any time the documentation doesn’t match the code you wrote… that should usually be treated as a bug in the code. Don’t change the documentation, change the code to make them line up.

Don’t change the documentation, change the code to make them line up.

Unless the documentation is wrong

Malbolge - Wikipedia

Sure - but in the real world that mostly only happens when the documentation is an afterthought.