Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: RFC Is this readable?

by adrianh (Chancellor)
on Oct 16, 2005 at 22:55 UTC ( [id://500620]=note: print w/replies, xml ) Need Help??


in reply to RFC Is this readable?

Random comments/advice. Hopefully vaguely constructive:

  • You don't actually say what your module does anywhere in the introduction :-)
  • Stick to something close to the POD outline structure generated by h2xs, Module::Starter and similar. In particular:
    1. The NAME section should give a one line summary of what the module does
    2. The SYNOPSIS section should give a short end-to-end code example of the module working. Use comments to explain what's happening.
    3. The DESCRIPTION should supply a brief text description of what the module does
    Basically - if I don't have a good idea of what a module does by the second paragraph of the description I usually stop reading.
  • Code beats text. Don't talk about concepts if you can demonstrate them with code. Currently you have to read about half the document before you get something close to a real-world code example.
  • Aim the main module documentation at a reader who understands the concepts involved. If you need to teach or preach move it to separate documents. It gets in the way of people trying to use the main module documentation for reference.
  • If there are modules on CPAN that do vaguely similar things (and these days when is this ever not the case :-) include a compare and contrast section. Show where your module is better and worse than the alternatives.
  • Always have a "Why" for your "What". When you're explaining what a particular piece of API does, explain why you would want it to work in that way. For example when I originally wrote the description for startup and shutdown methods in Test::Class I didn't have the DBI example. I added it later because it makes it much more obvious why using that particular feature can be a good idea.
  • Tree::Model doesn't tell me anything about what the module does apart from the fact is presumably has something to do with modelling trees?

(and before anybody points it out - yes I should follow more of my own advice with some of my modules :-)

Replies are listed 'Best First'.
Re^2: RFC Is this readable?
by BerntB (Deacon) on Oct 17, 2005 at 00:17 UTC
    Good advice, good feedback!

    If you need to teach or preach move it to separate documents.
    This was that "separate document". :-)

    If that wasn't clear, well... I said 75% done. Maybe it is 60%? :-(

    As I wrote in the document:

    Read the Introduction document before looking at this, so you understand what Tree::Model does. After this document, you should read the programming APIs and the examples. Start with the pod/documentation for top.pm and then sysOwner.pm.

    And in the post, before the documentation:

    In addition to this, there is an Introduction (I put it here: BerntB's BerntB's scratchpad and pod files documenting the method calls. You might have to read the intro to understand this.

    And, yes, Tree::Model is a stupid name. :-) A better alternative would be appreciated?

    Basically - if I don't have a good idea of what a module does by the second paragraph of the description I usually stop reading.

    Very common, certainly!

    The intro at my scratch pad did that part. But people won't go there. I will rework this document so there is a short intro, then a reference to my real overview.

    You quoted Why/What -- I've heard argued that almost all documents should be written as newspaper articles. Most important things first, details next. I'll try to follow it.

    Update: On consideration, the standard pod layout you recommended do follow the "journalist structure with most important thing first.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://500620]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-25 17:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found