The ants are my friends,
They're blowing in the wind.
    - Bob Dylan


Sometimes with programming, it is hard to see the cargo from the cult. With book learning, you are often encouraged to learn by example, where hopefully the examples are good. Though, over time, you tend to forget why you do certain things, but are reluctant to stop doing them.

Initially I found using objects in Perl 5 scary, because early on, the examples were quite lengthy and convoluted, with little explanation provided as to why so much code was required. Sure, I knew objects, from C++ and even OO-Pascal, but it took 20-30 lines to "bless" an object in the early examples.

So, to make objects, you just had to do what the example said, and hope for the best. Only after much experimentation did I figure out the basic requirements, less all the "extra" material that was functionally useless in the vast majority of cases. Why @EXPORT and a BEGIN{} block were ever used in an OO-example continues to remain a mystery.

Also, what is today quite necessary may tomorrow seem like cargo cult programming. For example, if you need to go out of your way to work around a limitation of the language, after time you may do this subconciously, not even realizing that you do it. Maybe you will be fortunate enough to notice, perhaps when reviewing someone else's code which does it more elegantly, or when someone points it out to you.

Perl seems to be an anomaly among programming languages, as with each release, it seems to take less code to achieve the same task. In a world where programming effort and programming error are proportional to that, this is a Good Thing.

In reply to Re: There is more cargo where that cult came from! by tadman
in thread There is more cargo where that cult came from! by hsmyers

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.