Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Help in manipulating values from two arrays

by zerogeek (Monk)
on Mar 24, 2007 at 21:39 UTC ( [id://606435]=note: print w/replies, xml ) Need Help??


in reply to Re: Help in manipulating values from two arrays
in thread Help in manipulating values from two arrays

I, for one, often like to find the solutions that don't involve modules. As a fairly new coder, I am not confident in their use. Additionally, I think that many of the solutions that can be solved without the use of a module are enhancing my understanding of how perl works.

On the other hand, learning something about modules is helpful as well... and helping everyone learn is what this site is supposed to be about.

  • Comment on Re^2: Help in manipulating values from two arrays

Replies are listed 'Best First'.
Re^3: Help in manipulating values from two arrays
by GrandFather (Saint) on Mar 24, 2007 at 21:57 UTC

    All problems that can be solved using a module (written by someone else) can be solved without using the module. It's just that you may end up rewriting the module! Redoing hundred or thousands of hours of work may be a good way of learning, but it doesn't get the task at hand achieved in a timely fashion.

    Of course if you really want to learn stuff try solving the same problems in assembly language or Ook! - you'll learn all sorts of stuff about frustration and low productivity, but those are probably not the things you want to learn.

    One of the important lessons to learn here is that there are a lot of very clever people writing modules for Perl and making them freely available. Using those modules can save you a lot of time. Peeking at the internals of those modules can teach you a lot about coding techniques. Using modules you can win both ways - learning and saving time.


    DWIM is Perl's answer to Gödel
      Grandfather-
      I didn't mean to be disrespectful in any way. I was only trying to point out how my brain is trying to work out the problems. I have trouble understanding how to use the modules.

      With that in mind, after reading your response, I learned a bit about them. I am going to take a look at some of the code that I have that uses modules and try to look into the module itself. That just might be the ticket!

      Thanks for your response :)

Re^3: Help in manipulating values from two arrays
by chromatic (Archbishop) on Mar 25, 2007 at 06:07 UTC
    I, for one, often like to find the solutions that don't involve modules. As a fairly new coder, I am not confident in their use.

    That attitude can be a little bit dangerous. If you have a chance, skim the XML 1.0 specification. I'm certainly not going to hand-roll code to parse XML in a couple of hours, and I'm a fairly experienced coder.

    You're a lot better off spending your learning time figuring out how to take advantage of work other people have already done. This particular case is awfully complex.

      WOAH!
      Great example, but that seems a bit out of the scope of the OP I think. What he was looking to do (and really, much of what those of us new to Perl are trying to do) didn't look to be too hard without the module.

      I understand that modules certainly have their place. No doubt in my mind, but isn't it also fair (when doing something like this that is fairly simple) to try and figure it out on one's own? I think there is just as much learning value in that and was only trying to make that point in my OP.

      Of course, I'm just sitting down to read through Learning Perl for the 2nd time and in no way consider myself a programmer. Anyhow, this is starting to get way OT from the OP and for that I apologize.

        What he was looking to do (and really, much of what those of us new to Perl are trying to do) didn't look to be too hard without the module.

        If you were soliciting estimates to build a house, would you trust the estimate of someone who's never built a house before over the estimate of someone with ten years of experience?

        I understand that modules certainly have their place. No doubt in my mind, but isn't it also fair (when doing something like this that is fairly simple) to try and figure it out on one's own?

        That depends on a lot of factors. If you want to solve a simple problem, is it better to learn how to solve that problem, or how your operating system works, how a programming language works, the ins and outs of the XML specification, and everything that other people have already built for you?

        It's definitely good to know all those other things and it's important to learn them, but is it really the best use of your time to rebuild and discover everything when you have the least amount of experience and knowledge and, likely, the greatest practical desire just to get something working?

        Take the lesson of Matt's Script Archive; the programs there exhibit absolutely the least amount of knowledge necessary to build their own components, and they've lead to countless security holes. I've never met a beginning programmer who studied RFCs and specifications in detail before starting to code an already-solved problem, and I never expect to. (More often, I find that people who say "I learn better coding it myself!" severely resist learning, especially from the experience of others. I don't mean to imply that you're in this group, but merely that this group exists.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-04-23 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found