[url=http:/civis/viewtopic.php?p=29556829#p29556829:h0062fgu said:
Lord Pachelbel[/url]":h0062fgu]I've never thought about it until now, but I like the way PHP's documentation is formatted.
Yeah, PHP's documentation is pretty good structurally with a decent level of detail and examples. I've hammered together a few PHP-based apps in the past, and PHP's documentation has always been its saving grace for me.
One improvement I would suggest would be for it to give a brief (e.g. one-line) example of basic use at the top, before even the main Description section. "A picture paints a thousand words", as they say. A lot of initial learning is done through mimicry rather than formal reading comprehension, so give newcomers a concrete example they can immediately visualize, understand, and use, and then gradually building up information and more advanced examples on top of that helps to ease them in. Plus, of course, if all they want to perform is the simple case, then their question is already answered, and they can just ignore the rest of the documentation for now.
Arguably the best bit is that users can annotate existing pages, which makes it very easy to get feedback on which parts of a page are working and which are too vague/confusing/misleading/wrong. Especially as it makes working amendments available to all other users immediately; whereas if they're filed as tickets in an issue tracker they're obvious to nobody and may sit there for weeks/months/years until a documentation maintainer gets around to formally updating the page.
The flipside of having user comments is that they can sit around for years without being incorporated into the main documentation, or deleted if incorrect or no longer relevant. But that's as much a sociology problem as an editorial one, since there's always a fear that users will misinterpret their original comments' removal as disrespect to them, rather than healthy community-driven evolution and improvement of the documentation. I suspect as long as there's a full change history kept and an automatic acknowledgements section at the bottom, folks would know they're contributions are valued and acknowledged. Wikipedia seems to have solved this problem fairly well, so might be a useful study.
But I have often thought how much I hate the way MySQL's documentation is formatted:
http://dev.mysql.com/doc/refman/5.6/en/insert.html
Yeah, that's simply atrocious. Like the OP's case, it's trying to do far too much all at once, and never draws a breath. Fact is, that INSERT statement is far too complicated to describe in a single block of text (or even arguably a single page), never mind in a single syntax (or in that case 3) template.
Here's the thing: no amount of politely shuffling the deckchairs is going to save that Titanic; you've just got to call it out as the unmitigated disaster it is. It's the sort of raw material that desperately needs a really good, experienced, fearless editor to get in there with a bloody chainsaw and divvy it all up and rebuild it till it makes sense. Heck, even laying down a basic style guide that tells writers when and how to use section headings would be a huge leap forward.
(I've dealt with professional editors and done a bit of ad-hoc editing myself, and know it's an absolute minefield and
very easy to put your foot in it. It's as much about working with the people as their manuscript, building up mutual trust and understanding with the common goal of making the work the best it can be. Wonderful when it works; hugely embarrassing - and potentially catastrophic - if it doesn't.
Still, if creators genuinely care about their users, then they'll put the work first and stow their egos for another time.)
Another (slightly less painful) example would be the Python documentation. The whole thing's structured as a formal ontological exercise, rather than a smoothly flowing layers of information in the order readers are most likely to need it, with hyperlinking to allow users to hop back/forth/sideways/etc to specific topics that are relevant to them and what they're doing. It's something I tried doing in the AppleScript book, though not entirely successfully (it takes much too long to really get going, for one thing). Once you actually try constructing documentation that way, you quickly discover all the bits of the language that are overcomplicated/duplicative/unnecessary/etc, because it makes that job a living hell (damn book nearly gave everyone a nervous breakdown). Plus the Python docs have a truly rubbish search function: try searching for basics like 'if', 'for', and '==', for example.
Which comes back to why I say programmers should always write the initial documentation themselves, because it helps them clarify the problem in their own mind
and motivates them to fix their own shit instead of just dumping it onto others then pretending it doesn't smell. Once the draft documentation and code are mutually stabilized, the professional tech writers can then edit and/or rewrite those docs as needed.