At 09:22 AM 07/10/2001 -0600, Ken Scott wrote:
>
>But a wheel is just a wheel. Why not use the one that exists, and leave
>your mental energy and talent available to solve your real problem at
>hand?

I often ponder this subject, especially after reading c.l.p.m.

Without question, perl (or general programming) newbies need to learn and
adhere to certain established defacto standards, ESPECIALLY when dealing
with CGI. You wouldn't let your 4 year old child attempt a triple-bypass
operation on your own heart without spending at least a year in medical
school, after all :)

But in all my years of reading c.l.p.m., it seems like it's impossible to
/not/ get flamed or rebuked for trying to figure out the "internals" of
functions that existing perl modules implement. From a programming and
educational standpoint, I would think that it's a *good* thing to try and
implement your own routines, even if there's a perl module that already
does it in a simple and efficient manner. 

In all likelihood, you will end up writing something that breaks, or is
altogether completely redundant. But *attempting it* in the first place is
the cornerstone of good hacker ethic, IMHO, and can only help a person in
becoming a better overall programmer (with the proper guidance, of course).
 After all, SOMEONE has to write these "de facto" modules in the first
place!  

Of course, you would be a fool to implement "hand-rolled" routines (such as
CGI param parsing) in production code...I would never suggest that people
eschew the use of well-established modules when they exist. But, even
though I like to think that I am in-tune with the philosophy of Perl
culture, it just seems wierd to me that there is this cargo-cult type of
mentality that discourages Perl programmers from figuring out for
themselves the "magic" that happens behind the scenes. They are just told
to rely on such-and-such module, and leave it at that. 

While I am an adamant proponent of not re-inventing the wheel when you just
need to get the damn job done and out the door, if this mentality was
religiously adhered to by upcoming Perl programmers, I would think that it
would hinder thier potential for guru-hood, simply because they've learned
to just wait for miraculous .pm's to fall from the sky and onto their code,
instead of "DIY"'ing it. They would never learn about the ugly internals of
/anything/, and hence would probably never end up writing any modules that
would benefit the entire Perl community as a whole.

That being said, I /do/ think that on a list like this, which is
specifically geared towards perl novices, it does a great disservice to
show hand-rolled functions that are otherwise better left to existing perl
modules. All of my comments are with the understanding that a certain level
of experience with Perl and general programming has been achieved.
Beginners should be spending thier time perfecting the fundamentals of the
language itself before trying to re-invent wheels that have already been
invented....or patented for that matter (see
http://www.theage.com.au/news/state/2001/07/02/FFX0ADFPLOC.html )

just my unsolicited $.02. I would love to hear any comments or
disagreements about this, since I've been meaning to present this issue to
c.l.p.m for years, yet never got around to it :P

just another wannabe perl hacker on lunch break,
mel
____________________________________________________________
mel matsuoka                      Hawaiian Image Productions
Chief Executive Alphageek                (vox)1.808.531.5474
[EMAIL PROTECTED]                    (fax)1.808.526.4040
                     

Reply via email to