I was just noting the comments to "CSV File Question" when this hit me...

Sometimes I think that a technically competant sociologist or psychologist (yes, they're very different, I know that - they'd come up with different conclusions) could have an absolute field day studying Perl developers. On one hand, we have these wonderfully elaborate general solutions (e.g., Text::CSV, ... DBI, CGI, and most other CPAN modules) which can elegantly (and sometimes quickly) handle anything thrown at them in a broad development domain.

On the other hand, we see people who don't think twice about solving an exact problem with no thought about changing inputs, assuming a very, very narrow domain. Please don't vote this down because you think I'm flaming here - I'm not. This can be a very valid one-off solution when you only need to do a one-time conversion of data - I've written a reasonable share of these tools myself, and many of them were exactly the right solution for the cheapest possible cost in the currency of time.

On the third hand, we get Perl golfers. Though I've never been good at this type of challenge, this isn't a flame either - it's quite fascinating what some people can do given way too much time on their hands :-)

I really think that both sociologists and psychologists could have an absolute field day trying to explain all ends of the spectrum, and everything in between.

Replies are listed 'Best First'.
Re: "people watching"
by BrowserUk (Patriarch) on Jan 13, 2005 at 03:00 UTC

    I think that the variety of solutions offered to any given question is one of the things that makes this place so valuable.

    If you need the quick fix, someone will usually provide it.

    If you need the long-term, architected solution, you'll usually get that too.

    Only the OP can ever really know what their requirement is, or make a decision about which is applicable to them.

    If you read all the replies, you'll usually get a good cross section of possible approached, along with the caveats and benefits.

    And there is a golfed-down, or one-liner there too, it may cause you to look closely and work out how it works. Even though you may not use it for that particular problem, something in it may be the trigger to solving some other problem in the future.


    Examine what is said, not who speaks.
    Silence betokens consent.
    Love the truth but pardon error.
Re: "people watching"
by davido (Cardinal) on Jan 13, 2005 at 06:10 UTC

    I learn when I read the responses that give various approaches. Part of what I learn is the pros and cons of such approaches, and part is simply learning the thought process behind solutions that I might not even have considered. An 'outlandish' solution might not be all that useful to the immediate question, but it may provide me with a tool that is useful in some other situation. ...that's what I get out of reading a broad range of solutions.

    Then there's the flip side; writing solutions. I may know full well that the most simple and/or efficient solution has already been provided. And yet I may work my way through a completely different solution; one that might be seen as pretty "out there". But the practice of doing this becomes a learning process for me too. ...an opportunity to explore some new dusty hallway of Perlish potential. And I'll often post such findings, because just as discovering the outlandish solution has helped me learn a new trick, it may help someone else too.

    At first I thought that people were putting out there the more creative solutions as a way of one-upping everyone else... showing off. But I've since seen the light. These "Other Ways to Do It" aren't just opportunities to show off, they're often much more than that. Often, they are public explorations into new ways of thinking about a problem. That may be more than a novice Seeker of Perl Wisdom is looking for, but it's part of the fun that the more advanced users stick around for.


    Dave

Re: "people watching"
by Anonymous Monk on Jan 13, 2005 at 07:11 UTC
    On the third hand,

    You should see a doctor ... :-P

         o
     1  /|\  2
         |
        / \
    3?
    
      A third hand. mmh. So he must have a second an extra head too.

        That's not an extra head. It's my pet parrot. In a bird cage. And it's covered because, um, he's sleeping. Yeah. <changing topics> Can I introduce you to my girlfriend, Trillian?

Re: "people watching"
by Anonymous Monk on Jan 13, 2005 at 17:16 UTC
    If only I had the time!

    I think a lot of it has to do with the extreme flexibility of perl. Where Java pretty much forces you down the 'design first' route, and C/C++ takes days before you get it to do anything (OK, that might just be me :-|), perl allows everything from a pre-designed, structured solution worthy of shrinkwrapping to a quick bodge to solve the problem, in the same language. Full on software engineers, code monkeys and occasional scripters can all use the same language.
    Plus of course the huge quantity of code freely available to solve any given problem
    Both these things draw in lots of people with different priorities and needs from the language, and hence different ways of approaching a given problem.

    charles.

      I agree with you about Perl, and I think it takes this idea to a much further extent than other languages I've used, but I can't really agree with your assessment of Java (or C, but I'm much less experienced with C). Java may have more structure and stricture than Perl, but it's not exactly writing in stone tablets. In fact, there is enough room for movement that I never felt hindered by the language to the point where I proclaimed, "Ye Gods! I wish I was using Perl instead of this crap!" Of course, I'd often quietly think, "This would be much easier in Perl," but it was not strong enough to cause me much distress.

        OK, fair enough, I was indulging in a bit of hyperbole about Java (and C/C++ - a competent programmer can knock out code very quickly, but I can't). Having had overnight to think about it (I really ought to get a life), the point is better made as:

        The sainted Larry designed perl along the lines of a natural language (see 'Perl as natural language' on the wall shrine). Just like a natural language, someone with a limited command of perl can still make themselves understood. Like a child saying 'want biscuit', rather than 'would you mind passing me a biscuit?'.

        This makes perl incredibly easy and naturalistic to learn, and much less discouraging than spending weeks writing variants on 'hello world' - you can get on and do something useful (make yourself understood) almost straight away.

        As you progress with perl you learn new techniques, tricks, shortcuts etc, just like gradually learning the structure (and slang) of a spoken language.

        So non-programmers can learn perl easily as a quick and useful tool, while programmers can write full blown applications using the same language. I don't think thats ever been seen in a programming language before, and that may be a reason for some of the variety in the perl community.

        This is a great thing because it makes perl (or something similarly designed) the ideal choice as a language for an ever increasingly computer literate society - you can learn as little or as much as you need.

        charles.