Dear Fellow Monks,

Before I start this, this is not intended to be a flamewar or for me to be immodest.

Recently I did a technical test in order to apply for a job. The technical test is run by an organisation which produces such tests, and so conducts a large number of tests. I scored better than 95% of all candidates who took the test (ever, not just for this role).

My problem is that this is for a *cough*PHP*cough* role.

I am aware that whilst I consider myself to be reasonably adept at Perl, I am not at that level. Should I permanently forsake Perl for where my abilities seem to lie?

Yours philosophically,
space_monk

If you spot any bugs in my solutions, it's because I've deliberately left them in as an exercise for the reader! :-)

Comment on Should I give up Perl?
Re: Should I give up Perl?
by LanX (Canon) on Jun 01, 2013 at 15:28 UTC
    This might sound arrogant, but do you think better than 95% of all PHP programmers is difficult?

    A friend of mine once said, from his many years of experience of his colleagues in a mixed environment : "There are no PHP programmers only PHP users".

    While this is for sure exaggerated, do you think in a PHP environment many would cherish your top 5% skills?

    And could it be that your Perl experience helped you reaching this 5%?

    To avoid misunderstandings, I'm not talking about language design, but surrounding culture.

    The situation is similar in JS, while I like the language, many self proclaimed experts are only web-designers cutting and pasting code.

    This is all based on my personal experience so far and might change in the future.

    No flame intended!

    Cheers Rolf

    ( addicted to the Perl Programming Language)

      Well I think PHP5 is a genuine OO language with features such as private and protected data, so used properly it is a reasonable programming language. Both Perl and PHP can be written well or poorly.

      Rather than Perl being a direct help, I think a CompSci/Maths degree and 20 years+ experience helps. Doing a lot of C and assembly language encourages economy of code. :-)

      If you spot any bugs in my solutions, it's because I've deliberately left them in as an exercise for the reader! :-)
        OK you convinced me, give up Perl! =)

        Cheers Rolf

        ( addicted to the Perl Programming Language)

        PHP has some nice OO features that I'd like to see in Perl, but also lacks some found in Perl - no multiple inheritance; traits are a very recent development and somewhat lacking compared to Moose's roles; overloading support is minimal (there's __toString, and the Iterable interface, but that's about it). I've personally always thought the introspection APIs, though quite comprehensive, are kinda clunky.

        PHP's OO is a very nicely designed part of PHP; arguably the only nicely designed part of PHP. ;-) If somebody were to take the basic syntax of PHP (minus <?php), and its OO system, but strip out all those gazillion globally namespaced functions, replacing them with a well-designed standard library of classes, that would be bloody lovely.

        package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
Re: Should I give up Perl?
by eyepopslikeamosquito (Canon) on Jun 01, 2013 at 20:31 UTC

    Let me get this straight. You are a:

    Consultant IT guy who sometimes codes in PERL, PHP, C, C++, BASIC, FORTRAN, COBOL
    who now, after twenty years experience, wants to give up using all these languages and become a PHP specialist because of a single PHP test result? Go for it! :)

    Seriously, I wouldn't let the test result influence your decision. For me, such a choice would depend on economic factors, and on how much I enjoyed PHP compared to the other languages.

    A few years back, I was astonished to find myself leading a PHP code golf competition despite being a complete PHP beginner! Rather than draw the conclusion that I was a "PHP natural" and should therefore "forsake Perl for where my abilities seem to lie", I concluded that the average PHP golfer was of a much lower standard than the average Perl, Python and Ruby golfer. Like LanX, I am not in awe of the technical abilities of the average PHP programmer. :)

      Well the OP was a bit of a 'tongue in cheek' question.

      I applied for the PHP role as a bit of a joke, but the test result and the 'economic factors' have meant taking it more seriously. The salary on offer is around £70K/$100K plus substantial bonus, pension and other benefits, which is exceptionally good for PHP role.

      If you spot any bugs in my solutions, it's because I've deliberately left them in as an exercise for the reader! :-)

        "'economic factors' have meant taking it more seriously."

        "First order of business, survival". Seriously though, in the turbulent times in which we live I know people who have had to change industry entirely, rather than substitute a one tool for another within the same (or similar) discipline. As you rightly state a poor worker can do a bad job regardless of the tool in use. Simply because you use one tool at a day job doesn't mean you have to give up the other as a hobby.

        Previously I've introduced perl in jobs where it wasn't used at all. Sensible employers/clients wont ignore a tool when you can prove it's advantages.

        "The salary on offer is around £70K/$100K plus substantial bonus, pension and other benefits, which is exceptionally good for PHP role."

        This a serious matter. Don't hesitate, some others dream of this - or even don't have any job.

        Regards, Karl

        «The Crux of the Biscuit is the Apostrophe»

Re: Should I give up Perl?
by shmem (Canon) on Jun 01, 2013 at 21:04 UTC
    Should I permanently forsake Perl for where my abilities seem to lie?

    If that's the only question that puzzles you - then of course not, but that isn't the decision you have to deal with, I guess.

    Your abilities don't lie in PHP coding - they lie in what enables you to pass such a test with the kind of success you are reporting. But that's but a subset of your abilities.

    In your situation I'd rather ask myself: Is that the kind of job I want to spend (part of) my lifetime in? Will I be happy cranking out PHP code? Is there enough nourishment for my hunger of knowledge and skill? Is the team ok, do I fit, do they fit my personality? And last but not least: can I adopt the business goals of the workshop?

    If you can answer all of the above positively - then go for it, why not give it a try. There are plenty opportunities for perl wizardry in a PHP shop, and you can carry on coding perl as a hobby. The Monastery won't cross you because you "changed sides". There's no such thing as sides in language wars here with us (at least that's what I know from the Monasterians which aren't wont to troll for bites).

Re: Should I give up Perl?
by tobyink (Abbot) on Jun 01, 2013 at 21:06 UTC

    I think exposure to multiple programming languages is very helpful. Some of the best and most popular modern Perl libraries are heavily inspired by other programming languages:

    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
Re: Should I give up Perl?
by Khen1950fx (Canon) on Jun 02, 2013 at 01:26 UTC
    It's not possible to give up on Perl. I tried to desist but failed:-).
Re: Should I give up Perl?
by sundialsvc4 (Monsignor) on Jun 02, 2013 at 01:39 UTC

    Why do you think that you have to “permanently forsake” one Tool, in order to take a gig that involves using a different Tool?

    Also, frankly, don’t attach the meaning or actual importance to those “tests,” that the companies who make and sell them might encourage you to do.   That makes about as much sense (to me) as giving a General Contractor a test on, say, Wrenches.   (Measuring, o’course, their ability to drive a nail with one.)

    The skills of a good programmer come only with Experience, and they are language-independent.   (If you don’t believe me, search YouTube for “toy piano,” and listen to/watch the first three entries or so.)   If you know what to do, you can do it with absolutely nothing ... for example, with PHP.   ;-) ;-) ;-)

    In the preliminary discussions leading up to most of the engagements I have won, there is usually an uncomfortable pause when the client says ... “well, we have some Perl code and some Python (DJango ...), and some PHP ... a little Java on the back-end.”   And I simply smile and say that this is to be expected, and that I/we have recently done production work in all of them and can provide code samples.   That is often what seals the deal ... yet I do consider it to be “perfectly normal,” i-f you have experience.   The “one-trick ponies” are the ones who, at their present state in their careers, have working-knowledge only of one; often, PHP.   They know the front-end but are lost in the back.   (Not maligning any of them, mind you, nor the PHP language save in-jest.   It does take time.)

Re: Should I give up Perl?
by vsespb (Hermit) on Jun 03, 2013 at 22:32 UTC

    Better than 95% of all PHP programmers is nothing special.

    I would not be surprised if person, who is a programmer, but who see PHP first time in his life, will be better than 70% of all PHP programmers.

    It's like server Uptime. 99.9% is nothing special

      How many times in this thread alone does this need to be restated?

      Frankly, the same can be said of most languages, and that's not the fault of the language. I would rather have the shingles than be forced to memorize all the CamelCased, underscore_cased, and runoncased identifiers in PHP. The extent of my defending PHP is limited to my belief that every language learned will teach a programmer new ways of looking at problems. But it's not like we Perl enthusiasts have found ourselves a language free from the long tail of dabblers and script-kiddies who drag down the average and make those who spend some time learning it well look good.

      The posts on just about any programming language or general programming forum; StackOverflow, PerlMonks, Usenet, etc., are largely a reflection of the 100 foot beast with a 95 foot tail.


      Dave

Re: Should I give up Perl?
by 5mi11er (Deacon) on Jun 04, 2013 at 12:37 UTC
    Saying things in another way:

    You have Perl among many others in your tool box. You would be as wise to throw away Perl as you would to throw your screwdriver away when you needed to go pound some nails for a while.

    Besides, whether you consider yourself a pro at Perl or not, you have this community to help you when you're stuck.

    -Scott

Re: Should I give up Perl?
by Voronich (Hermit) on Jun 04, 2013 at 13:44 UTC
    Bah. Use what you need when you need it. I still consider myself a C++ guy, though I haven't used it on a job in several years. Besides, "giving it up" doesn't really mean anything.
Re: Should I give up Perl?
by sundialsvc4 (Monsignor) on Jun 05, 2013 at 00:22 UTC

    “Wouldn’t it just be oh so nice if ...” in any actual, real-world I.T. shop, we could merely concern ourselves with just one “programming language in mission-critical service?”   Yeah, that would be a splendiferous simplification.

    PHP’s design is unquestionably deliberate:   it is a “kitchen-sink” language, with a very large number of built-in features that are, and that can only be, included into the system when the php executable is maked.   It’s not such an awful language, really ...   it just that, having to deal with it on-the-job for even a little while has certain side-effects ...   ;-)

Re: Should I give up Perl?
by coyocanid (Acolyte) on Jun 09, 2013 at 18:30 UTC

    I would have to say, it depends on what the job is.

    If it were something like "use php to design web tools that NASA hardware designers use to create new and better rovers", I would be all over that.

    It it is something like "Use PHP to generate marketing invoice receipts", I would be "Nah".

Re: Should I give up Perl?
by Preceptor (Chaplain) on Jun 10, 2013 at 20:54 UTC
    Programming techniques are very transferable - there's really only 3 programming languages: Functional, Object Oriented and Procedural.

    I currently use - and like - Perl. But I don't really see it as a question of being the only choice for programming. More that it's a suitable tool for most of the jobs I use it for.

    So by all means go an pick up the vocabulary of PHP, and go and learn it's idiosyncrasies. Just don't think of it as a 'different language' - good (and bad) programming habits are mostly language independent.

      there's really only 3 programming languages: Functional, Object Oriented and Procedural.

      I challenge you to fit Prolog or SQL into those categories.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
Re: Should I give up Perl?
by lee_crites (Sexton) on Jun 17, 2013 at 17:51 UTC

    Not a Chance!!!

    I work in both perl and PHP. I am working now at porting a PHP system back to perl (where a much earlier version was originally developed).

    What I have found, in my personal consulting work with organizations needing both perl and PHP folks, is that the perl folks can work in both environments fairly well, but the PHP folks don't seem as able to.

    My conclusion is that the skills / capabilities / capacities / whatever needed to be a skilled perl programmer are high enough that an above average perl programmer can easily be a significantly-above-average PHP programmer.

    Take session management. My PHP framework took session management for granted. It was just there and worked. For a perl programmer who had to develop a session management module, that felt like heaven. Ditto with things like sending emails.

    For a perl programmer to be able to handle those (relatively complex) issues, you either spend time programming it, or searching CPAN to find an already built solution.

    Some might see that as a "weakness" of perl, but the strengh that comes from this is just what is pointed out here: just a "normal" perl user here is a top-five-percent PHP programmer.

    I see perl programmers capable of looking at problems and finding multiple solutions -- and virtually everything we might see as a possibility is also part of the PHP language. So most perl programmers, IMNSHO, would be better than average PHP programmers. Yet most PHP programmers I have worked with seem to struggle to learn perl.

    I'm a perl programmer by choice -- which is why I am porting my PHP work back to perl. It is powerful enough to handle every task I have thrown at it. What else can you ask of a programming language?

    So my advice? Stick with perl; keep PHP in your back pocket. If someone needs those services, then coolness. Otherwise, keep up the good work!!!

    Lee Crites
    lee@critesclan.com