Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Why so much hate?

by Carfax (Acolyte)
on Aug 06, 2013 at 18:00 UTC ( #1048154=perlmeditation: print w/ replies, xml ) Need Help??

Honorable Monks,

I'm a final year Uni student with the basic programming experience that you'd expect from a Science student. Much theory, little experience. However, knowing that i'd soon have that safety net(no pun intended) ripped away from my head, i set out to get a little outside programming. i have a devastating weakness for books. If i have to learn something practical, i read about it first(No two ways about that) before engaging in it, and it was a book that led me to Perl. An awesome demonstration of Regular Expressions that left me awed for hours. And so i struck out

To be quite honest, it's been hell so far. A few months of hell. Not the sytanx itself, because i found concepts related to languages, im a bit more comfortable with.(i.e Bash, Python, Php). I did a quick search of good Perl books, and then picked Learning Perl 6th, Programming Perl 4th and Intermediate Perl 2nd at once.(like i said, weakness for books). While doing that, i came across several destructive reviews of the Perl programming language itself. It's been described as a "Filthy language" "Dangerous for beginners" and basically, the downfall of many a programmer. You would come across jokes that haven't been used on even COBOL for ages. It's agreed there's a little language rivalry from time to time, but with Perl, it's crossed the boundaries of extreme. Right now, i just want to know, if there's anything i'm missing?

Secondly, I've done a little research as well, and found out, most of the things in the books, i've picked up are not recommended for newbies as well. And to be honest, everything in learning Perl 6th Ed works for me, but my question to the Glorious Monks, though the book is based on Perl 5.14, apparently it doesn't meet the "Morden Perl" criteria. I honestly don't mind unlearning everything and starting from scratch again, i just want to be on the right Path. So what are your recommendations?

Comment on Why so much hate?
Re: Why so much hate?
by chromatic (Archbishop) on Aug 06, 2013 at 18:16 UTC
    Right now, i just want to know, if there's anything i'm missing?

    Perl grew out of Unix scripting for system administration. If there's anything quicker and dirtier than scripting for system administration, I've never seen it.

    Perl gained popularity in the CGI programming days of the early web. If there's anything quicker and dirtier than people copying and pasting and modifying code they barely understand to get something done fast and cheap, it's Unix scripting for system administration.

    Perl has its flaws as a language, but keep in mind that it's designed to let people who don't know much about programming get their jobs done with as little ceremony or fuss or fussiness as possible. This lets people make huge messes, but it also lets people get their jobs done.

    A lot of people used Perl this way. A lot of people encountered Perl written this way. Rather than realize what a benefit it is that non-programmers could actually program something productive, they blame the language for the messes created by people who didn't know what they were doing. Thus Perl, with its warts, gets a reputation for being unusable and cryptic in some sort of zoological sense.

    It's funny; JavaScript is a language in a similar situation, but it gets a lot more love because it's the only game in its niche. I find its flaws worse than Perl's (terrible scoping, lack of a usable module system, poor type system, awful built in aggregate variables), but who knows.

    And to be honest, everything in learning Perl 6th Ed works for me...

    I wrote (curated?) Modern Perl, and if Learning Perl 6e is working for you, stick with it. It's a gentler introduction to programming, which I like quite a bit for people in your situation, even if it doesn't cover the same subjects Modern Perl covers the way I wanted to cover them. Besides, you can read the free edition of Modern Perl after you finish and get the best of both worlds.

      It's a gentler introduction to programming, which I like quite a bit for people in your situation, even if it doesn't cover the same subjects Modern Perl covers the way I wanted to cover them.

      Thanks for the reply sir/lady. I understand being an author yourself, may cause you to select your words carefully, but what i really need here, is not pampering. I really don't need to plunge my head into flames, just because there might be relief nearby. What i actually need is honesty. What i'm asking for is a point in the right direction. Like i said earlier, i don't mind picking up good books at all, what i'd hate is too go in too deep for me to be able to unlearn some habits.

      And hence the quote

      Learn all you can from the mistakes of others. You won't have time to make them all yourself. -Alfred Sheinwold

        Modern Perl assumes you're already decent at programming, so it elides some basic stuff in favor of explaining how Perl works from philosophy to programming in the large. Learning Perl assumes you've never programmed before, so it spends more time on the basics, covers less of the language, and doesn't explore the philosophy of Perl in as much detail.

        I'm noticing that your question about being on the right path isn't directly being addressed.

        Yes, you're on the right track. First, you'll need to actively ignore the detractors. Nearly all of them are misinformed and just passing on misinformation. Then, you'll need to stick out learning the easy stuff, and gradually picking up the more advanced stuff.

        Becoming a good or perhaps great perl coder is a journey. Nearly 20 years ago, I started on that journey, part of what has kept me coming back here has been because I am still learning things. This isn't meant to be a deterrent, or warning that it's that hard to learn, it's not, it's just that deep a subject.

        So, if you're looking to be able to help yourself do something while on "the job", Perl is very likely to become more useful to you with less work than most other languages out there. Why perl now has such a bad reputation is beyond me.

        -Scott

      I nominate this post for the sign on the front of the Monastery gate(s)!

      Eloquent, and concise, I couldn't have imagined a more accurate summary.

      +'s to you, chromatic. Thanks for taking the time to create this post.

      --Chris

      #!/usr/bin/perl -Tw
      use Perl::Always or die;
      my $perl_version = (5.12.5);
      print $perl_version;
Re: Why so much hate?
by ww (Bishop) on Aug 06, 2013 at 18:27 UTC

    "Why so much hate?"

    Some people are negative, period. Some think uttering negative remarks somehow marks them as a cut above the ordinary. And some just don't know any better.

    "...most of the things in the books, i've picked up are not recommended for newbies...."

    Who sez?

    I find it hard to believe that "most ... are not recommended" comes from any of the authors of the books you cite or from any other programmer really familiar with Perl and its capabilities (caveat: some consider Modern Perl controversial). Sure, it's fair to point out that none of those books covers every possible obscure gotcha' that might trip up a newcomer but to characterize "Learning Perl" -- a primer -- as "not recommended for newbies" is hopeless hokum.

    If I've misconstrued your question or the logic needed to answer it, I offer my apologies to all those electrons which were inconvenienced by the creation of this post.
Re: Why so much hate?
by davido (Archbishop) on Aug 06, 2013 at 18:30 UTC

    Here's an excerpt from Bjarne Stroustrup; someone who has made a career of developing, using, teaching, and defending a language that is possibly more used, and more hated than Perl, while being at least as useful in its own domains. (stroustrup.com):

    "C++ sucks"

    • If you think so, go use what you consider better. It may indeed be better than C++ for your purposes.
    • C++ is a very useful language that is used successfully by MANY people in MANY application areas. I guess that is a large part of what bothers some. By being successful, C++ offends many who have strong notions of what else ought to be successful.
    • The major cause of complaints is C++ undoubted success. As someone remarked: There are only two kinds of programming languages: those people always bitch about and those nobody uses.
    • C++ isn't perfect. That is well known and acknowledged from the start. It is, however, a reasonably carefully thought-out language where the design is based part on acknowledged principles and part on solid experience and feedback from actual use. See my book The Design and Evolution of C++ for an exposition of the aims of C++, the design process that led to the current language, the reasons for particular design decisions, etc.
    • I wish I had an electronic equivalent to a little duck-horn, so that a rude BEEP was triggered by every unsupported derogative statement about C++. The noise would be deafening, though. An increasing number of people seem to relish displaying their ignorance and poor manners by snide remarks and gratuitous inaccuracies.
    • At a recent conference, a speaker asked for a show of hands and found that twice as many people claimed to hate C++ as had ever written even a single small C++ program. The only word for such behavior is bigotry. In dealing with the current wave of C++ bashing, we should remember that bigotry is bred by ignorance and fear.
    • It should also be remembered that if bigotry is not opposed but allowed to fester and sow distrust real harm results.

    One could substitute Perl for C++ in every one of those bullet points, and it would be equally applicable. COBOL was useful in its era, in its domain as a business language, though it probably was applied to problems that were too big for the facilities it provided for large-scale applications. Poorly written <<any language, including Perl>> also doesn't scale well for large-scale applications.

    Perl, unlike COBOL, does scale reasonably well. And like C++, it's intimidating at first, and the deeper one digs, the more one finds to be intimidated about. But also like C++, (probably even more-so) with Perl a "baby subset" of the language can be useful to newcomers, and it's possible to become productive without mastering all the dark corners.

    If you're looking for some "what's next" books: Modern Perl (chromatic), and Higher Order Perl (Mark Jason Dominus) might be good reads. Also, even though it's a few years older than the current state-of-the-art, Mastering Regular Expressions, 3rd Edition. Modern Perl and Higher Order Perl are each available legally for free.

    Update: Instead of focusing on what others (possibly who haven't really given it a chance) say, focus on those things people who use Perl enjoy about the language; its expressive, powerful syntax; its DWIMery; and probably most of all, the CPAN. Perl is, after all, the syntax one must use as the price of admission to all the code available on CPAN.


    Dave

      Re COBOL: back in the day, I worked with some really huge COBOL applications, probably bigger than you've ever seen. Whatever else you might say about it, you can't say it didn't scale. Matter of fact, any language that provides includes and separate compilation / modules scales just fine. The rest is sugar.

        The main limitation to scale for COBOL (in its original incarnations rather than the bastardized form that the likes of MicroFocus sell), was the single dataspace.

        Whilst it can be managed, it requires great oversight and careful management;both of which are anathemas to program evolution and change; and almost totally preclude modern development (RAD) techniques.


        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.
      There are only two kinds of programming languages: those people always bitch about and those nobody uses.

      Perl6 somehow managed to be in both categories.

Re: Why so much hate?
by Your Mother (Canon) on Aug 06, 2013 at 18:39 UTC

    Itís actually pretty simple ultimately.

    Perl is extremely expressive, meaning TIMTOWTDI but really beyond what most languages afford.

    Perl, at its most basic usage, is extremely easy. I wrote my first production script at Amazon.com after two weeks head down in the Llama. Perl is, at its deepest, quite wide and a bit magical.

    Perlís system level facilities got it a place in all *nix systems quickly so it was de facto popular.

    Most persons be they developers, politicians, teachers, drivers, doctors, or whatever are not very good at what they do. Itís a USA-ism but a C is a passing or average grade. A C equates to 70% correct or as the half-empty would say, 30% wrong.

    So you get the intersection of a widely available language in bloom at the jump of the interwebs that is simple to wield but difficult to master catering to the most dissonant problem solving a less competent even than average user base can generate. On top of that: haters gonna hate. Having beams in your eyes makes you a mote-seeking cranky pants.

    For my part, nothing but love for Perl. I think itís a great language for a serious beginner; discipline is most of what makes Perl not PHP in a code base.

Re: Why so much hate?
by Preceptor (Chaplain) on Aug 06, 2013 at 20:40 UTC

    Like so many others, I learned Perl when shell scripting didn't quite cut it any more. By the time I found myself doing cuts, awks, temp files, merges and for loops, making some disgustingly hackery shell stuff... one day I needed to do an array transformation, and found Perl and fell in love.

    Over my journey, I have found - and written - some utterly disgusting hackery. Perl is very good at it, which is part of why it gets a bad reputation. Have a look at some of the Perl obfuscated programming for example - at first glance, you might be hard pressed figuring out why this is genius and not junk.

    Perl lets you get away with 'just get on with it' coding. It's good for that, because it doesn't punish you with inscrutable error messages and 'just not working'. This too can lead to some pretty atrocious messes of bad code as well though.

    I think that's just the way it is - the ethos of Perl is that it's really easy to get started. It's a 'do what I mean' sort of language. To someone who has worked with a very strict language, that looks rather lazy and sloppy.

    Personally, I like that flexibility. Having moved beyond 'bodge it until it works' programming, I think I can now choose to write code in a way that best expresses what I meant the code to do.

    So I think the reason for the bad rep is as simple as it being an accessible language, with a lot of legacy code snippets, that lead to a lot of ugly bodge jobs. And because it's not compiled code, the ugly bodges are visible to anyone who looks. But none of these things mean it's a bad language.

Re: Why so much hate?
by snoopy (Deacon) on Aug 07, 2013 at 01:24 UTC
    It's agreed there's a little language rivalry from time to time, but with Perl, it's crossed the boundaries of extreme
    This originates from around 1997 - 2004. An era when Perl was seen to have the advantage.
Re: Why so much hate?
by Anonymous Monk on Aug 07, 2013 at 02:29 UTC
Re: Why so much hate?
by curiousmonk (Sexton) on Aug 07, 2013 at 04:06 UTC
    While doing that, i came across several destructive reviews of the Perl programming language itself. It's been described as a "Filthy language" "Dangerous for beginners" and basically, the downfall of many a programmer.

    Look, If the solution to a problem requires application of a specific paradigm of thought. No attempt to replace the tool facilitating that, can truly do away with that paradigm

    Now look at Perl, what exactly makes Perl, Perl?

    If your problem domain requires any of the paradigm perl offers as a solution, trying to replace Perl with any other language produces a situation while you essentially write Perl in that language. I've seen tons of Python code out there, but none with the regex density Perl code is written, or with enough file interaction, or use functional programming paradigms, or with the same flexibility, elegant solutions in the same LOC's, or offering equally quick development time ... The list can go on..

    There are sizable number of developers out there, who will never programmatically open a file to do anything, or they may probably write a regex in many years. Because their only way of interacting with data is the html form -> data access point -> database data flow. What you see here is really very minimal manipulation of data, for nearly all the times just using a very minimal combination of standard operators that come with the language does the job. They may never face a situation to search a text in list of other texts, or a need to really simplify massive verbose walls of code to simple elegant and succinct paradigms. There are also chances that, what most web developers need is snippets of well tested code available all over the internet(Surprisingly bulk of the web programming these days is just knowing how to quickly copy/paste and from where).

    So it all comes down to, what the person is really to solve here. Having seen Java developers often spend days to write what really is a equivalent of a combination of a shell commands. I can tell you, Perl is exceptionally good at doing things, what other languages don't even have an idea of.

Re: Why so much hate?
by sundialsvc4 (Abbot) on Aug 07, 2013 at 13:43 UTC

    “TMTOWTDI™ = There’s More Than One Way To Do It” is, of course, a mantra around these parts, even a point of pride, but it is off-putting to a beginner who might have cut his or her teeth with a strongly-typed language (Java ...) which has a strong sense of “compile-time” error checking.   Perl is, by design, very much a “DWITYM = Do What I Think You Mean” system, which must be told, by means of the ubiquitous use strict; use warnings; pragmas, even to provide certain errors and warnings that you might otherwise merely expect.

    Is that “a deficiency?”   No.   But I do freely admit that it was a difficult language for me to learn ... and I’ve been doing this 30+ years and counting.   However, like so many other people, it is (among the many languages that I routinely use) a consistent favorite for exactly the sort of tasks that make it “The Swiss Army® Knife of pragmatic, for-a-living, computer programming.”   Ripping files apart, for instance.   Stuff that I didn’t think that it could handle ... that it handled with power.

    You cannot consider Perl without CPAN, which at this particular moment contains:   94,134 Uploads; 28.061 Distributions, 123,844 Modules, [contributed by ...] 10,840 Uploaders.   All of these modules are yours for the asking, at no charge, and they will custom-install themselves and self-test themselves upon your computer ... (almost) no matter what kind of computer it is.   All production languages have a similar library of contributed software, but I am of the opinion that Perl’s is one of the most comprehensive and all-around best.   (And, again, I use pretty-much all of the mainstream languages quite regularly, as do, I daresay, most of the folks around here ...)   Let us give proper credit where credit is most-richly due.

    ---

    It’s interesting and unsurprising that JavaScript was mentioned, as this is a language that is even more difficult to deal with, effectively impossible to debug except “at runtime,” yet it is accepted (sic ...) because it’s still the only game in that town.   Years ago, I started to use haXe for cross-platform software development, and I immediately found to be a tremendous improvement over “ordinary” JavaScript workflows, specifically for its strong-typing and other very rigorous tests.   (It generates JavaScript as one of its outputs, and I heartily recommend haXe for that purpose to anyone even if you use it for nothing else.)

    And, at the end of the day, “a Tool is what it is.”   People do tend to have (very) strong emotions about them, but emotions don’t pay (or move ...) the freight.   These are tools, nothing more or less.   Not perfect, not absolute, Warts Included,™ built by equally-warty real people to earn paychecks, and incredibly useful in that regard.   Locomotives are not built for their looks.

Re: Why so much hate?
by astroboy (Chaplain) on Aug 08, 2013 at 01:54 UTC
    Since you have a weakness for the printed page, check out the Perl Cookbook. To be honest, it's what got my over the hump - until I read it, I was trying to shoehorn Perl into the programming idioms I already knew, and this was a frustrating experience. The Cookbook provided sample solutions to the problems I was trying to solve, and it set me on my way
Re: Why so much hate?
by taint (Chaplain) on May 31, 2014 at 19:08 UTC
    This thread appears to have become a "what's Perl" / "How would you define/describe Perl". To that end;

    Perl is the Duct tape, bobby pin, chewing gum, metal coat hanger, bit of bailing wire found in every field box. Something, few, if any other language can lay claim to. But Perl can also be considered, micro calipers, and sophisticated diagnostics equipment. In all, speaks to a far wider audience of needs, than I think any other language. No?

    Which all perhaps speaks to "Why so much hate?". see; envy (of/by other languages).

    --Chris

    °λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://1048154]
Approved by ww
Front-paged by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2014-11-28 17:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (199 votes), past polls