Is documentation like pineapple on pizza?

by Bogdanpon 6/17/2025, 12:38 PMwith 24 comments

by quietbritishjimon 6/17/2025, 12:45 PM

Wow, that article is impressively devoid of real content.

by rzkon 6/17/2025, 12:47 PM

Documentation is more like a pizza baking manual, so that if a new chef takes over, they can still make the same pizza.

by ChrisMarshallNYon 6/17/2025, 12:51 PM

This may be something that AI can be helpful with. We'll see.

For myself, I tend to keep inline documentation to a minimum, maybe only adding a note, as to why a certain line might be there (as opposed to what it does).

I do make sure to always provide entrypoint and property descriptions, headerdoc-style.

Here's my own take on the topic: https://littlegreenviper.com/leaving-a-legacy/

by randomNumber7on 6/17/2025, 12:57 PM

It didnt even touch the main points, imho.

1. You have to maintain both documentation and code. If you change code and forget to update documentation it can be very confusing and cost a lot of time.

2. Proper code should explain itself (to some extend).

3. Taking a lot of time to write proper documentation is rarely appreciated in a world where long term strategic thinking has no place anymore.

4. It's harder to fire you if you when you are the only guy who knows all the stuff.

by yaseeron 6/17/2025, 12:48 PM

I've found writing docs and updating docs a great AI use-case.

In my experience documentation generation has a lower error rate than code generation, and the costs of errors are lower too.

I'm not really a big fan of AI agents writing features end-to-end, but I can definitely see them updating documentation alongside pull requests.

by theletterfon 6/17/2025, 12:59 PM

Answer: You might need a technical writer. https://passo.uno/signs-need-tech-writer/

And before someone links Yet Another Docs Framework, I recommend taking a different approach: https://passo.uno/beyond-content-types-presentation/

by TeMPOraLon 6/17/2025, 1:31 PM

Documentation is needed in the project, lack of it makes it worse - it's literally the opposite of pineapple on pizza.

by alganeton 6/17/2025, 1:00 PM

Documentation and automated tests belong together.

It makes tests better. Instead of a shady snippet of code that just passes an assertion, it should generate human readable examples with additional prose included by the developer for special cases.

It makes docs easier to maintain. You probably already need to find the test for the code you changed. If the docs are really close, it's easier to maintain it.

There are many ways of achieving this. I particularly like literate programming, just for the test suite. You can code whatever way you like, but the tests must be in a literate form.

I also like the idea of having a documentation that can fail a build. If you commit a bad example snippet on a markdown somewhere, the CI should fail. This can already be done with clitest, for example (scaling it culturally is a bit hard though).

Somehow, xUnit-like tools and spec frameworks already point in that direction (DSLs that embrace human language, messages in assertions, etc). They're already documentation, and developers already use test suites for "knowing how something works" very often. We just need to stop writing it twice (once on the tests, once on prose) and find a common ground that can serve both purposes.

I mean this for API docs mainly, but for other stuff as well.

by bitsandbootson 6/17/2025, 2:45 PM

Over time I went from 0 doc, 0 automation to putting a lot of thought into both. Projects become a bit of a circus to maintain, and nobody can help you out of it if nothing is documented, and good luck when you forget.

Devs aren't the only problem here. In the few large companies I've been in, the assigned doc writers haven't made a net positive. It always takes me so much effort to walk them through what to write about and how it should be written to match how the users actually read and understand content that I end up writing it myself during such meetings. It's a bit of a living rubber duck exercise at times. I've grown to be a high paid doc writer that writes code too.