Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: The problem of documenting complex modules.(Summation.)

by Anonymous Monk
on Jul 07, 2015 at 23:17 UTC ( [id://1133658]=note: print w/replies, xml ) Need Help??


in reply to Re: The problem of documenting complex modules.(Summation.)
in thread The problem of documenting complex modules.

I've found even if the docs are overwhelming, or autogenerated, there is still hope most of the time

I skip the documentation and I look for "examples/" and "t/"ests as its code that actually supposed to run :) (also "etc/")

I look for a FizzBuzz HelloWorld type example, clear simple purpose, easy to follow varnames..

If it takes more than three steps its magic ie useless as a foothold

  • Comment on Re^2: The problem of documenting complex modules.(Summation.)

Replies are listed 'Best First'.
Re^3: The problem of documenting complex modules.(Summation.)
by BrowserUk (Patriarch) on Jul 08, 2015 at 08:31 UTC
    I skip the documentation and I look for "examples/" and "t/"ests as its code that actually supposed to run :)

    I'd have to need what that module did very, very badly before I'd try to piece together how to use its functionality from a few dozen or hundred ok()/nok() tests.

    Reminds me of another module I recently looked at:

    • The module pod tells you nothing; just points you at a readme file in a source code tree.
    • The readme contains:
      1. An advert.

        I'm already looking, why are you advertising to me?

      2. Some thankyous to the developers.

        If the author works with the devlopers; can't he thank them in person?

      3. Copyright and license information.

        Aren't they traditionally in files called COPYRIGHT and LICENCE?

      4. A link to a website.

        At last; I'm getting somewhere

      Buuuuuuut no.

    • The website, a triumph of pointlessly oversized graphics and fonts and worshiping at the alter of social media. conceals all the links behind oversized buttons and meaningless text such that you have to click randomly in the hope that you find something that is active.

      And when you get to what might be (very) loosely termed, "the documentation" you read:

      Software Developers

      See step 3 of the INSTALL notes for simple examples, and the `xxxx` command documentation for more information.

      Great! A whole website and I've got to go off, download a .tar.gz, unpack it, scrabble around inside to locate a text file called INSTALL; then scrabble around inside that for a subsection of it in order to find the documentation.

    This is how they want to encourage me to use their code? Could they have made working out what it is and how to use it more obscure? Perhaps they could have encrypted it all and posted a web treasure hunt to track down the decryption keys al la GCHQ."Starting from www.canyoufind.it.co.uk entrants must hunt down four codes hidden around the world-wide web."

    I should coco. I don't care if it is free code, my time is more valuable than that.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
    I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!

      Great! A whole website and I've got to go off, download a .tar.gz, unpack it, scrabble around inside to locate a text file called INSTALL; then scrabble around inside that for a subsection of it in order to find the documentation.

      This is how they want to encourage me to use their code? Could they have made working out what it is and how to use it more obscure? Perhaps they could have encrypted it all and posted a web treasure hunt to track down the decryption keys

      Yes, it can get worse: "Community driven documentation", also known as a wiki:

      Publish your code, cryptic, uncommented, undocumented. Have your users document it in a wiki. Release early, release often, just to make sure that the sparse information in the wiki is outdated just after it has been posted. Also make sure that the wiki only contains information about the current version, erase all information about older versions.

      And to drive users of your code really, really mad: use a forum instead of a wiki, because you don't know how to set up a wiki. Allow every troll, every spammer, every script kiddie to post nonsense. Disable the search function, "coz it killz ma serva". Use robots.txt to keep Google away, because "it killz ma serva, too".

      (I've not seen that for Perl modules, but for lots of other software.)

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

      One of the key things I think is that documentation is an opportunity for design. This is why I personally like to do documentation, then coding, then unit testing. But my unit tests are written to the docs, not the code.

      If a module doesn't document well, it may not be very useful in a general use case. It may be full of hidden or oblique assumptions, and the author might not have a clear idea why the module is designed the way it is in the first place.

        This is why I personally like to do documentation, then coding, then unit testing. But my unit tests are written to the docs, not the code.

        That is, or should be, a different set of docs. Design documents make lousy user documentation.

        Conversely, I like to start with the (or at least a) application that will use the library I'm going to write.

        I define the library interface in terms of the functions/methods that the application needs to fit its structure and use of the library. Those calls can then be mocked up to allow the application to be written and (functionally) tested. In a simplified form if necessary.

        Once the api is defined and shown to satisfy the requirements of the application; it becomes much simpler to write a library to fit that api. (And *just* that api.)

        The (simplified) application then also serves as both a test harness for the api; and as example code for user documentation.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
        I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-25 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found