Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Is Perl a good career move?

by TrekNoid (Pilgrim)
on Jan 13, 2005 at 15:38 UTC ( [id://422001]=note: print w/replies, xml ) Need Help??


in reply to Is Perl a good career move?

> You can't move from Perl to .NET, VB, or really even C

While I'm not 100% certain I agree with *that* statement, I'll point out that moving from Perl to PHP is *very* easy.

You want an honest answer? After being in Computer Programming professionally since 1986 (meaning, I've been paid to write software since 1986, on one platform or another), I can honestly say that the *language* itself isn't what I look for in new hires... It's the ability to show that you're versatile that gets my attention.

Granted, I'm not going to hire someone to be an Oracle Developer who's never worked in Oracle... but at the same token, I've turned down several applicants for Oracle positions who have *years* of Oracle experience.

What I look for in someone to hire is someone who has a 'skill'... not someone who's 'taken a class and done a few programs'.

I would think you'd be more interesting to an employer looking for a Perl/PHP developer with three years real experience, rather than as a Java developer with a class and no real experience. Same thing is true the other direction.

Just like Perl, Java (in and of itself) isn't magical... It's what you've *done* with it that matters.

Look at it another way... Would you rather your resume be one of 200 Java resumes being sorted through, or one of 20 Perl resumes?

> If you knew a recent graduate, who knew a little Perl and
> a little Java, which career path would you suggest they
> take?

Whichever they can get hired to do right now... A 'recent graduate' needs experience more than anything else. Worry about picking a career path once you've had a chance to see what's going on.

If you're hoping to stay in this line of work for 20+ years, the best thing you can demonstrate is the ability to switch between languages with proficiency.

TrekNoid

Replies are listed 'Best First'.
Re^2: Is Perl a good career move?
by Juerd (Abbot) on Jan 13, 2005 at 20:31 UTC

    I'll point out that moving from Perl to PHP is *very* easy.

    Is it really? Perhaps you are right for simple web based stuff like a mail form, a simple database driven site or just templating. However, real programming isn't translated to PHP so easily.

    First of all, what are you going to do with namespaces? PHP still does not have namespaces.

    Then, what will you do with closures? PHP has no closures. Heck, it doesn't even have anonymous functions. That's another thing: how will you be rewriting that hash of coderefs? A hash of strings that are evaled at runtime?

    And what about all those objects that aren't simple hashes?

    But let's assume you didn't use any of these slightly more advanced programming techniques than the average PHP "programmer" can handle. But you did use modules. You do use modules, don't you?

    PHP is a web programming language, so it must have a good HTML parser ready, right? One is available, but it cannot be called good. It cannot even parse processing instructions like, ehm, <?php ...?> itself.

    Another common task in web programming is sending HTML mail with a few inline images. So what alternative for MIME::Lite do you have? The PHP-ish solution is to build the message manually. Good luck, and have fun.

    But at least it can open files over HTTP. Yes, that it can. But what do you do if you want more than that? What if you want to provide POST content, headers, or implement ETags? Then, you must use Curl, which isn't nearly as convenient as LWP. Don't even think about having something like WWW::Mechanize in PHP.

    Enough with the modules. I think I've proven my point that CPAN makes Perl strong. Now let's discuss the core. In fact, let's focus on something extremely elementary in programming: arrays!

    PHP's "arrays" are hashes. It does not have arrays in the sense that most languages have them. You can't just translate $foo[4] = 4; $foo[2] = 2; foreach $element (@foo) { print $element } to $foo[4] = 4; $foo[2] = 2; foreach ($foo as $element) { print $element }. The Perl version prints 24, PHP insists on 42. Yes, there is ksort(), but that isn't something you can guess. It requires very in-depth knowledge of PHP. And that's the one thing PHP's documentation tries to avoid :)

    Also, don't think $foo = bar() || $baz does the same in PHP. In PHP, you end up with true or false. So you must write it in two separate expressions.

    Exactly what makes you think and even say moving from Perl to PHP is easy? It's very, very hard to un-learn concise programming and go back to medieval programming times. And converting existing code is even harder.

    Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

      Exactly what makes you think and even say moving from Perl to PHP is easy? It's very, very hard to un-learn concise programming and go back to medieval programming times. And converting existing code is even harder.

      I wasn't speaking in the context of 'leave Perl behind and go to PHP'... I was speaking in the context the original poster was asking...

      Unlike a lot of folks here, I'm not a person that works with Perl every day... I don't write a *lot* of Perl a year... I write enough that I consider it my favorite language now, but I'm nowhere near Saint-worthy... As a result, my understanding of a lot of the things you mention is limited... and my basis for comparison of the two is viewed through the eyes of someone who isn't an expert in either language, but who found the syntax of the two so similar that he was able to do some PHP work after only a few hours, mostly because I had been working in Perl for 3 years.

      I know I said I'd been writing code for 19+ years, and that's true... The first 12 years of that were BBX (Business Basic Extended) and COBOL... PL/SQL for the last 7, and Perl during the last three... Should, I hope, explain my scope of understanding better.

      I'm not suggesting, in any way, that it's comparable in scope or maturity, because it isn't... I'm just asserting that it isn't that hard to pick up and work with, ie... countermanding the OP's speculation that somehow Java prepared you better to learn other languages, and Perl didn't.

      But I'll gladly concede your points to someone with more knowledge on the differences in the two languages...

      TrekNoid

      Your post has helped me so much. I'm a pretty slow learner so don't go along with the idea of learning serveral languages - especially when one of them - PHP - is a bastardised, inferior version of something I spent years learning - Perl. So many programmers use throw away comparisons betwen PHP and Perl as if their syntax is virtually the same but I've had terrible trouble having to use PHP for some web projects coming from a Perl background. PHP syntax makes me wince, compared with the elegance of Perl. Unlike you multi-linguistic programmers I HAVE to specialise in 1 server-side scripting language to get anywhere with it. I believe in sharpening a single tool rather than trying to be a master of all trades. Perl, with CPAN, is enough to occupy a lifetime anyway so I don't understand where all you multi-linguists find the time to be excellent in so many languages. Competent, maybe, but excellent, no.

      I've reached the point where I'm considering leaving all PHP work well alone because it's having a detrimental effect on my Perl skills. It just encourages so many bad habits.

      Hi Juerd,

      You make some excellent points about PHP, (and having spent much of the last 2 years as a PHP programmer, I agree with many of your points). In particular the namespace issue is a killer (although using OO techniques you can avoid the problem to a degree). You have also made some errors in your comments.

      >>> Heck, it doesn't even have anonymous functions.

      Yes it does.

      >>> That's another thing: how will you be rewriting that hash of coderefs? A hash of strings that are evaled at runtime?

      #!/usr/bin/php -q <?php error_reporting(E_ALL); $dispatch_table = array( # create some anonymous functions 'foo' => create_function('$a', 'return "foo got $a\n";'), 'bar' => create_function('$a', 'return "bar got $a\n";'), 'baz' => create_function('$a', 'return "baz got $a\n";') ); print $dispatch_table['foo']('hello'); print $dispatch_table['bar']('hi'); print $dispatch_table['baz']('yo'); ?> # outputs foo got hello bar got hi baz got yo

      >>> Also, don't think $foo = bar() || $baz does the same in PHP. In PHP, you end up with true or false. So you must write it in two separate expressions.

      $baz = "DEFAULT VALUE"; function bar(){return "Assigned value";} function quux(){return false;} $foo = bar() ? bar() : $baz; print "$foo\n"; $foo = quux() ? quux : $baz; print "$foo\n"; # outputs Assigned value DEFAULT VALUE

      I'm not sure if you could consider that as two separate expressions, but it seems a concise enough idiom for me.

      While PHP does not have closures, I have used static variables in functions to emulate some of the behaviours I have used closures for in Perl.

      Perl remains, by far, my language of choice, but I thought it would only be fair to point these things out

      cheers

      thinker

        Heck, it doesn't even have anonymous functions.
        Yes it does. (...) create_function.

        Functions created by create_functions are NAMED, not anonymous. In fact, create_function RETURNS the name.

        I'm not sure if you could consider that as two separate expressions, but it seems a concise enough idiom for me.

        I sure do. If in "bar() ? bar() : $foo", the bar function does something impure, like increase a counter, it does so twice, while with Perl's "bar() || $foo", it is done only once. Also, if bar() takes 10 seconds to finish, then "bar() ? bar() : $foo" will take at least 20.

        Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

      I think learning PHP as a PERL developer is very easy, but the other way around might be a little more daunting. My question is why should you want to switch from PERL to PHP. This is like saying that people who speak German should switch to English, just because it's easier to learn. As far as I'm concerned you are better of speaking German in Germany. What I'm trying to say is that sometimes programs need to be written in PERL and other times in PHP or ASP for that matter. Do not switch but increase your knowledge, it's always handy to know how to speak different languages. As for all the built-in PHP functions, it's enough to know that it's possible, you don't have to remember each one of these functions! I've been programming with PHP since version 3 and still sometimes I have to look up (thanks to inconsistent function names(I'll give you that)) in which order the function requires its parameters.

      Furthermore I'd like to point out that PERL and PHP are by no means interchangeable, so learn both. In practice you cannot build all your applications in your favourite scripting language, simply because different customers use different platforms and environments. Planning a career move in just one scripting language limits you to a handful of jobs. In the end you'll see that scripting languages differ very little from each other. Some are better equipped to do some chores, while others are better at other stuff. In the end they all work in more or less the same way.

      Let me point out that I love PERL and that I've also got a weakness for PHP, but this is basically because I'm an Open Source disciple. Let's not worry too much about the differences. It's possible to use both you know!

        It's not PERL. Perl is not an acronym.

        Re natural languages: there are things I can express in Esperanto, but not in Dutch. There are things I can express in Dutch, but not in English. I know these three languages fairly well. Funnily, it's exactly the other way around here: the easiest to learn language is also the most expressive one.

        It is possible to use both Perl and PHP, but it is not easy. Once your mind thinks in maps, greps, arrays, lexicals, closures, namespaces and short circuiting operators, PHP is a major pain in the ass. You can still get the job done, but it hurts mentally and IMO, not much is worth that. (Note: do not read that as "that is not worth much")

        Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://422001]
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: (6)
As of 2024-04-23 23:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found