We are looking at revamping documentation across our product line. Part of that includes reference manuals for a programming language used as part of the system.
When writing a reference manual for a programming language, what is the best way to structure it for maximum usability to those new to the language?
What are the key aspects for each keyword documented?
- Syntax
- Description
- Arguments – if applicable
- Return values – if applicable
- Example of usage?
- Any others I'm missing?
Should concepts (such as locking strategies, performance related details) be also documented in this reference manual, or is that a separate document?
This is for external consumption. We already have full doc sets (see: http://www.rocketsoftware.com/u2/resources/technical-resources). Working out what we should do different – I already have my ideas, but as always, I try not to rely solely my my opinion.
Audience: Technical developers using our database(s) & tools to produce software across many industries.
Best Answer
Organize documentation in accordance with target audience needs.
In your case, primary audience are apparently software developers. The parts to consider here are to address different "sub-audiences" of this one:
Those willing to quickly get the taste of it, just build and run sample application to see how it looks like.
Think of the audience like one addressed by MySQL "15 minutes rule":
For the guys willing to quickly learn things necessary to start producing working software.
For developers already well familiar and practiced with fundamentals, interested to know what is there beyond. Mainstream topics that have not been covered in Fundamentals.
Subjective advice and guidance for those interested in the way how you recommend to do things.
The question does not indicate whether this could have a substantial audience in your case, so the options to consider are to include it as a part / appendix of Advanced topics or even drop it completely.
Obscure topics, outside of mainstream, that might be of interest to pretty limited fraction of your audience. For example, if you have legacy line, or stuff like upgrade / migration / interoperability with legacy - put it here. If there are some side effects for some function at particular "exotic" environment, it goes in this part.
What if something in the manual is questionable / ambiguous? What if it turns out that thorough explanation of particular concepts would make that manual too hard to read? What if it turns out that particular version of the manual has mistakes?
Two things to consider for maintainers are:
Whenever there is a questionable / ambiguous / hard to explain topic in the manual, the reader can be referred to particular paragraph in the specification for a strict and clear, "official" statement on that. Strict and complete (and most likely boring) description of language syntax would better go there.
Paramount considerations for Specification are technical accuracy and completeness, even if these come at the expense of readability.
Just reserve some URL and put it in the beginning of every document you release, so that the guys wondering what the hell they have just read could go there (instead of pestering manual maintainers) and find the mistake explained.
E.g. manual maintainers would apparently be interested in a complete, accurate description of concurrency and locking in the formal specification - put it there. Readers of Fundamentals or Advanced topics might be interested in an overview / introduction / guide extracted from specification and tailored to their needs etc.
It could be helpful to arrange a comparative study of reference documentation provided for other languages like yours. Aim this study at leveraging experience gained by those who did it before and learning how to avoid mistakes they made.
The last but not the least, consider setting up documentation development in a way similar to software development. I mean things like version control, regular releases, issue tracking, quality assurance etc. You may want to make some compromises though if it turns out that your technical writer(s) are not really comfortable with stuff like that. We don't want to get crappy content "in exchange" for perfect development process, do we?