Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Re: Re: Directory Recursion Disorder

by Anonymous Monk
on Jun 24, 2003 at 04:01 UTC ( [id://268384]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Directory Recursion Disorder
in thread Directory Recursion Disorder

This is hardly an efficient use of your time.

That depends, I don't learn as much using a module :)

It also introduces lots of extra code that has to be audited and maintained. The execution time is a very minor concern. Your points are all valid, they're just not my approach.

Thanks for the reply :)

  • Comment on Re: Re: Re: Re: Directory Recursion Disorder

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Directory Recursion Disorder
by demerphq (Chancellor) on Jun 24, 2003 at 19:01 UTC

    That depends, I don't learn as much using a module :)

    Yes you do. You learn what wheels already exist and how to use them. This is useful when you have to do something quickly, when you need to do something correctly the first time (or with minimal hassle) or even possibly to get yourself a job. A potential employer for a Perl job would hardly be encouraged to hear that you were perfectly capable of writing a directory traversal (on your say so), but could not off the top of your head write an elementary File::Find statement (which they just might test you on.)

    If you really want to learn then read the source code of the module in question. You will learn far more about directory traversal by reading the source code of File::Find than you ever will learn writing your own from scratch. Being part of the standard distro the code must run on every OS that perl runs on, this means it will be written to handle all sorts of cases that you are unlikely to know of.

    Now don't get me wrong. Reinventing wheels can be an extremely educational process. But doing it without a thorough understanding of the existing wheel (and frankly in this context a wheel is not a great example IMO :-) doesn't make a lot of sense.

    It also introduces lots of extra code that has to be audited and maintained.

    Every single module involved is part of the standard distro. If you are worried about auditing and maintaining these modules modules then you should be equivelently worried about Perl itself. If these modules have issues then they will be fixed by the P5P team. For me I would be far far more worried about my handrolled creation going subtly wrong than anything that comes with the standard distro.

    Anyway, just my $0.02


    ---
    demerphq

    <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...
      Every single module involved is part of the standard distro.

      Well, paint me green and call me a python hacker - amidst all this reinventing talk I completely forgot that. It even appears to be standard in 5.0004 (or whatever that silly version number I keep confusing is). This should tilt the equation in its favour, but I'll probably write it the other way too, just for fun ;-).

      Thanks for the advice.

        but I'll probably write it the other way too, just for fun ;-).

        Damn straight. :-) Just dont do it thinking that you are learning more one way than the other. Do it for fun and glory instead! Yehaw!


        ---
        demerphq

        <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-23 21:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found