In two recent nodes, Re: CGI Design and Re: Pulling info out of html pages, I went ahead and posted code snippets (plaintext) to demonstrate ways that one might accomplish a particular problem. Others posted code snippets and some point to the relevant modules or documentation (pointers). This begs the question, "what's the best way to help people?" (pedagogy).

By posting pointers, we help people help themselves. They learn not only how to read the docs, but how to find the docs. By posting the plaintext, "here's how to actually do it", I might be taking that away from people, but I suspect that they're more likely to actually use what is there as opposed to a quick hack that they come up with. I think the classic example is showing people how they can strip out their ugly CGI parsing routine and use something simple like %formdata = Vars().

When I first started learning Perl, people would point me to modules with large amounts of documentation and I would find myself overwhelmed and resorting to hacks. By holding my hand, however, and showing me real live code that demonstrates how a module can solve the problem I have right now as opposed to solving a general class of problems, I find myself more willing to dive into that particular module.

One problem with the CLPM newgroup is that newcomers to the language are often flamed for not reading the docs and I suspect they run away wondering "where's this friendly community I heard about?" That's certainly a rough way to introduce people to the language we all know and love.

While I realize that different people have different ways of learning and some might prefer pointers to docs rather than the actual code, I suspect that the reverse is true. But am I doing them a disservice? If they blindly use my code snippets without understanding, this is a bad thing. However, even if they do blindly use them, at least they're using tried and true modules (hopefully) rather than some home-grown hack. Later, when they need to apply the module to a similar problem, I suspect that it will be less daunting to them.

Other opinions?

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.


In reply to Pedagogy: pointers or plaintext posts by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.