in reply to creating documentation

I completely agree w/ john_oshea and tirwhan. It is very difficult to write good documentation, as I've said before, but not quite so eloquently.

To handle trying to write docs for multiple audiences -- sometimes, you need to just write multiple sets of documentation. Eg, it makes sense to place normal usage info in the POD, while placing information about hacking the code in line comments within the program.

For those times when I've had to write documentation for end users, there are two methods that work best for me -- flesh it out based on questions asked by the users, but even better is to write the documentation before you write any code.

As strange as it may sound, it's sort of like using XP techniques -- instead of writing tests first, you explain how the program is expected to work ... and from there, you write examples, which get turned into test cases ... and then you write the code.

It lets you think about how your program / module / whatever fits within a larger system ... it also forces you to try to keep the interfaces simple, so that you can more easily document them. (resulting in it being friendlier software for people to use, typically.)

As for covering all of the basis -- use some of the module templates, and look at the different sections they have, or look at documentation for similar applications. Documentation is never really done, as you'll always have the trickle in of questions, and you refine the documentation to clarify things (hopefully without making other things more confusing in the process)

Replies are listed 'Best First'.
Re^2: creating documentation
by Anonymous Monk on Dec 29, 2005 at 13:06 UTC
    "multiple sets" indeed.

    The famous book Code Complete, which I just started on, talks about scaling software, and mentions that we now build software systems as economically large as building a highrise building.

    On projects of THAT size, some project planning tools will spit out an estimate that you will need 59 different TYPES of documentation.

    And they are right.

    As things get bigger, you are going to need more and more TYPES of document. But just go with it... as long as it is accurate, it doesn't really matter how much you have.

    Each type of documentation is going to have it's own issues.

    With API POD docs, I find I now religiously document the return values for every single method.

    For the main body, I go for elegant SYNOPSISs without too much confusing details, and that I wouldn't mind seeing in real code (because some annoyingly large percentage of people will just cut and paste your SYNOPSIS and modify it to suit their needs)

    If I need diagrams, I just add a doc section. I find myself just piling files into it that I think will be useful, from visio diagrams to the "documentation" of XMLSpy to whatever I think might be useful later.

    Even on small client projects, you'll be looking at 5-10 different types of documentation. Just remember to try and deal with them individually. What is the best way to write user docs, given they are stupid. Screencasts? Text Manuals? PDF Manuals?

    What is the best way to write internal comments... API docs, etc etc.

    You should be able to codify some sort of best practises for the different types of docs one at a time at your company with a bit of experience.