How to add documentation to your product life cycle
thisisimportant.net
thisisimportant.net
But seriously, this is a good listing of pros and cons, and it is a pity not more experiences are shared. Commercial products usually pay good attention to the docs, but esp. FOSS projects are often severely under-documented. Model may be different here as often the single dev is the documenter too (and hates that chore). I tried Readme Driven Development [0] for a while, but found it still resource-intensive to keep things up-to-date. For single devs, small teams the Diátaxis framework [1] is helpful to organize and makes the task a bit lighter.
[0] https://tom.preston-werner.com/2010/08/23/readme-driven-deve...
Moreover, when one went out of date so did the other.
So, I tied them together - I wrote integration tests such that with a jinja2 template I could autogenerate readable markdown how-to docs from the tests and their artefacts.
Setting that up led me to the realization that writing docs isn't actually tedious at all. It's the writing things down 3 times (spec, test & docs) and keeping them in sync that is tedious. And that part can be automated.
If there is a framework to build the whole bundle of docs from integration tests, integration test metadata, integration test artefacts, schemas, code and an assortment of high level explanatory texts then it stops being a chore. It actually becomes fun.
It means that DDD becomes integration TDD. The only difference is that I will write an additional 3-4 explanatory sentences alongside the integration test I write before the feature and run a "docgen" script afterwards.
[0] https://github.com/diaspora/diaspora/tree/develop/features
Nonetheless, there is a small number of projects where they either work around these constraints or it doesn't matter as much, so it can work. I find that most people that apply gherkin to their projects run into a brick wall though - usually for one of the above reasons.
I built https://github.com/hitchdev/hitchstory as an alternative that has straightforward syntax (YAML), very strict type safety (StrictYAML), low verbosity and the ability to abstract scenarios.
It is explicitly designed as a source for generating markdown documentation so that you can create richer docs like https://github.com/hitchdev/hitchstory/blob/master/examples/... for your users rather than more test-like documents like https://github.com/diaspora/diaspora/blob/develop/features/m...
There's
- how (implementation, how the system works)
- what (what the system is for, it's purpose
- why (design)
And there's audiences
- developers (using the interfaces)
- architects (designing the interfaces)
- testers (validating the interfaces)
- operators (running the system)
- managers (organizing development efforts)
And at some companies it's 1 person doing all of that. I think once you start to add more people, you start to have debates about documentation. The programmer might have written "clean" code and automated tests which are understandable to other programmers but less useful to project managers and operators.
To address the question in a general sense, you need to address the case when the developers are the technical writers. How do you integrate documentation to your work flow? How do you justify the time spent to management? How do you make sure it’s useful to a customer?
A better (& simpler) way to approach it might be to get buy-in/consensus that after completion of an item, the developers as a group devote another 3%(?) of the accumulated development time to whatever documentation is required.
Don't compartmentalize your product and the documentation for it. Developers don't hate documentation, they hate opening 15 PRs to get shit done.
AFAIK there's not a nice open source solution (or even toolset) for this.
It would be great to invalidate documentation when the underlying code changes. There would be two levels of invalidation differentiated by probability: "these docs are definitely wrong now" and "these docs may be wrong and need to be checked." This is easier with APIs than with UIs but I've not seen it done with either. Some motion in this direction are, for example, IntelliJ's comprehensive refactoring support that can and will search documentation.
I'm not really sure what a good solution looks like, but there's definitely a chunky problem to be solved here.
End-users (i.e. documentation readers) are inevitably the last line of proofreading and docu-debugging. A nice idea I've seen is to put a "comment on this page" button tucked away in the corner of EVERY page.
There's also things that work the other way. Rather than bloated AI docs you end up with frequently curated docs. For example, Runme is an OSS tool to make documentation interactive and runnable. In that scenario, your docs writer probably becomes an editor and UX eye on the documentation; the teams using the docs become the writers and updaters because they're executing out of them.