Document management is hard [or why Javadoc is bad]
September 1st, 2003 by HenHaving watched Maven for a while, I thought I’d use them as an example for this piece.
Early on, Maven had great docs. They were up to date with CVS [as no release had been made] and lured users in to using Maven. When the first release happened, the docs continued to move forward, staying synced with CVS. This meant that features documented were not available to the average user, but there was no indication of this. This continued for a short while until the documentor got into other things and the documentation started to stagnate. New releases happened, and soon the documentation did not represent the source code that had been released.
Nowadays things are better. Documentation is in or around the area of the release. The addition of a wiki has allowed a lot of dynamic information to enter.
So… what’s the point of that story? It’s not to try and moan at Maven. I think their docs have over the last 2 years been very good. The point is that documentation releasing/management is very hard.
[rambled long enough, moving to the extra section for more…]So. How do we handle releasing of documentation?
In the slow slow world of closed communities, the documentation releases with the code. It’s called a product. The code is held up while the documentation is deliberated over and any lessons learnt post-release are never documented and released. When did you last receive a bugfix for your help-pages or your manual? Errata releases do seem to happen, but not with any real cohesion.
In the fast fast world of open communities, the documentation release is not allowed to hold up the code release. This is good. Open communities tend to rely on online publishing [in fact this is a lot of what makes them open] so this allows them to push out bugfix releases to documentation very aggressively.
There is a deep problem however in the versioning. While we version our code releases, and include some downloadable documentation with them, we don’t version our websites. Sometimes, as Maven now does, we mention that this website is for code release version X and was last updated on date D. I’ve even taken to linking to the old sites for a particular version. Is this enough?
Lastly…Javadoc. It’s bad because it is tied to the code. We all like to ooh and aah over literate programming [it’s sweet], and javadoc is a bastardised hack of literate programming. But both tie the documentation to the code. Now, for the API contract, this is good. The code and the contract are the same. But when the documentation starts to become a manual, it could be bad if the website has any information in it.
It seems there are two choices for an open source project to take. In Java terms these are:
1) Release code with the API contract alongside but nothing else. Then you maintain a documentation site for every release of the code. [deprecating as reason permits]. This is ‘untying the code/docs’.
2) Put all the documentation in the release, ie) the Javadoc. The only way to update the documentation is to release a new version. This is ‘tying the code/docs’. The website is then an utterly different product to the code, it is a marketing/delivery mechanism and does not provide any real information.
In reality I think we all try to do both, and end up with a confusion for a user. When they download product X, they get some kind of documentation with it. It’s relevant to the download, but without errata fixes.
When they look at the website for product X, they see another set of documentation, which is up to date and includes things like articles etc, but is not relevant to the download.

September 5th, 2003 at 6:36 am
I agree on your point that good documentation is hard. I also agree on your point that JavaDoc can restrict updates to the documentation because it ties docs to the code. There should always be more than JavaDoc to a products documentation.
But I disagree with your statement that JavaDoc is bad. It is immensely better than before JavaDoc at getting information (usually the contract) to the developer using the framework or library. It is perhaps the one part of Java that is responsible for the most success of Java.
I don’t believe JavaDoc is bad until you suggest an alternate solution. Until then you’re just whining (no disrespect intended).
Vince
September 5th, 2003 at 6:40 am
Agreed. My question is whether the javadoc should contain documentaiton or just the contract [with annotations].
There are some projects/products where the examples and top level description/documentation are in the Javadoc and not separate. I think this is an all or nothing thing, and it means more intelligence in the release versionning.
I carry lots of javadoc around on my PDA for the contract stuff and love it
September 5th, 2003 at 6:42 am
Additionally, good documentation is not hard. It’s just time consuming. Good documentation management is hard
September 5th, 2003 at 7:18 am
IMHO, this wave of embedded documentation is a good thing. javadoc, doxygen, perldoc, .NET docs, … it wouldn’t be imitated if it didn’t provide some value.
it sounds like you’ve identified a problem with the way people release docs with open-source software. typically seems like several versions of the software are available but only one javadoc, which corresponds to the latest.
i don’t know what the best solution is. i’ve seen people release javadoc with version numbers. in other cases, javadoc was packaged in the zip. personally i prefer a binary jar with separate javadoc and source.
September 5th, 2003 at 7:23 am
Javadoc contracts are a good thing. +1.
The problem is not just with open source documentation releases, it’s a problem with all documentation releases, but only open source does well enough to see this part of the problem.
Several versions of the software are available, but only one documentation. Not just javadoc, all the documentation. Releasing javadoc with the jar is good I think, and having one online is good, but the problem is when a project has good documentation, like Maven. Then it becomes very obvious that multiple versions of software to 1 documentation site is not dealt with well out there.