http://qs321.pair.com?node_id=386315


in reply to Re: Looking for examples of well-written modules
in thread Looking for examples of well-written modules

This is a very difficult request, because of TIMTOWTDI one mans well written code is another mans crap. Personally ...

I agree, and I think that regularly reading and thinking about the code/text of a wide variety of authors will improve your command of any language.

An interesting approach might be to take a few example modules with which you are not familiar, throw away the author's documentation (the pod that is, not the comments), and then try to write the documentation for the module based on the code and any comments.

Doing this you could hope to learn a lot both about good and bad code style and about good and bad documentation style; maybe also a bit about what aspects of a module should or shouldn't be documented. If you're doing it right I'd expect you also to spot some bugs in the process, which will give you a good opportunity to pay some tuition fees in the form of bug reports and patches. :)

Hugo

  • Comment on Re^2: Looking for examples of well-written modules

Replies are listed 'Best First'.
Re^3: Looking for examples of well-written modules
by stvn (Monsignor) on Aug 28, 2004 at 02:24 UTC
    An interesting approach might be to take a few example modules with which you are not familiar, throw away the author's documentation (the pod that is, not the comments), and then try to write the documentation for the module based on the code and any comments.

    Interesting idea, a little on the insane side, but nice idea. You might even want to just find a module with little or bad documentation, and email the author to see if you can re-write it for them.

    Another good way to get to know a module is to work on it's test suite. The Phalanax project is a great place to do this. I spent a week or so a little while ago working on modernizing the DBI test suite, and in the process learned a lot about how that module is architected.

    -stvn