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

Re: Reliable software OR Is CPAN the sacred cow

by shmem (Chancellor)
on Sep 15, 2006 at 18:58 UTC ( #573227=note: print w/replies, xml ) Need Help??


in reply to Reliable software: SOLVED (was: Reliable software OR Is CPAN the sacred cow)

Dear powerman,

almost all has been said so far in response to your valuable posting, but one point is missing.

print "Howdy, world!\n";

is one reason why people code in perl, which is really two, as expressed elsewhere:

  • you can babble in perl, drawl, jargonize, extemporize, speak volumes, drone, singsong, ad-lib, or eloquently express yourself with mastery; and
  • as the saying goes, "perl is the language to get your job done before your boss fires you." Corollary: "you do a good job as long as it's worth doing it well" (something like this is in the first Camel Book).
Your way of speaking seems like trying to lay down the law.

Another reason for coding perl is aptly demonstrated by

$=[!print$=]=!map{$==$=[$#z]+=$=[@z]/@z,($=[@z]%=1+$#z--).=0}@z=@=for@ +==(1)x pop
which snippet calculates the Euler constant (1st argument is number of digits - credit is due to a wizard on the #perlgolf irc channel (not me :-)).

Another way goes like this:

use HTTP::Cache::Transparent (); use LWP::Simple qw(get); use Compress::Zlib (); HTTP::Cache::Transparent::init({BasePath => "/tmp/http-cache-transpare +nt-$>"}); my $gzipped = get "http://www.perl.com/CPAN/misc/lwall-quotes.txt.gz"; my $quotes = Compress::Zlib::memGunzip($gzipped); my @quotes = split /\n%%\n/, $quotes; print $quotes[rand @quotes], "\n";

Yet another splendid way of writing perl are the gems Erudil has posted.

A flavour of perl coding which I particularly like and greatly admire is Lingua::Romana::Perligata --

#! /usr/local/bin/perl -w use Lingua::Romana::Perligata; adnota Illud Cribrum Eratothenis maximum tum val inquementum tum biguttam tum stadium egresso scribe. vestibulo perlegementum da meo maximo . maximum tum novumversum egresso scribe. da II tum maximum conscribementa meis listis. dum damentum nexto listis decapitamentum fac sic lista sic hoc tum nextum recidementum cis vannementa da listis. + next tum biguttam tum stadium tum nextum tum novumversum scribe egresso. cis

With these examples I'm trying to mark (some) cornerstones of what perl is, and all of these are good uses of perl and splendid ways to make life interesting.

Ah, and don't let us forget the Acme namespace - that's all more Monty Python than any so-called python (scnr).

<update why="the point">
None of these coding examples are in any way meant to be reliable in other sense than "if it ain't broke, don't fix it".
</update>

I've upvoted your post, partly because it does adress a valid concern, partly because it rouses a good discussion, and partly because it's good if from time to time a pilgrim comes back to the monastery to shout

YOU ARE ALL SINNERS! REPENT!
at the fellow monks sitting at the table. I hope you'll not loose your harsh tone and your engagement in the quest (feel free to set up the perlgems.org domain - it's untaken at the moment - to publish the Carat weight of CPAN modules you come across :-), but don't go down the wrong way, don't end up like Jorge of Burgos who died poisoned by his own wrath.

Anyways - if you want really reliable code - you probably shouldn't use perl at all. Perl comes with all the ambiguities natural languages have. You should take the right tool for that, C perhaps, or assembler, and scrutinize the libraries your code uses, the underlying OS and the chips that OS runs on.

Last thing - CPAN isn't a holy cow at all. It's more aptly described as an ecosystem - there are so many interdependencies of modules, which reliably infest each others with parasites, pollution, bugs and even sudden death, cot death... there's no way to stand that but with the firm belief in your own open eyes, skill, and the good intent of your fellow coders.

Your good intent is highly welcome .

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Replies are listed 'Best First'.
Re^2: Reliable software OR Is CPAN the sacred cow
by bibliophile (Prior) on Sep 17, 2006 at 14:51 UTC
    Actually, I'd say that CPAN *is* a Holy Cow...

    As in, "Holy Cow! Look at all that code!"
    Or "Holy Cow! I didn't think of doing it *that* way!"
    Or "Holy Cow! I can actually talk to the person that wrote this!"

    As many have pointed out (and I'm paraphrasing), CPAN isn't some faceless corporation where you are only a consumer of product... CPAN is *real people*.

    And that's a good thing.

    -- WARNING: You are logged into reality as root.
      It's people. CPAN is made out of people. They're making our code out of people. Next thing they'll be breeding us like cattle for code. You've gotta tell them. You've gotta tell them! CPAN is people!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (1)
As of 2022-08-16 01:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?