Slashdot Mirror


Why Corporates Hate Perl

Anti-Globalism recommends a posting up at O'Reilly's ONLamp on reasons that some companies are turning away from Perl. "[In one company] [m]anagement have started to refer to Perl-based systems as 'legacy' and to generally disparage it. This attitude has seeped through to non-technical business users who have started to worry if developers mention a system that is written in Perl. Business users, of course, don't want nasty old, broken Perl code. They want the shiny new technologies. I don't deny at all that this company (like many others) has a large amount of badly written and hard-to-maintain Perl code. But I maintain that this isn't directly due to the code being written in Perl. Its because the Perl code has developed piecemeal over the last ten or so years in an environment where there was no design authority.. Many of these systems date back to this company's first steps onto the Internet and were made by separate departments who had no interaction with each other. Its not really a surprise that the systems don't interact well and a lot of the code is hard to maintain."

963 comments

  1. Ockham's Razor tells me.... by arth1 · · Score: 5, Interesting

    ... that it's because it's too complex for them. There's no pointy-clicky visual perl, and absolutely no correlation between code size and complexity. So they can neither hire a $35k/year H1Ber to do it, nor count lines of codes to measure complexity.

    Oh, and without taking special measures, others get to see the code. Including sysadmins, who may laugh at the stupidity of the $35k programmers. Which doesn't make management look good.

    Perl is the enfant terrible of the programming world. A very smart one, but requiring the same smartness of its users.

    1. Re:Ockham's Razor tells me.... by silentbozo · · Score: 5, Insightful

      What makes me laugh (and cry at times) is these same businesses, who insist that programmers and administrators are hard to come by, turn to ridiculous metrics like "how many lines of code do you write per day", and require x number of years of experience with technologies which just came out this year (and have yet to be proven.)

      Let them have their H1-Bs, and the deadwood with the inflated resumes. Good riddance.

    2. Re:Ockham's Razor tells me.... by Lonewolf666 · · Score: 4, Interesting

      I suspect they merely have associated "Perl" with "bad" because the existing cruft happens to be in Perl. Because there are very few managers who understand the difference between programming languages.

      Besides, you can create an unholy mess in any programming language.

      --
      C - the footgun of programming languages
    3. Re:Ockham's Razor tells me.... by smittyoneeach · · Score: 3, Insightful

      You post invites the question:
      How many internal/script-driven systems have you seen
      over "a few" years old
      maintained by at least "a couple" different people,
      that don't end up a train wreck?
      The need to revamp a system is often more a question of when.
      So, you get to that point, and the question becomes:
      do we keep this funky old perl,
      or start from scratch with something relatively tidy and
      popular from a staffing perspective?

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    4. Re:Ockham's Razor tells me.... by Lonewolf666 · · Score: 1

      The need to revamp a system is often more a question of when.
      So, you get to that point, and the question becomes:
      do we keep this funky old perl,
      or start from scratch with something relatively tidy and
      popular from a staffing perspective?

      I don't doubt that a system might reach the point where it can only be replaced.

      What I suspect is that the management in question has come to the false conclusion that the old system is bad because it is written in Perl. Not because project planning or the developers sucked.

      So they might try to have it reprogrammed in something popular (Visual Basic? *evil grin*) only to find out that a change of programming language will not magically cure their woes.

      --
      C - the footgun of programming languages
    5. Re:Ockham's Razor tells me.... by fishbowl · · Score: 4, Insightful

      "So they might try to have it reprogrammed in something popular (Visual Basic? *evil grin*) only to find out that a change of programming language will not magically cure their woes."

      1. It's their money.

      2. If it's not (#1), then it means you are in a position of decision making authority and can rectify the situation in a suitable manner.

      Seriously, as long as your work environment involves calling decision makers "THEY" you really don't have a dog in the fight.
      Why aren't you in an authoritative role by now, if you're so experienced, talented, knowledgeable and skilled?

      It's no different from the other 10,000 slashdot posts where a decision maker was a "them", and somebody else's money was at risk.

      --
      -fb Everything not expressly forbidden is now mandatory.
    6. Re:Ockham's Razor tells me.... by dintech · · Score: 5, Insightful

      I can only speak for investment banking but "lines per day" is not a metric which I've ever seen people actually use. Generally you are measured only one way. "Have you met your deliverables".

      There may be some architecture and best practices you have to meet in carrying out your implementation which is what this article is about I suppose. Perhaps integrating with other systems forces you to use a particular tool or language. However, in general you can do whatever you want as long as you fulfill the user and business requirements.

      That could mean perl but usually we think of that as being a fancy bash script with perhaps a bit of database interaction rather than a platform for writing server-side (or even client-side?) apps.

    7. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 1, Insightful
      Oh please, it's not just corporate opinion it's programmers that hate Perl. If you want beauty and speed then Python is better. If you want language features then Ruby is better. Both languages encourage more maintainable code and there's very little now that Perl is better at, other than promoting a language with comparatively ugly syntax (and please no relativism here... no one would choose that Perl syntax if they were starting from scratch and so let's just call Perl what it is: ugly, just not as ugly as PHP)

      .

      Further, the external impression for over 5 years now is that Perl/Parrot is a dead project. There are no iterative improvements, it's a build-from-scratch restart with completely new foundations. Now the apologists will say that the 5.x series receives new software on CPAN and so they don't need feature X. I mean really, listen to yourselves. If you didn't love Perl you be elsewhere -- the apologists explain exactly why Perl is dead. It might do a Firefox/Phoenix and rise from the ashes in 5 years but -- unlike Firefox -- Perl isn't filling a hole. Other languages have shown they are more than capable at pulling up the slack. Perl/Parrot suffers from exceptionally poor project management.

      .

      And to be honest I'm happy with syntax problems, a dead project and a public impression of decay. Unlike 10 years ago the language doesn't deserve your praise anymore -- it's not earning your respect and you should acknowledge that. Nostalgia is a good reason to like Perl or to think fondly of Pluto as planet, but the world has moved on and you should too.

      .

      Perl is deprecated. Python and Ruby are where it's at.

    8. Re:Ockham's Razor tells me.... by chthon · · Score: 5, Informative

      Yes! Book recommendations for Perl programmers, outside of the standard ones you need :

      • Perl Best Practices, by Damian Conway. This one is really mandatory.
      • Higher-Order Perl, by Mark Jason Dominus, to understand why Perl is so powerful.
      • How To Design Programs, which taught me better ways of using Perl, even though the book is based upon Scheme.
      • Structure and Interpretation of Computer Programs, which is somewhat the bridge between HTDP and Higher-Order Perl.

      All the rest I learned from the camel book. I use Perl on three platforms (Win32, Cygwin and Solaris), using the same libraries, and now also adding Perl/TK to the mix.

      If you need to define several goals, I would recommend Perl Best Practices for writing maintainable and easy to read code and installing a peer review process.

      HTDP is more for individual programmers, to become smarter and better programmers.

    9. Re:Ockham's Razor tells me.... by Lonewolf666 · · Score: 1

      In this case (I'm neither an employee nor a stockholder of the company in question) I certainly don't have a dog in the fight. So it is more of a general observation on what might work and what might not.

      If you dislike this sort of discussion, maybe Slashdot is not the right place for you.

      --
      C - the footgun of programming languages
    10. Re:Ockham's Razor tells me.... by Saint+Gerbil · · Score: 1

      Active state used to have a product called "Visual Perl", must admit never used it tho.

    11. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      There's more than one way to do it.

      Sadly this means that everyone does it a different way. I've written a lot of perl in my time, because I've done a lot of text hacking. But it's a bad language, because it encourages people to be opaque, to achieve the same thing in multiple ways, and to be write code as small, not as readable as possible.

      Corporates are turning away from it for good reason. A code base 10 years in development would not have been an problem were it refactored, but this is hard with perl.

      Some programmers like perl because it's tricky, clever and powerful. All true. But for those of us who program because it's a basic tool for our real job (I'm a biologist for instance) I'd use something else where possible.

      Phil

    12. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0
      Continuing...

      Let's just look at how ugly Perl 6 is planning to be.

      sub somefunction($a, $b, :$c, :$d, *@e) {...}
      somefunction(1, 2, :d<3>, 4, 5, 6); # $a=1, $b=2, $d=3, @e=(4,5,6)
      somefunction(:b, :a<1>); # $a=1, $b=2

      Can anyone think of a better non-ugly syntax for that? Well in Python you can use arrays and dictionaries ... so it's just somefunction(key=value, key2=value2) or if you want to store your function parameters in an array beforehand you'd just write

      params = {key:value, key2:value2}
      somefunction(*params)

      ...and the params variable would be unpacked.

      You'd really have to struggle to think of a more inelegant syntax than that of Perl 5 or 6, although there are strong bets on Perl 7. what about exploding dictionaries from Python? You simply put *

    13. Re:Ockham's Razor tells me.... by Psychotria · · Score: 1

      ... that it's because it's too complex for them.

      What is too complex? How many companies understand the code (whatever language) that supports them? Even in the very tech-orientated companies that I have worked for, I would say 5%. "Complexity" is not an excuse.

    14. Re:Ockham's Razor tells me.... by Psychotria · · Score: 4, Interesting

      And "deliverables" is just as stupid a metric (when measured per day as you suggest) as any other quasi-objective (yeah, ok, subjective) "goal". The "goal" is an "objective" that helps to reach "aims" that are all... subjective.

    15. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      Seriously, as long as your work environment involves calling decision makers "THEY" you really don't have a dog in the fight.
      Why aren't you in an authoritative role by now, if you're so experienced, talented, knowledgeable and skilled?

      Not every coder wants to be in an "authoritative role", shuffling paperwork and kissing toads. There's more to life than money and power. Self-respect, for one thing.

    16. Re:Ockham's Razor tells me.... by jacquesm · · Score: 5, Interesting

      to me the biggest issue is maintainability, some languages help you in that department, some hinder.

      Perl makes it easier than even C to write obfuscated bits of code that even the author has a hard time understanding a few months later.

      I've seen perl used to create job security for it's coders, in that respect it is the new assembly language.

    17. Re:Ockham's Razor tells me.... by Dubu · · Score: 1

      Further, the external impression for over 5 years now is that Perl/Parrot is a dead project. There are no iterative improvements, it's a build-from-scratch restart with completely new foundations.

      I suppose you are referring to Perl 6 development. Yes, progress there is appallingly slow.

      Now the apologists will say that the 5.x series receives new software on CPAN and so they don't need feature X.

      It seems you are not following Perl development in the 5.x branch. Lots of Perl 6 features have already been added in Perl 5.8 and now 5.10. It seems to me that some people are numbed in expectation of Perl 6, but they should just use what's there now: Perl 6 design has surely driven Perl 5 development to new possibilities.

      Perl is deprecated. Python and Ruby are where it's at.

      I like (and use) both of them, too. Unfortunately, Ruby - whose style I would prefer - still has some drawbacks, especially concerning speed. But its syntax has so many similarities to Perl that it takes not really much effort to convert a Perl script into Ruby. And you get the fancy Smalltalk-like object orientation that's a lot easier to handle than Perl's approach, addmittedly. But still, the requirements for most of the code I have to write just fits nicely into the feature set Perl offers to me.

    18. Re:Ockham's Razor tells me.... by jacquesm · · Score: 2, Insightful

      I've tried to 'repair' a broken perl app and indeed it was much quicker to toss it and rewrite.

      Perl is worse than 'mumps' and that's saying something.

      (mumps anecdote: What, you've reset that string ? Oh, great that was the systemwide editor...)

    19. Re:Ockham's Razor tells me.... by jacquesm · · Score: 1

      I think you lost the UID wars.

    20. Re:Ockham's Razor tells me.... by jacquesm · · Score: 1

      yes, but that's a false metric, how about "how many programmers wrote the code that supports them", and in most languages the answer is "a pretty good portion". In perl I doubt the author could even say what his/her code written a couple of months ago does without studying it for a while.

      That's where the problem lies. Not in the corporate hierarchy.

    21. Re:Ockham's Razor tells me.... by digitig · · Score: 3, Insightful

      to me the biggest issue is maintainability, some languages help you in that department, some hinder.

      Perl makes it easier than even C to write obfuscated bits of code that even the author has a hard time understanding a few months later.

      I've seen perl used to create job security for it's coders, in that respect it is the new assembly language.

      Yes, it's not just Perl code that has developed piecemeal over the last 10 years or so, it's Perl itself, with things like OO being rather clunkily bolted on. It does feel to me like a language that was great in its time but has had it's day and needs to stand aside. No doubt Perl experts will continue to produce useful scripts as they always have done, but more modern technologies make it easier (including easier to get right). And that will turn into a maintenance issue for even well-written Perl code: when finding Perl maintainers gets to be as hard as finding COBOL maintainers, and for the same reason.

      --
      Quidnam Latine loqui modo coepi?
    22. Re:Ockham's Razor tells me.... by rdebath · · Score: 5, Insightful

      Lines per day is frequently proposed and sometimes implemented. But it's also easy to kill, just do that little refactoring job you've been putting off and put in a report of minus two thousand lines.

      They tend to get the message after that.

    23. Re:Ockham's Razor tells me.... by TekPolitik · · Score: 3, Insightful

      I can only speak for investment banking but "lines per day" is not a metric which I've ever seen people actually use.

      Some people use it, but on its own it's a really bad metric. A top quality developer will do the same task in far fewer lines of code, with better reliability, than a poor quality developer. That means metrics based on lines per day alone may identify the worst programmers rather than the best.

    24. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      I think you meant 'must never admit using it tho.'.

    25. Re:Ockham's Razor tells me.... by Hognoxious · · Score: 2, Interesting

      Of course it's a bad one. So why does it get used?

      Because it's easy to implement and it produces a number. Numbers are great because managers can do barcharts and statistics and stuff like that to stick on the wall and go "blah blah KPI blah blah" in meetings.

      And re the GP about doing negative lines - yup, been there (we didn't use LoC formally, but I was questioned on why the programs were getting so much shorter). Is taking out the shit that some imbecile had copy/pasted a few hundred times and putting it in subroutines counted as refactoring?

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    26. Re:Ockham's Razor tells me.... by Hognoxious · · Score: 1

      That may be, but fishbowl just set a new olympic record in the dickhead quadrathlon.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    27. Re:Ockham's Razor tells me.... by CrazedWalrus · · Score: 4, Insightful

      At my last job, I wrote a perfectly good perl loader for a large data file we'd bring in every night. They decided to kill it off and go with BusinessWorks instead. BW took 45 times longer (I shit you not -- 45 minutes instead of 1 minute) and broke every week. We finally got sick of the support issues and went back to perl.

      Fact is that shiny pointy clicky just introduces complexity and additional points of failure into the infrastructure. If you want the latest buzzwords, then by all means, go with shiny pointy clicky. If you want your system to work, keep it with tried and true.

      This has been said ad nauseum: There's nothing inherent about perl that makes its programs unmaintainable or broken. It's all about getting programmers who know how to write maintainable, well-designed code. A bad programmer can make an abortion of any programming language or fancy pointy clicky system.

    28. Re:Ockham's Razor tells me.... by heffrey · · Score: 1

      It's Occam's razor for Pete's sake

    29. Re:Ockham's Razor tells me.... by simcop2387 · · Score: 1

      and currently in perl 5 my %params=(key=> value, key2 => value2); somefunction(%params); or if you want to avoid the temporary variable somefunction(key => value, key2 => value2); though the function has to know to be expecting this.

    30. Re:Ockham's Razor tells me.... by pipatron · · Score: 4, Funny

      with things like OO being rather clunkily bolted on

      I beg to differ. I think that how perl handles OO is one of the most elegant ways I've seen any language to it.

      --
      c++; /* this makes c bigger but returns the old value */
    31. Re:Ockham's Razor tells me.... by Z00L00K · · Score: 1

      Perl is in itself neither good or bad.

      And neither are the programmers of history really guilty.

      The big issue here is that what started out as something small and neat has been growing over time with different programmers involved. This is caused by various input from different areas within a company and after a while the structure that once was consistent is now degraded and there is a lot of dead code. And the evolution of the language has also contributed because what once was the only way to do something can now be done in three different ways.

      But this is still nothing that's unique to Perl. Most languages suffers from this problem, and the problem arises from the fact that there is often no compile-time verification of the code to find any inconsistencies between modules.

      Languages with strong and static typing are a bit better to cover for problems like these, since they can verify the worst problems at compile time. Additional tools like Findbugs and Splint can also help.

      Weak and dynamic typing are fatal problems waiting to happen. You may claim that it's resolved by better testing, but that drives up the cost since the iterations will be longer. And some cases are missed during tests because that code is only executed in rare cases.

      So if anything - what should be hated are weakly and dynamically typed programming languages. Regardless of what the language is called. But we can't live completely without them either since they come in handy from time to time. But at least the usage shall be limited to keep things safe.

      And back to the issue where code has evolved over time - it is sometimes the best to actually bring together a set of engineers that has to analyze the functionality of an existing system and then rewrite the whole system in a consistent way using a language like Ada, Java or C#. In some cases special languages may be needed because there can be functionality that can be best expressed in Erlang or Fortran. This means that it's important to not be too obstinate about using a single language for development. Select one main language and make it interact with other languages when needed.

      Lines of code is of course not a good measurement of the complexity of an application or the task ahead. A programmer may use weeks to code something that's a 1000 lines long, but other parts can be 5000 lines in a day.

      Comments in code are useful - but only to a degree, too much comments will just obscure the code instead.

      Breaking down code into reasonable modules is also important. Tools like Eclipse have some refactoring capabilities which allows you to actually break out a certain code segment into a new method in Java.

      And yet another factor that's easily forgotten is that there are three types of systems;
        1. Architect designed systems.
        2. Hacks.
        3. Evolved systems.
      Both 1 and 2 can converge into an evolved system, but the evolution depends strongly on the programmers involved and their experience. An experienced programmer can actually restructure a hack into a structured evolved system, but inexperienced programmers can easily cause a designed system to be evolved into an unstructured evolved system. Available tools and methods also bear their share for the quality of an evolved system.

      --
      If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
    32. Re:Ockham's Razor tells me.... by fbjon · · Score: 1

      That can't be enough to kill it, the easiest way to get around that is to measure the number of lines changed, instead of added. Still, changing a lot of lines is easy with a small regexp search and replace.

      --
      True confidence comes not from realising you are as good as your peers, but that your peers are as bad as you are.
    33. Re:Ockham's Razor tells me.... by xaxa · · Score: 5, Funny

      to me the biggest issue is maintainability, some languages help you in that department, some hinder.

      I quote the lecturer from my software maintenance course:
      "As I understand it, the standard maintenance method with Perl is to start again."

    34. Re:Ockham's Razor tells me.... by VoidCrow · · Score: 4, Insightful

      I'm a C++ coder. I've written OO code in Perl. Maybe I'm missing something about its elegance. Would you care to explain, with brief examples?

    35. Re:Ockham's Razor tells me.... by xaxa · · Score: 1

      Is taking out the shit that some imbecile had copy/pasted a few hundred times and putting it in subroutines counted as refactoring?

      I hope so. My internship was doing just that for the first few months. My university tutor asked how much code I'd written, I said, "minus 20,000 lines!".
      Much of the copy/paste code had been done by the previous intern. It was really confusing looking through it, there was a sense of deja-vu every couple of screenfulls.

    36. Re:Ockham's Razor tells me.... by jacquesm · · Score: 1

      thank you, that really made me laugh :)

      I remember from ages ago when I was programming mainframes that there was code by a certain programmer that will remain nameless where we had the same attitude. As soon as we saw his name in the authors list the project changed from 'small maintenance' to 'total rewrite' instantly :)

    37. Re:Ockham's Razor tells me.... by jacquesm · · Score: 4, Funny

      oh, don't worry, they'll be brief, this is perl, right ?

      Whether you'll be able to read them though, that's a different matter altogether ;)

    38. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      Fact is, management making decisions based on "trendy" is a sign of raging incompetence in the management team. There should have been trials in place, to show that the BusinessWorks solution was not a viable option.

      They never do that, the CTO or some other idiot in the suit offices reads something in one of his magazines and it get's shoveled down IT's and Data Processings throat. When it does not work, they dont take the blame they make up some nonsense and/or blame IT and Dataprocessing for the failures.

    39. Re:Ockham's Razor tells me.... by pdbaby · · Score: 5, Funny

      Well you're a C++ programmer so your vote on elegant OO is NULL and void* :-P

      I jest, I jest.

      --
      Global symbol "$deity" requires explicit package name at line 2. - If only $scripture started "use strict;"
    40. Re:Ockham's Razor tells me.... by HangingChad · · Score: 1

      That could mean perl but usually we think of that as being a fancy bash script with perhaps a bit of database interaction rather than a platform for writing server-side (or even client-side?) apps.

      I can only speak to the reasons for going with PHP and JAVA in our company. For one, PHP is really maturing as a development language, JAVA is well supported, and maybe over the years I kept running into some of that poorly designed PERL and it left a bad taste.

      Really, it's more a matter of keeping the development environment from getting cluttered with more languages we have to support. PHP and JAVA will do everything we need, so why would I want to add PERL to the mix? Or Python, Ruby, ColdFusion, .NET or anything else? Because maybe one of those will do this or that task a little easier? That's not a compelling reason for me. Every new language we add is another item I have to add to our job listings and narrows my potential pool of candidates. And the more obscure the language, the more bizarre personality it seems to attract. Not suggesting PERL coders are strange...well, maybe a little. :)

      Really, I'm just trying to keep our platform as clean and simple as possible. The same reason I tend to avoid Microsoft products. Not only do you have to deal with the expense, but the complexity of the licensing and capacity planning. We can stand up LAMP capacity for the cost of the hardware and don't have to worry about running afoul of MS's byzantine licensing goat rope-o-rama.

      --
      That's our life, the big wheel of shit. - The Fat Man, Blue Tango Salvage
    41. Re:Ockham's Razor tells me.... by shaka999 · · Score: 5, Insightful

      Good grief, how is "deliverables" a stupid metric. Either you deliver a working solution/program on time or you don't. Thats the deliverable. Bascially your saying that having and goal and having to deliver anything is stupid.

      --
      One should not theorize before one has data. -Sherlock Holmes-
    42. Re:Ockham's Razor tells me.... by fbjon · · Score: 1

      In your case perl was the right tool, but in most cases it's the wrong tool, because it has been succeeded by better tools (and I don't mean pointy-clicky ones) for most cases.

      --
      True confidence comes not from realising you are as good as your peers, but that your peers are as bad as you are.
    43. Re:Ockham's Razor tells me.... by struberg · · Score: 1

      > All the rest I learned from the camel book.

      Oh yes, and Jesus already told us: "it is easier for a camel book to go through the eye of a needle than for a rich client man to enter the kingdom of Code"

    44. Re:Ockham's Razor tells me.... by bloobloo · · Score: 1

      Sounds a lot like the Soviet car factories that got paid by the weight of the cars they built. So the factories started adding concrete blocks.

    45. Re:Ockham's Razor tells me.... by Hyppy · · Score: 1

      "Does Employee X perform his job in a satisfactory manner?"

      Sure, it's subjective.

    46. Re:Ockham's Razor tells me.... by datapharmer · · Score: 2, Funny

      No need to stay silent about him, it is best everyone knows - I keep finding his scripts running at night on my systems too. He uses the login "nobody", and I'll be damned if I know what his code does! ;-)

      --
      Get a web developer
    47. Re:Ockham's Razor tells me.... by aunt+edna · · Score: 1

      Yes! Book recommendations for Perl programmers, outside of the standard ones you need :

      • Perl Best Practices, by Damian Conway. This one is really mandatory.
      • Higher-Order Perl, by Mark Jason Dominus, to understand why Perl is so powerful.
      • How To Design Programs, which taught me better ways of using Perl, even though the book is based upon Scheme.
      • Structure and Interpretation of Computer Programs, which is somewhat the bridge between HTDP and Higher-Order Perl.

      All the rest I learned from the camel book. I use Perl on three platforms (Win32, Cygwin and Solaris), using the same libraries, and now also adding Perl/TK to the mix.

      If you need to define several goals, I would recommend Perl Best Practices for writing maintainable and easy to read code and installing a peer review process.

      HTDP is more for individual programmers, to become smarter and better programmers.

      ... add in "How To Win Friends and Influence People".

    48. Re:Ockham's Razor tells me.... by Dr_Barnowl · · Score: 2, Funny

      Point out this scenario and insist they measure lines of diff, not lines of code. Then re-indent the entire codebase and ask for a bonus.

    49. Re:Ockham's Razor tells me.... by Hyppy · · Score: 1

      Why aren't you in an authoritative role by now, if you're so experienced, talented, knowledgeable and skilled?

      I think you answered your own question, there. I don't know what country you're from, but here in the U.S. it is considered bad form to promote individuals with technical expertise or critical experience to management.

    50. Re:Ockham's Razor tells me.... by Feyr · · Score: 1

      it goes the other way too. perl does everything i need, why would i want to clutter it with java and php?

      it's faster than java, and has more useful sysadmin modules than php anyway. and as long as you're not a retard, just as easy to maintain

    51. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      What's all this about programmers? When I was first introduced to Perl, it looked like an extension to all the shell-level scripting I'd already been doing (sed, awk, bash). Difference was, I could do all those "program-like" thing I couldn't quite get from shell scripts. Difference was, I could compile it into a single "deliverable." Difference is, I'm a sysadmin, not a programmer.

      As a sysadmin, I often need to patch things together. More often than not, these things don't require a program (or a programmer); a shell script with some references to awk, sort, tail, sed and curl is typical. When I discovered that a router was occasionally locking up, and the vendor wasn't releasing a fix anytime soon, I used perl to test the connection, and based on its decision, log in via telnet and reset the router. That program is still running, every five minutes or so, somewhere. I do patch things together, because it's my job. Not everything that is code is written by programmers.

      I'm never going to write Good Code(TM). I will write scripts that work, that I can maintain, with comments I can generally understand. I am trying python, as it looks like a way to do simple things (remember, I'm not a programmer) quickly. And when I grow up, I hope to program in java.

    52. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      There is nothing smart about continuing to use a language that everyone loves & is very versatile, but comes with a shrinking talent pool. I don't know about you guys, but when I'm interviewing people, its becoming increasingly difficult to find someone who can:

      a. tell the difference between scalars, hashs & arrays (or even list them as datatypes for that matter - lol)
      b. knows what DBI is and how to compile a DBD driver
      c. tell me the #1 place to get perl modules from online (cpan.org)

      Also, everyone knocks the H1Bers, and i have some ish with them too - but you definitely don't see Americans stepping up to the plate for perl dev either. 1 out of 30 resumes in the last 3 months of the people that I've interviewed was born here. he wasn't even that good & had a huge price tag. Screw that.

      At least if i find some j2ee people, I have a larger pool to sort through.

    53. Re:Ockham's Razor tells me.... by jimdread · · Score: 1

      In perl I doubt the author could even say what his/her code written a couple of months ago does without studying it for a while.

      Authors not remembering what code does is not a perl problem, it can happen in any language. Perl has tools to help stop this from being a problem, such as perlpod and perldoc. The programmer can put documentation and notes into the program near the code that needs documenting. Then if a programmer needs to know a couple of months later what code does, they can simply read the fine documentation, which will be right there in the files.

      Here's a simple example of some perlpod. Please see man perldoc and man perlpod for more information. You can use the same pod to document the file, generate man pages, and generate html.

      =head2 some_func($x, $y)

      Returns the result of the fabulous function.
      Long description of what the function does. Blah blah blah.

      =cut

      sub some_func
      { my ($x, $y) = @_;
      # do something here
      return 42;
      }

    54. Re:Ockham's Razor tells me.... by jcuervo · · Score: 1

      Still, changing a lot of lines is easy with a small regexp search and replace.

      $x=sub{exists$v{$_[0]}&&return$v{$_[0]};for(0..rand(9)){$c.=chr(97+rand(26))}
      $v{$_[0]}=$c};seek(DATA,0,0);while(<DATA>){s/\$([a-z]+)/'$'.&$x($1)/eg;print}
      __END__

      One of my .sigs. Changes variable names at random.

      --
      Assume I was drunk when I posted this.
    55. Re:Ockham's Razor tells me.... by Bedemus · · Score: 3, Insightful

      I can only speak to the reasons for going with PHP and JAVA in our company. For one, PHP is really maturing as a development language, JAVA is well supported, and maybe over the years I kept running into some of that poorly designed PERL and it left a bad taste.

      I keep hearing this comment about PHP, but every time I look at the language I come away unimpressed. A typical PHP install can have as many as 4000 functions in the global namespace, and there's not even a clear naming convention to be found.

      Really: addcslashes, count_chars, str_getcsv, str_shuffle, strlen, chunk_split -- this is just a small selection of the functions dealing with strings.

      A brief aside: I used to live near Pittsburgh, PA. It's a great city, with great people. But it has bridges. LOTS of bridges. 446, to be exact. More bridges than Venice, Italy. I used to joke that it was like we built a small town at the center of three rivers when rivers were a primary means of transporting goods, then were taken completely by surprise when it grew.

      I only mention this because that's kind of how I think of PHP. A good community, with a ton of nice people who have nothing but the best of intentions. Yet, when I compare PHP to something like Perl or Ruby, I always come away feeling like PHP just kept tossing up bridges as it grew, without taking a step back and looking at the big picture.

    56. Re:Ockham's Razor tells me.... by grantek · · Score: 4, Funny

      All Perl needs is a shiny new catch phrase...
      Perl on Rails?
      CloudPerl?
      Extreme Perl?
      Perl#?

    57. Re:Ockham's Razor tells me.... by encoderer · · Score: 2, Insightful

      Oh, please.

      First, let me ask, are you a professional software developer or project manager? (I'm not being arrogant, I'm just curious).

      I've got more than a few years under my belt.

      A developer gets a spec. He designs a solution and quotes the spec. Assuming he's given the green light, he schedules the projects start date and sets some milestones.

      I've worked for DOZENS of companies, large and small, in all economic sectors, as both a contractor and a FTE, and invariably it's some variation on this theme.

      The developer designs a solution and sets the schedule.

      "Deliverables" means nothing more than the developer hitting the milestones/delivering the artifacts that he set for himself.

      In smaller projects, this could be the entire application. In large projects, it's just a single function point.

      You can bash the vernacular of the business all you want, but you don't offer any better solution.

      If I'm being paid $50/hr to tap a keyboard, shouldn't I be held accountable for results?

    58. Re:Ockham's Razor tells me.... by MadnessASAP · · Score: 1

      That's how my Co-Op manager handled things, I could si their and play solitaire all damn day if I wanted too, but god have mercy on my sould if the code wasn't ready to go on time. Worked pretty damn well if you ask me.

      --
      I may agree with what you say, but I will defend to the death your right to face the consequences of saying it.
    59. Re:Ockham's Razor tells me.... by jacquesm · · Score: 1

      I think you missed my point. The *code* usually does a pretty good job of saying what it is that it is doing, to the extent that comments are for the most part limited to describing what a function does, if you understand the context of the code then the rest is (more or less) obvious.

      In perl you really need those play-by-play comments because without them you're pretty much lost. If you don't have them (and most perl code that I have seen uses comments only to document those cases where the original programmer foresaw a problem in later understanding of what the f*ck is going on) then you are sorely out of luck.

      Even (shudder) visual basic is inherently more readable than perl.

      IBM once had a programming language on their mainframes called 'APL', ('a programming language'), this was similar in that it allowed you to write amazingly dense code, but if you weren't current with the codebase you had no chance whatsoever of understanding what it was doing.

      Image lifted from wikipedia:

      http://upload.wikimedia.org/wikipedia/en/f/ff/LifeInApl.gif

      the game of life. Now if you read that and said (without looking at the title) oh, wow the game of life in one line, how elegant, then more power to you.

      If your response was "wtf ??" then you understand how I feel about most perl code :)

      j.

    60. Re:Ockham's Razor tells me.... by MadnessASAP · · Score: 3, Funny

      What is worng with you Perl programmers? Does the thought of a newline or indentation, possibly even whitespace fill you with fear and horror?

      --
      I may agree with what you say, but I will defend to the death your right to face the consequences of saying it.
    61. Re:Ockham's Razor tells me.... by gfxguy · · Score: 4, Interesting

      One python coder here was scared because I was writing some tools in PERL that he was going to have to use and maintain. He complained PERL looked so terrible and was so horrible to follow that he wasn't sure he'd be able to do it.

      Then he saw my code, and understood every line of it...

      I'm like the anti-PERL PERL programmer (although I don't even use it myself anymore). He was absolutely right... when there was a more obscure way to do something, but it saved two characters of code, the PERL programmer would do it. My code was pretty verbose and easy to read.

      If I was passing those scripts off to other PERL programmers, they'd have mocked my style.

      --
      Stupid sexy Flanders.
    62. Re:Ockham's Razor tells me.... by LilBlackDemon · · Score: 1

      As a coder working in an investment bank environment, you're measured in getting your deliverables done within a decent time frame. So a tiny app would be a week, but an intranet/extranet site would be measured in months or years. In that environment, success is measured in getting your projects done, properly, in as little time as possible. Lines/day, deliverables/day, etc., don't factor in, since most of the business managers have little technical knowledge/expectations, beside getting what they need fast.

    63. Re:Ockham's Razor tells me.... by eudaemon · · Score: 1

      Usually these deliveries aren't measured per day as much as against a single given day -- release day. If you make that, great.
      If not your bonus may bite the big one come year end.

    64. Re:Ockham's Razor tells me.... by webnut77 · · Score: 1

      Mod parent up. I think it's the difference between two attitudes: 1) "Get the job done" 2) "Get the job done well" Later, when I look at code I've written, I want to say proudly, "Yes, I wrote that."

    65. Re:Ockham's Razor tells me.... by JamesP · · Score: 1

      I think that how perl handles OO is one of the most elegant ways I've seen any language to it.

      Like a Picasso painting??

      sorry...

      --
      how long until /. fixes commenting on Chrome?
    66. Re:Ockham's Razor tells me.... by tha_mink · · Score: 4, Funny

      One python coder here was scared because I was writing some tools in PERL that he was going to have to use and maintain. He complained PERL looked so terrible and was so horrible to follow that he wasn't sure he'd be able to do it.

      That's because PERL, even good PERL, looks like an explosion at the punctuation factory compared to a vast majority of other languages.

      --
      You'll have that sometimes...
    67. Re:Ockham's Razor tells me.... by Lord+Ender · · Score: 2, Insightful

      I'm a developer, not a manager. I have been lobbying for the use of Ruby or Python for all new development (we used to do it all in Perl). The simple reason? Perl is a write-only language. Larry Wall knows this, and that's why he's spent so many years trying to make Perl6 a clone of Ruby.

      I realize that with enough time and discipline, Perl code can be written in a more maintainable form. But that's swimming against the current in the busy business world.

      Ruby is taking hold, and most of the new apps being developed are in that language. Perl is quickly become "legacy" around here.

      [oh yeah, and Perl's terrible object model and use of POINTERS for complex datastructures (FFS!) are pretty embarrassing]

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    68. Re:Ockham's Razor tells me.... by frn123 · · Score: 3, Funny

      don't complain, just s/([;}])/$1\n/gc
      or
      perltidy .conformingsigs

    69. Re:Ockham's Razor tells me.... by dondelelcaro · · Score: 1

      What is worng with you Perl programmers? Does the thought of a newline or indentation, possibly even whitespace fill you with fear and horror?

      It's a signature. It's supposed to be condensed. While you obviously wouldn't write something like that for production code, for golfs and similar bits of uselessness, it's appropriate.

      --
      http://www.donarmstrong.com
    70. Re:Ockham's Razor tells me.... by kv9 · · Score: 2, Funny

      how about a car analogy?

    71. Re:Ockham's Razor tells me.... by Medievalist · · Score: 1

      Perl is the enfant terrible of the programming world. A very smart one, but requiring the same smartness of its users.

      I'm not disagreeing, but haven't we heard this before?

      Ah, yes, s/perl/lisp/.

    72. Re:Ockham's Razor tells me.... by rnturn · · Score: 1

      ``I realize that with enough time and discipline, Perl code can be written in a more maintainable form. But that's swimming against the current in the busy business world.''

      And I'm betting that when Ruby and Python become more widely used in ``the busy business world'' that the quality of the code that is produced will drop just as some think Perl code quality has. Just like any language has once it gets used in a place where deadlines are more important than creating maintainable code run by managers whose programming concepts were likely learned using something descended from MS-BASIC.

      --
      CUR ALLOC 20195.....5804M
    73. Re:Ockham's Razor tells me.... by Abcd1234 · · Score: 3, Insightful

      For some subjective metric of "better"...

    74. Re:Ockham's Razor tells me.... by Amouth · · Score: 2, Interesting

      "And when I grow up, I hope to program in java."

      i was agreeing with you till that comment.. now i want to shoot you... (not becuase i dislike you - but rather to save you from your self)

      --
      '...if only "Jumping to a Conclusion" was an event in the Olympics.'
    75. Re:Ockham's Razor tells me.... by Lord+Ender · · Score: 1

      You are absolutely wrong. Have you coded in all three? Perl makes it easy to do unmaintainable things (and ENCOURAGES it with "implied" scalars). Any language with the philosophy "there is more than one way to do it" is a language asking for most people to do it the wrong way.

      Python forces people to do things sanely. Ruby pushes them toward cleaner code. Perl buries you in ropes, all of which could be used to hang yourself.

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    76. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      So you know Perl and what? Objective Cobol?

    77. Re:Ockham's Razor tells me.... by Oligonicella · · Score: 1

      He didn't at all suggest deliverables were "per day", nor has any business I've dealt with in over thirty years used that. It's simply "Does it work" and "Did you come close to your estimate", both of which are reasonable metrics. I would also add "Can someone else easily understand it?"

    78. Re:Ockham's Razor tells me.... by Mr.+Slippery · · Score: 5, Insightful

      A developer gets a spec. He designs a solution and quotes the spec. Assuming he's given the green light, he schedules the projects start date and sets some milestones.

      Sometimes. Sometimes, management gives you a deadline with the spec, and you don't have the ability to set your own schedule.

      And sometimes, the spec is something like "Somewhere in the jungle is a river. Build a suspension bridge over it."

      "Do you have a map of the jungle?"

      "No, it's unexplored."

      "Do you know how wide the river is?"

      "No. I told you, the jungle is unexplored."

      "Is there a road through the jungle to the river?"

      "No. The jungle is unexplored. But look, you've built dozens on bridges, just tell me how long it will take to build this one! Give me a schedule with some deliverables."

      --
      Tom Swiss | the infamous tms | my blog
      You cannot wash away blood with blood
    79. Re:Ockham's Razor tells me.... by gizmo_mathboy · · Score: 4, Funny

      Perl6?

    80. Re:Ockham's Razor tells me.... by sterno · · Score: 1

      Exactly. Can you write clean and elegant PERL code? Absolutely. But it's also trivial to write Perl that looks like line noise. It will take more Java to do a given task, but the structure forces you to write better code than Perl. For a good coder, it may be irrelevant, but how many large corporations are populated exclusively with good coders?

      --
      This sig has been temporarily disconnected or is no longer in service
    81. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      All Perl needs is a shiny new catch phrase...
      Perl on Rails?
      CloudPerl?
      Extreme Perl?
      Perl#?

      PerlDoublePlusGood?

    82. Re:Ockham's Razor tells me.... by Alpha830RulZ · · Score: 2, Informative

      (and ENCOURAGES it with "implied" scalars)

      Agreed. I resist using them, and won't let anyone on my team use them for code that gets installed at clients. Our client code looks like a well structured C program, as much as we can make it so.

      That said, I like Perl for what we use it for, which is installation glue code, because it's generally easy for client staff to pick up. I like Python myself, but it's harder for marginal IT staff to pick up. Python and Ruby also tend to offend the client IT teams standards folks, who aren't quite sure about this new-fangled stuff. They'd prefer C# or Java, which are completely inappropriate for what we need to do.

      --
      I was taught to respect my elders. The trouble is, it's getting harder and harder to find some.
    83. Re:Ockham's Razor tells me.... by Oligonicella · · Score: 1

      Then hit the unemployment line.

    84. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 2, Insightful


      Yes, it's not just Perl code that has developed piecemeal over the last 10 years or so, it's Perl itself, with things like OO being rather clunkily bolted on. It does feel to me like a language that was great in its time but has had it's day and needs to stand aside. No doubt Perl experts will continue to produce useful scripts as they always have done, but more modern technologies make it easier (including easier to get right). And that will turn into a maintenance issue for even well-written Perl code: when finding Perl maintainers gets to be as hard as finding COBOL maintainers, and for the same reason.

      This is all true. The time it's taking Perl 6 to materialize is at least somewhat indicative of Perl itself. It's not a complete argument but I don't know too many people that don't think Perl is hard to maintain, usually.

      I'm not sure where all the languagism comes from. Perl has a bad rap, period, though. It seems like everyone has seem some lousy perl code somewhere. Does that make perl bad? Not really, it just seems like perl really lends itself well to it. Perl, C, C++, all languages really but these in particular require a lot of discipline from the developers to avoid building crappy code; much like C++, read the mozilla guidelines about all of the language features they don't use, it's an interesting concept. There are perl scripts I rely on on a daily basis, it's a very powerful tool. Piecemeal design or not, terse code isn't always good code, terse code often requires more documentation because of subtlety. The same thing is happening with Ruby, it will rapidly become the new perl, there are some butt ugly pieces of ruby out there that people in the moment think are beautiful and elegant pieces of code, let's just wait 10 years and see when someone has to re-read that closure 500 times because of an assumption about the list it's being applied to that isn't documented anywhere but is fundamental to the code working properly. (but hey, if it fits on one line then you can *see* the whole program at once in vi!!!)

      I think part of it is the learning nature a lot of developers take to to development, they learn as they go. A language like perl, by nature and design, allows a developer to do a task numerous different ways and I've seen more than a few perl programs where developers were trying to do different things in different places to further learn the language. This probably says more about the current state of the industry than it does about any language though.

    85. Re:Ockham's Razor tells me.... by Anonymous+Brave+Guy · · Score: 2, Insightful

      I've always liked Bill Gates' perspective on this one:

      Measuring programming progress by lines of code is like measuring aircraft building progress by weight.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    86. Re:Ockham's Razor tells me.... by benjj · · Score: 1

      it's faster than java

      really?

    87. Re:Ockham's Razor tells me.... by burnitdown · · Score: 3, Interesting

      This has been said ad nauseum: There's nothing inherent about perl that makes its programs unmaintainable or broken. It's all about getting programmers who know how to write maintainable, well-designed code. A bad programmer can make an abortion of any programming language or fancy pointy clicky system.

      That was my response to this article as well.

      They're chasing trends instead of paying attention to the quality of programmers they're using, because smart programmers are not interchangeable parts. They prefer cogs.

      Management isn't all as screwed up as this. Some managers prefer highly intelligent staff that can work semi-autonomously.

    88. Re:Ockham's Razor tells me.... by oiron · · Score: 1

      ADD ONE TO COBOL GIVING COBOL

    89. Re:Ockham's Razor tells me.... by Spatial · · Score: 1

      for (i=0; i4294967296; i++) {reply("Yes.","very_loudly")}

    90. Re:Ockham's Razor tells me.... by TapeCutter · · Score: 1

      "Deliverables" means nothing more than the developer hitting the milestones/delivering the artifacts that he set for himself.

      Deliverables are hierarchical, the largest I've been responsible for is around the $2M mark in the 90's. A good project manager works in a similar manner except they take deliverables from a bunch of other developers, testers, etc, (the gooduns are as you described them), they 'build' the larger system on time and on budget, this in turn may be part of another even larger system. Of course all the developers then have to deliver on their promises, if anyone parks their arse on the 'critical path' then a chain reaction works it's way through the testers, documenters, trainers, who all sit around and read slashdot.

      "If I'm being paid $50/hr to tap a keyboard, shouldn't I be held accountable for results?"

      If by 'results' you mean 'doing what you said you could/would do', then yes, but nobody should be held accountable for promises they did not make. A decent project manager will no only enforce that rule but will also obey it if there is any finger pointing to be done after it all ends in tears.

      As for TFA: 'Legacy' can mean different things to different organisations, but usually it means it needs to be maintained. Systems built with scripts such as internal web sites and reporting systems are often 'in stitu' and are often not developed in the traditional manner, they are too dynamic and have little or no formal funding. They are perfect candidates for the holy grail of 'self documentation'.

      I don't know much about pearl but it strikes me as untidy. I use python as a cross platform scripting language and python doc could be the 'holy grail' for these types of projects if deveolopers had the time/inclination to use it, but even then you may still have trouble with SOE's, etc depending on how sane those things are in the organisation. With these types of projects more often than not a PM has the worst case senario: The project starts with a deadline, a budget, and people with NFI of what they just signed up for.

      Large organisations are full of these types of projects that churn out all sorts of internal reports that people have long since stopped using.

      --
      And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
    91. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      True, but some problems will just need more code due to complexity; there may not be a short, elegant solution - even a top quality developer may need a lot of code. Other times there is a short, elegant solution that takes a lot of time and thought to realize. Lines per day as a metric really is useless and identifies nothing.

    92. Re:Ockham's Razor tells me.... by feronti · · Score: 1

      How do you measure whether you're on schedule to deliver the deliverable on time? A good metric allows you to make predictions prior to completion. Otherwise, what's the point in measuring it at all?

    93. Re:Ockham's Razor tells me.... by slmdmd · · Score: 1

      There is a big misconception here, the 35k/year are not h1bs they are L1 s.
      I am an h1b sysadmin. Here is the deal - my vendor gets paid 95 an hour, a manager takes 5 from it, then an agent in between takes 33, my pimp(h1b employer) takes 13(20%), then I get 44 per hour. If there is a slow down in market I will be out of job because we are the most expensive from client's prespective. I am bound in this arrangement with my pimp till I get a GC card which takes about 4 to 8 years. I am working at a place where there are L1's from an indian company who are absolute dumbos, they get training in clicking a gui and are shipped here. There are dumb h1bs too, who manage to secure jobs by faking resume but also keep getting fired in 2 weeks when discoverd. So, US citizens always have an advantage over any h1b guy. Only when it is outsourced to a company bringing in L1's, only then both citizens and h1b s are affected and usually h1b s are first in the firing line. For example, In this client company I replaced an L1 sysadmin guy because he was too dumb. But now I am being forced to train an offshore guy belonging to the indian company in PERL scripting. I just hope that this client will at least honor the remaining 10 months of my 1 year contract. -- Life is just a dream and current dream is "Corporate Slave".

    94. Re:Ockham's Razor tells me.... by MarkvW · · Score: 1

      You were responding to either a troll or somebody so dense that any amount of persuasive reasoning could ever penetrate.

      But I surely agree with your point!

    95. Re:Ockham's Razor tells me.... by MeditationSensation · · Score: 1

      Umm, your reply has nothing to do with the parent post.

    96. Re:Ockham's Razor tells me.... by agbinfo · · Score: 2, Insightful

      how is "deliverables" a stupid metric. Either you deliver a working solution/program on time or you don't. Thats the deliverable.

      Let's see, what is the deliverable again? a working solution? What about maintainability? flexibility? What if the person had to mentor others when trying to deliver the product? What about managing priorities? providing useful and easy to maintain unit tests? documentation? What about team work and consensus in trying to achieve that working solution? What about raising issues early?

      What ever the metric you use, it might be a fine tool to measure progress of the project. Just don't use it to measure productivity of individuals or you'll end up with programmers that meet their objectives and only their objectives.

    97. Re:Ockham's Razor tells me.... by hercubus · · Score: 2, Interesting

      At my last job, I wrote a perfectly good perl loader...

      during my entire working life managers have been trying to replace "coders" with tools that don't need a skilled operator (just point and click!)

      they (mgmt) probably were more interested in getting rid of their dependency on you (or someone like you) rather than just Perl

      and i don't know if they're right or not. do companies with super-skilled cadres of developers always win out over competitors with retrained VB code monkeys?

      often i hear about companies being taken over (i.e. they "lost") and the IT staff cannot believe how messed up the parent's IT infrastructure is

      --
      -- How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
    98. Re:Ockham's Razor tells me.... by mr_mischief · · Score: 1

      Which of the many object systems for Perl have you used?

      There are regular, ordinary, blessed hash objects. Then there are many more.

      You might want to look up Moose and Object::InsideOut on CPAN Search.

      There are also Object::Declare, Object::Prototype, Class::Dot, and others which are less widely used.

      In Perl, TIMTOWTDI, and you can probably find one that you like if you're willing to look. Just be careful who else's code you have to maintain, because they might have taken TIMTOWTDI too far and use a way that's better left not done.

    99. Re:Ockham's Razor tells me.... by mr_mischief · · Score: 1

      Since you think that Perl has pointers, your opinion of the language should be taken with a grain of salt. It has references, but not pointers. There are substantial differences despite that there are similarities. Besides, if you're writing with accessor and mutator methods nobody cares what the inside of the object uses for a data structure.

    100. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      ...and now a word on APL.

    101. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      What are you talking about? How are a project specification and a deadline "subjective"?

      I think you don't know what "subjective" means. (It means that the "thing" we are talking about is the subject in a context, not the object the subject acts on).

      Ayn Rand didn't invent that word -- indeed, 'object' and 'subject' have interchanged their meaning since medieval scholars worked on the subject-object problem -- and it doesn't mean "opinion" or "personal". The closest use in that sense is in epistemology, in discussions of the subject-object problem, which makes some actions and opinions subjective, in virtue of the fact that they are the subject's, and some others objective, in virtue of the fact that they belong to the object the subject acts on.

    102. Re:Ockham's Razor tells me.... by wmwilson01 · · Score: 2, Funny

      ...followed by: "Well, how the hell do you know there's a river?"

    103. Re:Ockham's Razor tells me.... by cjonslashdot · · Score: 1

      I agree. PERL lacks encapsulation: it is impossible to tell at a glance what the inputs and outputs are. And PERL's syntax is cryptic. PERL is one of the hardest to maintain languages there is, once the developer leaves. It leads to key person dependencies. I have seen organizations struggle with the PERL problem.

    104. Re:Ockham's Razor tells me.... by sorak · · Score: 1

      There are other ways to spin what you just said:

      It requires users to be smart - It is difficult to work with.

      A 35k/year employee cannot do it - What you save in software costs will more than be absorbed in labor costs.

      Others Get To See the Code - There are security concerns.

      It doesn't make the management look good - If you go this direction, you will have to fight your boss to give you a product that makes your job more difficult.

    105. Re:Ockham's Razor tells me.... by poopdeville · · Score: 1

      I beg to differ. I think that how perl handles OO is one of the most elegant ways I've seen any language to it.

      I don't disagree exactly, but Perl's OO isn't exactly straightforward. And the baroque syntax makes for a lot of seemingly pointless boilerplate (until you get "special cases" like references -- stuff that has been abstracted out of other OO languages.

      On the plus side, while Perl OO is missing some relatively nice features out of the box (simple accessor syntax, for example), it is relatively easy to add it (e.g. MethodMaker, Class::Class, etc).

      All in all, the SmallTalk/Ruby/Objective-C approach is better, and I would definitely rather work in any of those. But Perl is fine and pays my bills.

      --
      After all, I am strangely colored.
    106. Re:Ockham's Razor tells me.... by charlesj68 · · Score: 1

      Amen. Crappy requirements and crappy practices create crappy code. The shape of the hammer plays little role.

    107. Re:Ockham's Razor tells me.... by dintech · · Score: 1

      when there was a more obscure way to do something, but it saved two characters of code, the PERL programmer would do it.

      If you think perl programmers are bad for that, wait 'til you see q programmers...

    108. Re:Ockham's Razor tells me.... by BradleyAndersen · · Score: 1

      Computer Science and Perl Programming, ISBN:: 0-596-00310-2

    109. Re:Ockham's Razor tells me.... by kthejoker · · Score: 1

      Complaining about PHP function-naming is the cliche response from "I don't know what I'm talking about" people.

      It makes me take you less seriously, not more.

    110. Re:Ockham's Razor tells me.... by jacquesm · · Score: 1

      > it leads to key person dependencies

      And that, in one line is what it really is all about and what makes the difference between a language that will thrive in the corporate environment and one that you should avoid at all costs.

    111. Re:Ockham's Razor tells me.... by rk · · Score: 1

      Python and Ruby also tend to offend the client IT teams standards folks, who aren't quite sure about this new-fangled stuff.

      If they think Python is new-fangled, tell them it's only four years younger than Perl (1991 vs 1987), and older than the first release of Microsoft SQL Server for Windows. :-)

    112. Re:Ockham's Razor tells me.... by CrazedWalrus · · Score: 1

      I saw this in several of the people involved, where they overuse the word "just." Oh, why write loader scripts when we can just use business works? They get the impression that some tool suddenly makes the job into a no-brainer, non-event that can be done in fifteen minutes.

      There are two big problems:

      1. There is very seldom a "just" involved in data processing in large environments. Why? Because you have yourself a large, mature system that was not designed around the feed you're bringing in. You now need to adapt the vendor/client view of what this data is and convert into what your system's idea of it is.

      Sometimes, yes, it's a simple bcp into a table, run a stock stored procedure, and you're done. In my experience, that doesn't happen very often. The load processes of the banks where I've worked are frequently complex and disjointed, and you're always going to wind up with custom code above and beyond what comes in the box with these ETL tools. Do they save a few steps? Potentially, but they're the simple steps that you could have done easily and with better performance.

      2 When managers think something is going to be easy, they make promises that their people have a hard time keeping. In my professional career, I am always careful not to use the word "just", because it usually means I'm glossing over something. As we all know, the devil's in the details, and that's where your stress levels go up, and your projects go over time and over budget. This tends to make people think I'm overcomplicating things, but the problem is really that they are oversimplifying.

      So really, the problem becomes cultural as well.

    113. Re:Ockham's Razor tells me.... by dintech · · Score: 1

      When you're finished. On time.

    114. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      I can see the PHB now: "Good grief, that is from way back in 1998!"

    115. Re:Ockham's Razor tells me.... by computational+super · · Score: 1
      "Give me a schedule with some deliverables

      and the schedule can be anything you want, as long as it says 'done by next Tuesday'. Good thing it costs me the same whether you work nights and weekends or not, isn't it!"

      --
      Proud neuron in the Slashdot hivemind since 2002.
    116. Re:Ockham's Razor tells me.... by my_left_nut · · Score: 1

      followed by: "Sounds like you don't want the job, we'll find some other sucker^H^H^H^H^H^H^H^H^H^H^H^H^H one else to do it"

    117. Re:Ockham's Razor tells me.... by rk · · Score: 4, Insightful

      Lord, I thought the bless thing was a pain, and now you're telling me that there's at least FIVE different CPAN thingys that give me a way to do object-oriented Perl development? Perl's been on my "avoid" list for years now, and what you've revealed to me scares me to my very core, and only further cements my desire to continue avoiding it. It was great in the early-mid 90s as a way to make interactive web apps, and it fit really nicely into that "need more power than a shell script, but C is overkill" niche, but now? Perl sounds like the MCP from Tron, absorbing all functions into it. :-)

      Since there are at least five of them, something tells me that the odds are decent that at a given Perl shop, some genius thought they all sucked and rolled his own all-singing, all-dancing object model. The net result is basically nobody can now claim to be truly knowledgeable about object-oriented development in Perl.

    118. Re:Ockham's Razor tells me.... by fishbowl · · Score: 1

      >Not every coder wants to be in an "authoritative role", shuffling paperwork and kissing toads. There's more to life than money and power. Self-respect,
      >for one thing.

      And you'd advocate throwing a low-ish level job away because you've staked it all on whether or not to use *perl?*

      Your call man. I'd suggest a lot of people are making excuses, and have not so much actively avoided taking on authority, but have not had it offered.

      --
      -fb Everything not expressly forbidden is now mandatory.
    119. Re:Ockham's Razor tells me.... by quanticle · · Score: 1

      And that's the main disadvantage of TIMTOWDI. You end up with two or three poorly maintained libraries and insufficient documentation, versus one well documented, extensible framework.

      --
      We all know what to do, but we don't know how to get re-elected once we have done it
    120. Re:Ockham's Razor tells me.... by rk · · Score: 1

      Tools do matter, though, and I always thought of Perl as a Swiss Army knife, a handy portable tool to let you quick field maintenance stuff, but no replacement for a set of good purpose-built hand and power tools if I want to make fine cabinetry or musical instruments.

    121. Re:Ockham's Razor tells me.... by xelah · · Score: 1

      'Deliverables on time' is a stupid metric of a programmer's performance because there is no standard size and quality of 'deliverable' and no unbiased way to determine 'on time'. How do you distinguish between the productivity of the programmer/environment/tools and the accuracy of the estimate of what 'on time' is?

      If you're measuring a project as a whole it's more sensible because the project manager is responsible for both the estimate and the development work...but even then you might want a way to measure progress, and a way to tell the difference between low development productivity and poor estimation.

    122. Re:Ockham's Razor tells me.... by Intron · · Score: 1

      "What is wrong with you Perl programmers? Does the thought of a newline or indentation, possibly even whitespace fill you with fear and horror?"

      It does when the compiler considers it significant.

      --
      Intron: the portion of DNA which expresses nothing useful.
    123. Re:Ockham's Razor tells me.... by quanticle · · Score: 1

      While crappy requirements can create bad code in any language, perl makes it possible for one to have bad code even with good requirements. As for practices, well, you can produce readable assembly if your practices are strict enough and your programmers are disciplined enough. One of the main factors in language choice is how much work one has to do to enforce best practices. Good languages can enforce best practices without seeming overly limiting. Perl fails that test.

      --
      We all know what to do, but we don't know how to get re-elected once we have done it
    124. Re:Ockham's Razor tells me.... by nabsltd · · Score: 2, Informative

      How do you measure whether you're on schedule to deliver the deliverable on time?

      Simple. The "deliverable" is "Module Foo". The metrics to measure are:

      • Module Foo: coding complete
      • Module Foo: code review complete
      • Module Foo: unit testing complete
      • Module Foo: integration testing complete

      When you defined any deliverable, you allocated resources (people and days) to each of the steps in creating the deliverable, based on the requirements. This is how you know what answer to give when the client asks "how long will it take and how much will it cost to add the 'Foo' capability to the project?"

      • Foo coding: Joe & Bob, 10 days
      • Foo code review: Fred (with Joe & Bob), 3 days
      • Foo unit testing: Mary & Bill, 3 days (concurrent with code review)
      • Foo integration testing; Mary, John & Max, 5 days

      Although there are various ways of interpreting "on schedule", at least this lets you know that about 3 weeks from start, you should be damn near done with "Foo".

    125. Re:Ockham's Razor tells me.... by David+Greene · · Score: 4, Insightful

      Right on. This is the real problem with Perl. Everyone rolls their own and we end up with multiple reimplementations of the same concept done in sometimes subtly different ways.

      CPAN is one of my worst nightmares. There's no peer review so one ends up looking at several different libraries that do the same thing, only they all do it differently and have varying levels of feature complexity. I just want to get work done, not evaluate libraries.

      --

    126. Re:Ockham's Razor tells me.... by Intron · · Score: 1

      Yeah. But with PHP I can't get go dahntahn and get a sanwich and a cold Iron at Primanti's, now can I?

      --
      Intron: the portion of DNA which expresses nothing useful.
    127. Re:Ockham's Razor tells me.... by mr_mischief · · Score: 1

      So, Perl 5.8.5 to 5.8.8 and 5.10.0 are not incremental improvements?

      5.8.5 was released in July 2003, and 5.8.6 was released in November of that year. 5.8.8 wasn't until January of 2006.

      5.10.0 wasn't until December of 2007. The unstable development branch of 5.9 ran up to 5.9.5 in the meantime. The current iterative, incremental improvement is less than 9 months old.

    128. Re:Ockham's Razor tells me.... by mr_mischief · · Score: 1

      If you can't read the code you're not very good with the language or the person who wrote the code isn't very good with the language. Writing clean, maintainable Perl takes some discipline. It's not the language's fault that people lack discipline.

    129. Re:Ockham's Razor tells me.... by mr_mischief · · Score: 1

      Worse than obscuring, too many comments easily get out of sync with the code and become downright misleading.

    130. Re:Ockham's Razor tells me.... by FrozenFOXX · · Score: 5, Funny

      All Perl needs is a shiny new catch phrase... Perl on Rails? CloudPerl? Extreme Perl? Perl#?

      How about "Perl Necklace?"

      --
      "Just a fox, a whisper."
    131. Re:Ockham's Razor tells me.... by nmb3000 · · Score: 1

      All Perl needs is a shiny new catch phrase...
      Perl on Rails?
      CloudPerl?
      Extreme Perl?
      Perl#?

      Perl.NET

      --
      "What do you despise? By this are you truly known." --Princess Irulan, Manual of Muad'Dib
      /)
    132. Re:Ockham's Razor tells me.... by bubulubugoth · · Score: 1

      whoooosh!

      Is a sysadmin, talking about no to coding and yes to scripting...

      The java thing was a joke.

      --
      Â_Â
    133. Re:Ockham's Razor tells me.... by mopower70 · · Score: 1

      You can't be serious. If you sit down to write or even plan a single line of code without having a goal, you're probably the one writing the unmaintainable code that has turned corporations off of Perl. A deliverable, by any rational definition, is a measurable step in the process of achieving the goal set out at the beginning of the project. It is the polar opposite of subjective and can be very specifically and objectively defined. Were it not, it couldn't be "delivered" and therefore by extension not really a "deliverable."

    134. Re:Ockham's Razor tells me.... by gardyloo · · Score: 1

      I see you're actually an experienced programmer and not a recent graduate. How do I know this? I see no mention whatsoever of "comments" or "documentation". Commendable!

    135. Re:Ockham's Razor tells me.... by richardchaven · · Score: 1

      Agreed. Attitude is everything. I've seen Object Pascal code that was spaghetti crap. My (rare) PERL stuff was completely readable because of comments and function names that actually described what they did. "Real" PERL coders would have laughed... I find that those who were around before objects and learned Structured Programming make better OO coders because we know why objects are good; we appreciate them. We are the antithesis of Ex.P. because we respect the next person to read the code (e.g. ourselves) enough to make it readable.

    136. Re:Ockham's Razor tells me.... by Domini · · Score: 1

      Using a mouse to do things not macho enough for you?

      It's because of statements like that and attitudes that accompany it that perl does not take a foothold.

      Just because it's fun to hack with and even the most clearly written and best managed perl code still is not as re-usable and maintainable as python for example. I've worked in many large and medium companies doing programming in various languages. Sometimes I wrote from scratch, sometimes I had to maintain someone else's code.

      OO is what all new graduates do well. If a company wants their software to be supported in the future and not be reliant on some bearded genius with a penchant for megalomania, then the code needs to be easily understood by anyone or they can be held hostage.

      So OO it is, and (like C++) perl's OO implementation is more tacked-on than designed into. It feels, looks and works cumbersomely. Perl is wonderful for scripting and glue (swig, testing, etc). For for a large project I will always choose python.

      I've done C++ for around 15 years, perl for about 10, python for 5. I like to use languages I'm comfortable with as well... I fear using new languages and methodologies. But I try and overcome this fear and evaluate them to their potential and not reject them because they're "shiny pointy clicky"

      I do not believe that programming should be easy enough for marketers and managers to understand, not because I fear for my tiny little bit of job-security, but because I really believe they are not trained to be able to write structured code... and bad languages make bad coders worse.

    137. Re:Ockham's Razor tells me.... by slave+6742 · · Score: 1

      Perl 6i or is that now i6 ? Need the i somewhere to keep consistent with the buzzwords these days.

      --
      HGTTG: "I knew that there was something fundementally wrong with the Universe."
    138. Re:Ockham's Razor tells me.... by Amouth · · Score: 1

      it may be a joke - but you can't take chances like that..

      friends don't let friends java

      --
      '...if only "Jumping to a Conclusion" was an event in the Olympics.'
    139. Re:Ockham's Razor tells me.... by immcintosh · · Score: 1

      A sagely programmer once said: Perl, the only language that looks the same after being compiled.

    140. Re:Ockham's Razor tells me.... by Domini · · Score: 1

      Yep, It's that mocking, condescending attitude of (bearded) PERL programmers that is causing corporates to shun it.

      It's more important for me to add value to a company. I'm a great C++ programmer and a good Perl one. Yet I would not mind using C# rather and would definitely choose python over perl for certain clients just because I feel it would empower my client and transfer real value.

      Even though I believe corporates should not program, it always makes them feel better if they can look at the code and understand it.

      It's not about making myself happy by writing technically cool code, but making myself happy to have delivered something that makes my client feel secure.

      So even if you are writing readable perl code, that is not enough... if you are working in a large corporate on a large project, then your little part of perl code will not save the rest.

      I think Perl's demise will be due to 50% marketing and 50% technical difficulty.

    141. Re:Ockham's Razor tells me.... by Lord+Ender · · Score: 1

      Your pedantry isn't too impressive. The result is the same. In a modern very-high-level language, if you want a non-trivial datastructure, like a hash of arrays, you just declare a hash of arrays. Not so in perl. There you have to use a hash of references to anonymous arrays. And when you access that stuff you have to dereference everything (using the ugliest syntax Mankind ever conceived).

      Go ahead and whine that there is a technical terminology difference between pointers and references, but that doesn't change the fact that they are a terrible language "feature," regardless of the name.

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    142. Re:Ockham's Razor tells me.... by discord5 · · Score: 1

      an explosion at the punctuation factory

      That reminded me of brainfuck, while not exactly punctuation it does look like an explosion

    143. Re:Ockham's Razor tells me.... by Bedemus · · Score: 1

      Heheh, nice. ;)

    144. Re:Ockham's Razor tells me.... by UnknowingFool · · Score: 2, Funny

      When I thought about learning perl, I looked up some sample scripts on the internet. At first I thought the code was corrupted or possibly encrypted. But it wasn't:

      while (/(<\/[^>]+>)|(<[^>]+>)|([^><]+)/go) {

      That's when I decided not to learn perl.

      --
      Well, there's spam egg sausage and spam, that's not got much spam in it.
    145. Re:Ockham's Razor tells me.... by nidarus · · Score: 1

      Could you elaborate? You don't think it's a problem?

    146. Re:Ockham's Razor tells me.... by Bedemus · · Score: 1

      Not that I really care about whether one commenter takes me seriously, but you raise an interesting point.

      I can only assume by this that you're referring to the way that PHP's creators insist that they're adhering to function over form, stealing and borrowing ideas from other languages and APIs, and often exposing the functions of the underlying libraries without modification.

      I guess all I can really say to that is that when you take that approach to an extreme, then you're left with nothing approaching a programming language at all.

    147. Re:Ockham's Razor tells me.... by slippr · · Score: 1

      Well, most languages now have very similar regular expression support. So what you're really saying is that you don't understand regular expressions. Not a fault of Perl I feel.

    148. Re:Ockham's Razor tells me.... by synthespian · · Score: 1

      Oh oh. Another one who hasn't read the book on Perl and OOP...Because if you had, you would see Perl's OOP is "bolted on" just coz it can.

      There's flexibility for you.

      By I'm not crossing my fingers, hoping you get it.

      --
      Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
    149. Re:Ockham's Razor tells me.... by synthespian · · Score: 1

      Yes, BOO!, go away!

      --
      Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
    150. Re:Ockham's Razor tells me.... by noname444 · · Score: 1

      You mean 0 and baseclass pointer.

    151. Re:Ockham's Razor tells me.... by Danny+Rathjens · · Score: 2, Insightful

      No, we'd simply mock you for calling it "PERL" instead of "perl". :) But seriously, professional perl programmers are well aware that perl golf (accomplishing something with the smallest number of keystrokes) and writing professional working and maintainable code are two entirely different endeavors. The fact that you don't think so, and that you call it PERL, indicates you haven't really been a part of the perl community or encountered many professional perl programmers.

    152. Re:Ockham's Razor tells me.... by synthespian · · Score: 0, Flamebait

      How about the braindead attitude of people talking thing out of their assholes, like uh, regular code is more readable and sigils are unreadable.

      How do you know? HOW do you know that?!

      Until somebody comes along with a thorough investigation in the cognitive aspects of programming, I will argue that regular code turns your brain off, because it's tedious and sigils provide "hooks" for attention and improve cognition by compacting and abstracting a lot of things.

      I am not talking about "obfuscated Perl" - just like we normally don't talk of "obfuscated C" in the wild - that would be *so* dishonest (yet a lot of people wann play that card in an argument).

      Now, I am just venting things out of my ass, but to me, it smells better than yours.

      --
      Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
    153. Re:Ockham's Razor tells me.... by synthespian · · Score: 1

      Yes, Python is so sane, like confounding mutation and equality. And Ruby...so well designed they haven't even sorted out namespaces yet (have they? I don't follow Ruby).

      Perl 5, OTOH, had closures so now there are like 5 object systems, going from vanilla to MOP-like.

      You know, the problem is that the level of programmers is appalling. And I'm talking about the ones out of colleges. If mechanical engineers were like that we'd all be dead.

      --
      Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
    154. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      They say you can write $AnyLanguage in Perl if you really want.

      However, if you want to take advantage of Perl's strengths, you need to understand the Perl ways of doing things.

      For example, sorting a list of "Person" objects by Age and Location:

      my @sorted_people = sort {
          $a->Age . $a->Location cmp $b->Age . $b->Location
      } @unsorted_people;

      Now, say you only want people from Wyoming:

      my @sorted_people = sort {
          $a->Age . $a->Location cmp $b->Age . $b->Location
      } grep {
          $_->Location =~ m/Wyoming/
      } @unsorted_people;

      Now, say you wanted to document what was going on here:

      my @sorted_people = sort {
          # Sort by Age *then* Location:
          $a->Age . $a->Location cmp $b->Age . $b->Location
      } grep {
          # We only want people from Wyoming:
          $_->Location =~ m/Wyoming/
      } @unsorted_people;

      And finally, say you want to Frobnicate() all of those people:

      my @frobnication_results = map {
          # Frobnicate this individual:
          $_->Frobnicate()
      } sort {
          # Sort by Age *then* Location:
          $a->Age . $a->Location cmp $b->Age . $b->Location
      } grep {
          # We only want people from Wyoming:
          $_->Location =~ m/Wyoming/
      } @unsorted_people;

      Writing the above in Java, C#, Python or Ruby could take a half hour or more. In Perl, it's a 1-liner.

    155. Re:Ockham's Razor tells me.... by emilper · · Score: 4, Insightful

      what's not obvious in that line ?

    156. Re:Ockham's Razor tells me.... by emilper · · Score: 1

      real Perl programmers would not laugh at readable code ... most of the CPAN modules are quite readable.

    157. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      I've tried to 'repair' a broken perl app and indeed it was much quicker to toss it and rewrite.

      Perl is worse than 'mumps' and that's saying something.

      That's right, kids, it's "spot the logical fallacy" time again! You may find this paraphrase helps:

      On one occasion, I had a problem with a single program written in a certain programming language. Therefore, the programming language sucks.

      For extra fun, try to work out how the parent got modded "insightful". Your hint: "crack".

    158. Re:Ockham's Razor tells me.... by emilper · · Score: 1

      what are you going to to when you need a hash of arrays of hashes ? Or a sorted (or sortable) hash of anything ?

      Perl allows you to be as strict as you want, and as lax as you want. Anything else is just project management.

    159. Re:Ockham's Razor tells me.... by Underfoot · · Score: 1

      Yin's Guys goin' dahntahn to see 'em Stillers an dat? Yins got frech fries on da salad at Primanti's?

      --
      I mentioned tinker-toys once in a post - now I'm modded down for life.
    160. Re:Ockham's Razor tells me.... by mr_mischief · · Score: 1

      If only there was somewhere to rate CPAN packages...

      Also, there are comp.lang.perl.misc and comp.lang.perl.moderated for Usenet, PerlMonks, Use Perl;, Perl.com, and many IRC channels, books, and mailing lists.

      There are specific threads on Perlmonks about how to make it easier to choose which object-relational mapper, which text templating system, which web application framework, which object system, which date and time modules, and which modules for any given task.

      Anything you want to do has two or three more popular, better documented ways with more community support and a host of other ways just in case. The community does a very good job of recommending one or two over the others.

    161. Re:Ockham's Razor tells me.... by IntlHarvester · · Score: 1

      I'm not sure where all the languagism comes from. Perl has a bad rap, period, though. It seems like everyone has seem some lousy perl code somewhere. Does that make perl bad? Not really, it just seems like perl really lends itself well to it.

      It is a direct result of the 'culture' surrounding the language. Of course Perl can be written in a maintainable way, but most of the online discussions seem to focus on the 'kewl' line-noise stuff and how to exploit the most obscure features.

      Web projects especially tend to be done in an ad-hoc manner by largely self-taught programmers, most don't have the engineering culture which surrounds C++. So therefore when a language gives a lot of freedom, the result is massive variability in style from different programmers. And corporations especially hate that.

      Also, Perl has been on the way out since the dot-com bust. So once again Slashdot is keeping up with the timely news.

      --
      Business. Numbers. Money. People. Computer World.
    162. Re:Ockham's Razor tells me.... by mr_mischief · · Score: 1

      You'll probably never see more than three object systems for Perl in use, and no more than two in the same shop.

      Which two is a more open question. It's almost certainly two of the traditional blessed hash variety, Moose, and Object::InsideOut. Those are the ones people recommend and that have been widely adopted.

      How many different ways do you think structures and unions have been coerced into acting as object systems in C, not even counting C++, Objective C, C#, D, and Java as C-family languages?

      Moose is basically the Perl 6 object system ported back to Perl 5. It's the new standard way to do things, but it'll still be possible to do something else.

      Perl 6 will try to appease the OO syntax goons who keep chanting "the dot is the way, the dot is here to stay", too. We're getting a new concatenation operator so everyone else won't have to deal with '->'.

      Take a look at Perl 6 even if you don't like Perl 5. It's meant to be a new language in the Perl family, retaining only the best of Perl 3 through Perl 5.

    163. Re:Ockham's Razor tells me.... by mr_mischief · · Score: 3, Insightful

      my %hash = ( [ 1, 2, 3 ], [ 4, 5, 6 ] );

      My, that's awfully ugly, isn't it?

    164. Re:Ockham's Razor tells me.... by richardchaven · · Score: 2, Interesting

      my PERL code looks like Pascal: descriptive variable names; breaking evaluations and operations into intermediate steps; king-pinning functions. For example, I name the iterating variables in "for" loops 'counter', not 'i'

      Some Delphi programmers think I'm too descriptive.

    165. Re:Ockham's Razor tells me.... by Tweenk · · Score: 1

      Nah, it's on overloading the comma and logical or operators to align widgets in a dialog.

      Dialog &dlg = (widgetA, widgetB, widgetC) | (okButton, cancelButton);

      BTW: I like C++ very much, but its main fault is that it tends to alienate crappy programmers naturally as they totally fuck up their projects and requires more careful design - and we know that careful design and experienced programmers is not something that corporate environments are known to have in abundance...

      --
      Those who would give up liberty to obtain working drivers, deserve neither liberty nor working drivers.
    166. Re:Ockham's Razor tells me.... by Fulcrum+of+Evil · · Score: 1

      yeah right - that's like eiffel.net: chop pieces off until it fits the .net box.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    167. Re:Ockham's Razor tells me.... by hostyle · · Score: 1, Funny

      I hear you. All these multi-various linux distros suck too. There should only be one true way ...

      --
      Caesar si viveret, ad remum dareris.
    168. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      > So they might try to have it reprogrammed in something popular (Visual
      > Basic? *evil grin*)

      Hey, there's nothing wrong with VB. I submit that there's something wrong with a lot of people that code VB, but VB.NET in-and-of itself is fine. Of course, even though I believe that wholeheartedly, I'll still post anonymously. This is slashdot after all.

    169. Re:Ockham's Razor tells me.... by spiralx · · Score: 1

      In C#:


      var sortedPeople =
          from p in unsortedPeople
          where Regex.IsMatch(p.Location, "Wyoming")
          orderby p.Age, p.Location
          select Frobnicate(p);

      Hmm, not so difficult eh?

    170. Re:Ockham's Razor tells me.... by Fulcrum+of+Evil · · Score: 1

      Implied scalars go away when you put use strict; at the top of your scripts. Also, "there's more than one way to do it" is far better than "my way or the highway" that you find in pascal. I like python, except for the stupid indentation based scope.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    171. Re:Ockham's Razor tells me.... by hostyle · · Score: 0

      HEAD

      --
      Caesar si viveret, ad remum dareris.
    172. Re:Ockham's Razor tells me.... by hostyle · · Score: 0

      while (/(<\/[^>]+>)|(<[^>]+>)|([^><]+)/gtfo) {

      --
      Caesar si viveret, ad remum dareris.
    173. Re:Ockham's Razor tells me.... by Fulcrum+of+Evil · · Score: 1

      that's fine. I didn't need malaria anyway.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    174. Re:Ockham's Razor tells me.... by Fulcrum+of+Evil · · Score: 1

      Every new language we add is another item I have to add to our job listings and narrows my potential pool of candidates.

      You're doing it wrong!! (!!!). Any dev worth his paystub should be able to deal with perl and python if it isn't insane. dunno about CF - it's expensive to learn and doesn't seem to have much value add over JSP/spring.

      Not suggesting PERL coders are strange...well, maybe a little. :)

      Maybe a lot...

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    175. Re:Ockham's Razor tells me.... by VoidEngineer · · Score: 1

      Obviously, you've never worked with MUMPS (aka, the "M" programming language). Grandparent post is actually being serious, and it's not a sample of a user having problems with a single program. *Every* program in MUMPS is like that. Most obfuscated messed-up programming language i've ever had the misfortune of having to support.

    176. Re:Ockham's Razor tells me.... by Intron · · Score: 1

      At Primanti's they serve the fries and coleslaw IN the sandwich -- saves on utensils. It opened around midnight for the truckers bringing in produce and closed before dawn. We found out about them as the best place to get great food cheap in the middle of the night when I was in college. Even better than Mineo's pizza in Squirrel Hill. These days they are even open at lunchtime.

      Once Brady's foot is amputated, the Stillers are gonna kick ass this year. I heard Eli Manning's voice is changing and Bret Favre's walker has a broken wheel.

      --
      Intron: the portion of DNA which expresses nothing useful.
    177. Re:Ockham's Razor tells me.... by StikyPad · · Score: 1

      You lost me after "while".

    178. Re:Ockham's Razor tells me.... by Nefarious+Wheel · · Score: 1

      Not necessarily true. "Deliverables" are often based on very real goals, especially in investment banking. Sometimes a deliverable is a hard deadline, such as "must be able to report interest earned on portfolio by (date) or you will face fines from taxation authority". That's hardly a subjective goal.

      --
      Do not mock my vision of impractical footwear
    179. Re:Ockham's Razor tells me.... by emilper · · Score: 1

      Do you need a job ? ...

      Oh ... don't bother ... I checked out the requirements for visa and work permit and you need to be a mix of Bill Gates and Randal Schwartz to get in ...

    180. Re:Ockham's Razor tells me.... by DragonWriter · · Score: 1

      Well, most languages now have very similar regular expression support.

      Most languages with similar regular expression support make it much more clear what you are doing with the regex, even if the regex itself looks pretty similar.

    181. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      Why are you being so stupid about this? Anarchy does not work in business, though you seem to be arguing that it does. In any case, spare us the multitude paragraphs of semantics belaying that point.

    182. Re:Ockham's Razor tells me.... by tacocat · · Score: 1

      And you don't think you can do this in Ruby?

      If you are good at your language, obfuscation is trivial. If you suck, it's all obfuscated code.

      And what might be a simple closure to some may appear as obfuscation to others. I think most practical code that is used for business purposes is not obfuscated except to those who do not understand the language.

    183. Re:Ockham's Razor tells me.... by tacocat · · Score: 1

      You are confusing Perl with Regular Expressions. You don't understand Perl and you probably don't understand Regex either.

      Many languages use Regexes and when you do, you quickly realize that what appears obscure speaks volumes and is completely independent of the langauge.

      Ruby uses Regex, but they seperate the Regex from the language more than Perl. I don't like it - -it's too verbose, but it has it's reasons. But once you understand regex, you can start writing a lot of code in it because it's fast, accurate, and easy to use. But you have to actually understand the language of regular expressions first.

    184. Re:Ockham's Razor tells me.... by chromatic · · Score: 1

      Perl is a write-only language. Larry Wall knows this, and that's why he's spent so many years trying to make [Perl 6] a clone of Ruby.

      I don't believe you know a thing about Larry Wall, Perl 6, or Ruby -- not after a statement like that.

      Would you care to make a list of features that Perl 6 has "borrowed" from Ruby? (Would you care to make a list of language features first seen in Ruby? I can. It's awfully short.)

    185. Re:Ockham's Razor tells me.... by chromatic · · Score: 1

      Python forces people to do things sanely.

      Oh, you're one of those people. How does Python force people to choose meaningful identifiers, or to factor their code into loosely-coupled units, or to remove extraneous code, or to reduce duplication, or to model the problem domain accurately, or to write effective tests, or to avoid overlong compilation units or... well, there are a lot of things more important to maintainability than indentation.

    186. Re:Ockham's Razor tells me.... by richardchaven · · Score: 1

      you need to be a mix of Bill Gates and Randal Schwartz to get in ... Oh, I am! Not a full-strength mix, mind you

    187. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      I used to live near Detroit, MI. It's a great city, with great people. But it has cars. LOTS of cars. 446,000 to be exact. More cars than Milan, Italy. I used to joke that it was like we built a small town at the center of three highways as highways were a primary means of transporting goods, then were taken completely by surprise when the cars grew.

      I only mention this because that's kind of how I think of PHP. A good community, with a ton of nice people who have nothing but the best of intentions. Yet, when I compare PHP to something like Perl or Ruby, I always come away feeling like PHP just kept tossing together cars as it grew, without taking a step back and looking at the big picture.

    188. Re:Ockham's Razor tells me.... by mcrbids · · Score: 1

      Hello regex. Something that, until you've tasted it, you have no idea what you're missing. It's like trying to talk about mind-blowing, multiple-orgasm sex to a virgin.

      Expressions maketh so many problems doth appear so simple, once you learn the syntax of its incantations. And it's hardly fair to bring up a pattern match looking for html-style tags... I rarely touch perl, but I use the perl regex syntax all the time with PHP's preg_.... functions.

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
    189. Re:Ockham's Razor tells me.... by robfoo · · Score: 1

      Only on slashdot would you find someone equating 'mind-blowing, multiple-orgasm sex' to.. regular expressions.

    190. Re:Ockham's Razor tells me.... by agbinfo · · Score: 1

      Anarchy does not work in business, though you seem to be arguing that it does.

      No I'm not.

    191. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      It's all about getting programmers who know how to write maintainable, well-designed code.

      Those cost money.

    192. Re:Ockham's Razor tells me.... by Ant+P. · · Score: 1

      If you're looking for simple code, you won't ever find it in a HTML parser script.

    193. Re:Ockham's Razor tells me.... by Grey+Haired+Luser · · Score: 1

      > my %hash = ( [ 1, 2, 3 ], [ 4, 5, 6 ] );
      > My, that's awfully ugly, isn't it?

      Yes. It's *unbelievably* ugly.

      Any programmer with a sense of esthetics will
      be able to tell you why.

    194. Re:Ockham's Razor tells me.... by CrazedWalrus · · Score: 1

      So do incompetence and consequences of bad decisions.

    195. Re:Ockham's Razor tells me.... by CrazedWalrus · · Score: 1

      I'm not sure when computer programming became a "macho" activity, but whatever.

      I've worked with shiny pointy clicky before this experience. I worked for a telecom a while back where I worked on their VRU. The programming interface was drag and drop icons that you'd fit together on a grid and fill in a properties sheet. Rows in the grid were a set of instructions, and branches with conditionals or gotos would take you to a different row on the grid.

      Apart from the annoyance of having "code" that required constant horizontal scrolling, this system was also a constant source of problems. You couldn't tell what the thing was really doing under the hood, because all you had was essentially a spreadsheet with a bunch of pictures on it.

      That's surprisingly difficult to debug. It looks like a kindergarten kid should be able to do it, but the trouble is that the lanugage hid too much from you. All "If" icons looked the same, and you had to double-click them to see what they were testing. All "Dial" icons looked the same, and you had to click on it to see what number it was calling. So debugging was a real bitch.

      The real problems came in when there were system problems. For all of its abstraction and pointy clicky, this thing was or course, a Windows system. So now you're working on an operating system whose claim to fame is that it hides the complexity from the user. That's all well and good, but as a developer who's having hangs and reboots twice a day, I friggin want to see that complexity so I know where things are going wrong.

      That particular problem, by the way, was caused by PC Anywhere causing the machine to bluescreen and reboot. Because it was a remote machine, we weren't able to see the blue screens, and only found out about them when our client had driven out to the remote site to reboot the box and was still standing there when it happened again. The guy only spoke spanish with broken English, but all it took was "It just turn blue".

      Once we knew that, I turned on memory dumps, and found that the fault was caused by pcaw32.dll (or something along those lines). Replaced it with VNC, and all was well in the world.

      It has nothing to do with macho. It has everything to do with the ability to get the job done and to fix it quickly when it breaks. Trying to figure out what the hell is happening underneath when I see a picture isn't conducive to making that happen. Even worse when the problem could be with the underlying system *or* with the program.

    196. Re:Ockham's Razor tells me.... by mr_mischief · · Score: 1

      Sorry, but I care more about getting the work done than the physical beauty of the code.

      Try making the same data structure in COBOL, ISO Pascal, C, or Ada and get back to me about how ugly it is.

    197. Re:Ockham's Razor tells me.... by Wdomburg · · Score: 1

      I've often said that CPAN is both perl's biggest stength and it's biggest weakness. For any given need there are at least five diffent modules, at least three abandoned (but often still widely used). Great for one-off tasks and quick-and-dirty prototyping but generally a pain in the ass for any sort of long term maintenance, especially if you have more than one person writing code. Then you end up with one person useing TimeDate, another using Date::Manip, another using Date::Calc, another parsing dates with regexps and so forth. And of course if you ever want to package anything be prepared for a million dependencies because this module author decided to use an "improved" make system, another decided to use a half dozen esoteric test harnesses, another uses a custom object system, etc, etc.

      I think my record is twelve packages to fulfill a request for one module.

    198. Re:Ockham's Razor tells me.... by Rakarra · · Score: 1

      One of Perl's strengths is that oft-repeated phrase -- there's more than one way to do it. But it is also a huge negative, and Perl's greatest weakness.

    199. Re:Ockham's Razor tells me.... by nabsltd · · Score: 1

      That's funny, but somewhat true.

      My attitude is that you don't need some lame-ass rule about X number of comments per Y lines of code, but you need somebody who is proficient in the language but not familiar with the code to be able to spend less than a few minutes per function trying to understand the code.

      I assumed that "coding" and "code review" would deal with those issues. The coding standards should require that the person doing the code review ("Fred") be able to understand the code as written, and if Fred has to ask Joe and Bob too many questions about it, it doesn't pass review and must be fixed, even if the fix is only to add comments.

      Then, if you are using a documentation-producing comment system, hopefully that part would also be done.

    200. Re:Ockham's Razor tells me.... by Lonewolf666 · · Score: 1

      Actually I was thinking of pre-.NET VB (I don't know VB.NET). But then again, the old versions are AFAIK the more widespread ones.
      I found the syntax not nearly as clear as in Object Pascal (Delphi), and the object orientation is just weak. The only saving grace of VB was the good interaction with MS Office, which made it useful for automating stuff in documents.

      --
      C - the footgun of programming languages
    201. Re:Ockham's Razor tells me.... by sasdrtx · · Score: 1

      Guess what language Slashdot is written in.

      --
      Most people don't even think inside the box.
    202. Re:Ockham's Razor tells me.... by IntlHarvester · · Score: 1

      Why would I have to guess when I know it's perl?

      --
      Business. Numbers. Money. People. Computer World.
    203. Re:Ockham's Razor tells me.... by arth1 · · Score: 1

      For example, I name the iterating variables in "for" loops 'counter', not 'i'

      i,j,k... are traditional, and any coder will understand them for what they are.

      "counter", on the other hand, risks being a global variable used for other purposes, plus what do you do when you need a second counter? Call it "counter2", which doesn't align with "counter" because it's one character longer? Or rename your original to counter1, and hope you'll catch every occurrence?

      Verbosity isn't always better. Reinventing the wheel as $rounddevicethatrolls does not make code more manageable.

    204. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      >> it leads to key person dependencies

      > that ... is what ... makes the difference between a language that will thrive in the corporate environment and one that you should avoid at all costs.

      Self-fulfilling delusions.

      That businesses prefer the mediocre over the good, does not make the mediocre
      better. The preference for mediocrity makes "key person dependencies" unattractive,
      because the superior person will not be well accepted, will not share in the culture
      of mediocrity, and so will be difficult to retain.

    205. Re:Ockham's Razor tells me.... by richardchaven · · Score: 1

      I disagree If I have more than one, I use ENGLISH WORDS to describe it: InnerCounter, TotalAmount. As for your "traditional" variable names, they come from a time where source-code length mattered, and from a time where CS was in the math departments because it sort of looked like math. "i" and "j" are easy to confuse in the morass of j += ((i+2)/j), etc. Not only do they look alike, but they have no intrinsic meaning. TotalAmount += (TheseItems[Counter].Price * Quantity) * (1 - ThisDiscountPercent) But have I erred again? Do you dislike parentheses used solely for clarity? Do you feel that "real coders" have memorized the Order of Operator Precedence? Or that everyone should just "read the code" rather than expect clear comments? Do you think that l+=j[i].pr*q*(1-d) is better code? The goal of software is to solve the users' needs, not ours. Bugs happen through misunderstanding, not mis-typing. Things that make code easier to read and understand are aids in a professional's toolkit, hackers' macho be damned.

    206. Re:Ockham's Razor tells me.... by arth1 · · Score: 1

      Contrary to your belief, using single character iterators was a development, and not the initial state. Choosing a shorter iterator variable increased legibility by making the non-iterators stand out. See for yourself, what's easiest to read?

      void initcheckers(void) {
        int i,j;
        for (i=0;i<7;i++) {
          for (j=0;j<7;j++) {
            piece[i][j]='';
            color[i][j]=(i+j)%2;
          }
        }
      }

      or

      void initializeCheckersBoard(void) {
        int counter, InnerCounter;
        for (counter=0;counter<7;counter++) {
          for (InnerCounter=0;InnerCounter<7;InnerCounter++) {
            piece[counter][InnerCounter]='';
            color[counter][InnerCounter]=(counter+InnerCounter)%2;
          }
        }
      }

      I think your approach is so old fashioned that you'd really would feel home with good old COBOL, where you say things like "MULTIPLY price BY amount GIVING yield". Can't have much more "read the code" than that.

      I also recommend you buy (beg, borrow or steal) Donald Knuth's "The Art of Computer Programming". It will give you some more insight, among other things into how programming doesn't "sort of look like math", it is maths.

    207. Re:Ockham's Razor tells me.... by richardchaven · · Score: 1

      Golly, I read Knuth, and Kernighan, and McConnell. Perhaps the introduction to Knuth will help you understand the difference between algorithms and implementation. Take a look at Steve Gibon's beautiful assembler code if you want a clear example of low-level code with high readability.

      If clear code is "old-fashioned", then get my horse and carriage ready. Ad-hominem aside, yes, you CAN read that COBOL code even if you never used COBOL; is that a bad thing?

      Good code is good code: COBOL, C, Algol, Basic, or Ruby.

      I think Hungarian notation is worse than using the words "Button", "List", "Array", etc. because it is a shorthand, and we don't need to speak in shorthand. Understanding what the user wants and what our fellows mean and "What in hell were they thinking when they wrote this code?" is enough of a challenge.

      You think that

      void initcheckers(void) {
          int i,j;
          for (i=0;i7;i++) {
              for (j=0;j7;i++) {
                  piece[i][j]='';
                  color[i][j]=(i+j)%2;
              }
          }
      }

      is more readable than

      void initializeCheckersBoard(void)
      {
          int ColCounter, RowCounter;

          for (RowCounter = 0; RowCounter NUMBER_OF_ROWS; RowCounter++)
          {
              for (ColCounter = 0; ColCounter NUMBER_OF_COLS; ColCounter++)
              {
                  SpotPieces[RowCounter][ColCounter] = '';
                  SpotColors[RowCounter][ColCounter] = (RowCounter + ColCounter) % 2; // alternate colors
              }
          }
      }

      You can use the wrong word or poor spacing to make a bad example of any system; the bottom line is not impressed by knocking down straw-men.

      BTW: Did you spot the bug I introduced in your version of the function? How easily would a new maintenance coder spot it?

      Cheers

    208. Re:Ockham's Razor tells me.... by jacquesm · · Score: 1

      That depends. I've met some ace programmers that really were team players and that could probably code up a solution to whatever problem you threw at them in any language, including perl.

      I've also met a lot of wannabe-ace-programmers that thought that obscurity equalled smarts and attitude indicated character. I call them 'prima donnas', and I avoid them as much as I can. Those are the people that create 'key person dependencies' because they like to feel indispensible, but that's just to compensate for their innate insecurities. These people are nothing but trouble. I would estimate that a fair amount of the 'perl fanboys' (and any other language fanboys actually, but perl, due to its cryptic syntax lends itself very well for this purpose) fall in to the latter category.

      So, no it isn't the fault of the language but it does mean that certain languages have a higher incidence of such characters promoting it.

      A really good programmer can thrive in any environment, because programming is at heart a method of solving problems ('divide and conquer'), not a religion. Every problem is solveable in every language (as long as it is Turing-complete), some languages are easier to learn and maintain than others. Perl is hardly ever the optimal solution to a certain class of problem when you're working from a blank sheet, if there already is a large body of code in a project written in perl then it may make sense to continue writing in perl.

    209. Re:Ockham's Razor tells me.... by fforw · · Score: 1

      I always thought that Perl needs embrace unicode -- there have to be at least a thousand more operators in there.

      --
      while (!asleep()) sheep++
    210. Re:Ockham's Razor tells me.... by Raenex · · Score: 1

      No, we'd simply mock you for calling it "PERL" instead of "perl". :)

      If you're going to criticize, get it right. Perl is a proper noun, so it should start with a capital. Check http://www.perl.org/ if you don't believe me.

    211. Re:Ockham's Razor tells me.... by lsatenstein · · Score: 1

      Correction to lines per day measurement. In my mainframe days, the programming languages were Cobol and PL1. We measured productivity in number of lines of Cobol written / debugged . Not too many shops wrote pl1.

      --
      Leslie Satenstein Montreal Quebec Canada
    212. Re:Ockham's Razor tells me.... by Danny+Rathjens · · Score: 1

      I believe you. I meant to capitalize it, but my pinky seems to be atrophying so I don't push shift hard enough - and of course I didn't preview. ;)

    213. Re:Ockham's Razor tells me.... by aevans · · Score: 1

      ooh oooh! This is sooooo maintainable and enterprise! class StaticContainerAroundMyVariableImpl implements StaticContainerAroundAVariable { public static Enum YES_NO_ORMAYBE{"one", "two", 5}; private TertiaryTypeOfObject theNameOfMyVariable; private StaticContainerAroundMyVariableImpl singleton = null; public TertiaryTypeOfObject getTheNameOfMyVariable() { return theNameOfMyVariable; } public void setTheNameOfMyVarliable(FooTypeOfObject theNameOfMyVariable) { this.theNameOfMyVariable = theNameOfMyVariable } public TertiaryTypeOfObject TertiaryTypeOfObjectFactory() { if (this.singleton != null) { this.singleton = new StaticContainerAroundMyVariableImpl(); } return singleton; } public TertiaryTypeOfObject TertiaryTypeOfObjectFactory(boolean true_orFalse) { if (this.singleton != null) { singleton = new StaticContainerAroundMyVariableImpl(); singleton.setTheNameOfMyVariable(StaticContainerAroundMyVariableImpl.translateBooleanToEnum(true_orFalse)); } else { singleton.setTheNameOfMyVariable(5); return singleton; } protected String translateBooleanToEnum(boolean true_orFalse) { try{ switch(valueof(true_orFalse)) { case true: singleton.setTheNameOfMyVariable(YES_NO_ORMAYBE.one); break; case false: singleton.setTheNameOfMyVariable(YES_NO_ORMAYBE.two); break; } } catch (Exception e) { singleton.setTheNameOfMyVariable(YES_NO_ORMAYBE.5); } } } public class DoMaybe { public static void Main(String[] args) { TertiaryObject maybe = (TertiaryObject); StaticContainerAroundMyVariableImpl.TertiaryTypeOfObjectFactory("maybe"); } } Okay, I give up. yes_no_ormaybe = 3;

    214. Re:Ockham's Razor tells me.... by ProfFalcon · · Score: 1

      Ow! My doctor told me not to get semi-colons in my eye anymore.

      --
      Simply stating [Citation Needed] does not automatically make you insightful or brilliant.
    215. Re:Ockham's Razor tells me.... by inline_four · · Score: 1

      What about maintainability? flexibility? What if the person had to mentor others when trying to deliver the product? What about managing priorities? providing useful and easy to maintain unit tests? documentation? What about team work and consensus in trying to achieve that working solution? What about raising issues early?

      Those are the kinds of things that fall into the team leader's lap to worry about from the very beginning. It is their responsibility to speak up the moment they realize a deadline is unrealistic or ill-advised. If a developer sees the team lead keep their mouth shut about such issues and allows the team to take the blame, they should then speak up and start looking for a job, unless changes are made. That's real life for ya.

      In the 12 years I've been in software development, I've never seen a team lead not step up to the plate and let the upper management know that they're asking for some serious compromises. Usually, if they're already aware of it, they acknowledge it and accept the fact that certain peripheral tasks won't be done (training, documentation, maintainability) and they'll have to incur additional time costs later; or if they weren't aware of it, they try to revise the deliverables somewhat. But if developers and team leaders don't talk to anyone outside their world, they have no one to blame but themselves. If upper management is forced to ask to defer peripheral tasks for later on a regular basis, it's a good sign the company is in trouble and you should be looking for a new job, because after a few rounds of compromises, the next step is downsizing the team in order to make payroll.

      --
      Alexey
    216. Re:Ockham's Razor tells me.... by Anonymous Coward · · Score: 0

      my %hash = ( [ 1, 2, 3 ], [ 4, 5, 6 ] );

      My, that's awfully ugly, isn't it?

      Well, it's not that ugly. Probably because it's incorrect.

      Unless what you want is the [1, 2, 3] list to disappear instantly, being garbage-collected even before the assignment evaluation, and having a hash with only one entry, of which the key is a string 'ARRAY(0x18045c0)' (or similar) and a value is a reference to the second anonymous array [4, 5, 6]. Go figure.

      I find it amusing that you can't get the syntax right in your example on how Perl syntax is easy and intuitive. I don't blame you though, the Perl syntax is to blame. Learn Python and get over it.

    217. Re:Ockham's Razor tells me.... by ikegami · · Score: 1

      That's not Perl. That's a regular expression. They are found in Java, C, Python, and so many more, and their popularity is gaining. I don't see how that's possibly an argument against Perl.

      It's also bad code. The coder is trying to parse HTML or XML himself despite the availability of many libraries and tools.

    218. Re:Ockham's Razor tells me.... by agbinfo · · Score: 1

      You seem to have a very black & white view of things. I believe that their are shades of grey. For example, I wouldn't consider leaving a company because a team lead is not stepping up.

      I've worked for a few companies, from startups to very large (40K employees) companies and some in between. I tend to want to leave when the job is no longer interesting. A managerial team that rates people using metrics won't make me lose interest in the job but it doesn't help. Again, I'm not saying that metrics don't have their uses; I'm just saying that I believe there are sometimes better ways of evaluating performance. For example, in a 100m race, metrics is a very good indicator of performance whereas for a painting, it might not be.

    219. Re:Ockham's Razor tells me.... by inline_four · · Score: 1

      Well, I wasn't so much talking about leaving because the work environment is not fun, but because certain things can be taken as indicators of a company's poor financial health. In other words, it's better to look for a dingy while you're still on the sinking ship as opposed to when you're already in the water.

      --
      Alexey
    220. Re:Ockham's Razor tells me.... by KingBenny · · Score: 0

      yes idd, let em have it ... if they want to do in 20 lines what you can do in 1 because it looks as if their employees work harder ... who am i and who are you to judge them ... dieu reconnaitra les siens ... besides ... if they know a bit about it ... and i know a byte ... and you know a word or two, that doesn't make me God, but it makes me smarter than them at least :-p

      --
      Free speech was meant to be free for all... how can anyone grow up in a nanny state ?
  2. Age by damburger · · Score: 4, Insightful

    Could it be that, as well as being from an era of more ad-hoc approaches, the code is simply showing its age? System tend to get modified over time, and such modification is often done by multiple people under multiple managers.

    I would also dispute the idea that the simplicity of newer code is necessarily a good thing. Maybe they are yet to find all the bugs that require inelegant solutions...

    --
    If we can put a man on the moon, why can't we shoot people for Apollo-related non-sequiturs?
    1. Re:Age by famebait · · Score: 4, Interesting

      I would also dispute the idea that the simplicity of newer code is necessarily a good thing. Maybe they are yet to find all the bugs that require inelegant solutions...

      That could of course be the case.

      But it is a fact that some programmers have slightly too much interest in "clever" tricks, compactness, and optimisations whether they're called for or not, and too little in clarity, modularity and maintainability.
      I won't claim this as fact, but I also strongly suspect that this kind of programmer also tends to love perl (you find them everywhere though). Many lose these traits as they mature, get to experience the pain and cost of working other people's unreadable code, and as you get more proficient you simply aren't that impressed by low-level coding skills any more. But some seem incurable.

      --
      sudo ergo sum
    2. Re:Age by chthon · · Score: 1

      I worked three year on other peoples unreadable COBOL. Perl is at least powerful, in the same way that Common Lisp and Scheme are powerful.

    3. Re:Age by budgenator · · Score: 2, Informative

      unreadable COBOL wow I could see incomprehensible but unreadable has to be some kind of a record for COBOL!

      --
      Apocalypse Cancelled, Sorry, No Ticket Refunds
    4. Re:Age by Mutant321 · · Score: 2, Interesting

      But it is a fact that some programmers have slightly too much interest in "clever" tricks, compactness, and optimisations whether they're called for or not, and too little in clarity, modularity and maintainability. I won't claim this as fact, but I also strongly suspect that this kind of programmer also tends to love perl

      As you say, there's no way of proving this as a fact. But even if it is true that a lot of Perl programmers like "clever" tricks, it's irrelevant.

      The way to avoid these things ending up in your code base is not to choose a language you think is less likely to have "clever" coders, but to put in place a good set of development practices, and ensure you have a decent ratio of "tech leads" (or whoever it is responsible for ensuring the standards are kept up) to other coders.

      There are two main problems with a lot of the legacy systems in Perl. Firstly, when they were written (late 90s), it was the Internet boom, and everyone was a start-up, at least in the Internet field (even if they were an established company already). Secondly, a lot of the development practices that are mandatory today (eg. TDD, Continuous Integration, even Source Control) were far from ubiquitous back then. And it's quite hard (and expensive) to retro-fit those standards to a code base.

      Business people usually aren't interested in paying for that, because there's zero direct business value from it. Although this is something that's slowly starting to change as business realise how important technology is, and how hard it can be to get right.

      I don't think it's really a language specific thing, it's just that a lot of this stuff was done in Perl in the late 90s, and altho you can write bad code in any language, without good practices, it can get bad really quickly in Perl.

    5. Re:Age by danieltdp · · Score: 1
      I agree with you. Its not the technology that its legacy, its the program. It doesn't matter which technology was used, if the program is old then its legacy. From the dictionary: Legacy - Something handed down from an ancestor or a predecessor or from the past.

      The point is "old" doesn't mean "old technology".

      --
      -- dnl
    6. Re:Age by HiThere · · Score: 1

      Frequently the simplicity is due to more complex system libraries. Nothing wrong with that, but it has costs along with its benefits.

      System libraries will generally be faster than interpreted solutions. But they can easily introduce version dependencies. OTOH, you can't really avoid them. The Perl interpreter itself is a system library...but even compiled code tends to make use of lots of system libraries (excluding statically linked code).

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
  3. It's the slashdot effect! by pjf · · Score: 5, Funny

    It's simple why businesses don't like Perl. Slashdot is written in Perl. Whenever a business is mentioned on slashdot, their website goes down. Ergo, Perl is bad for business.

    1. Re:It's the slashdot effect! by smittyoneeach · · Score: 2, Funny

      Your ideas are intriguing to me and I wish to subscribe to your newsletter

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    2. Re:It's the slashdot effect! by jacquesm · · Score: 1

      Arguably ./ is one of the reasons perl was so popular.

      The funny thing is that that other /code clone (scoop) has just about died.

      no need to *whoosh* me :)

    3. Re:It's the slashdot effect! by jalefkowit · · Score: 1

      Well, in fairness to Scoop it's hard to call it dead when it powers Daily Kos, one of the most popular sites on the Web today. Though dKos has extensively modified Scoop and my understanding is they're doing a total rewrite that will remove Scoop altogether.

    4. Re:It's the slashdot effect! by jacquesm · · Score: 1

      true enough!

      It's just that the projects maintainers seem to have more or less given up.

      The fact that they are doing a total rewrite with the aim of removing scoop speaks volumes about the maintainability though.

    5. Re:It's the slashdot effect! by Anonymous Coward · · Score: 0

      Wow, everything2 went down...

    6. Re:It's the slashdot effect! by jalefkowit · · Score: 1

      Having implemented a Scoop site myself I can speak from experience in saying that it is terrible, terrible, terrible software.

      Someone asked me about Scoop a few months ago and here is the response I sent them:

      As someone who has spent a lot of time deploying, administering and managing a site based on Scoop, let me give you this advice:

      DO NOT USE SCOOP.

      If, for some reason, you feel the urge to use Scoop, just take a fork, cover it with salt and then stick it in your eye. That will give you the "Scoop experience" without having to install any software.

    7. Re:It's the slashdot effect! by jacquesm · · Score: 1

      I'm going to forward that to a friend of mine that is running (you've guessed it) a scoop site ( http://fieldlines.com/ ).

      thanks again :) :)

    8. Re:It's the slashdot effect! by Anonymous Coward · · Score: 0

      Basically, Business doesn't like perl because perl is what the world would look like if it were designed by programmers who want to rule the world.

    9. Re:It's the slashdot effect! by Rakarra · · Score: 1

      Arguably ./ is one of the reasons perl was so popular.

      Mmmm, I think one of the big reasons was the number of high-quality Perl books available from O'Reilly and Associates.

  4. Give the yahoos what they want by Anonymous Coward · · Score: 3, Insightful

    Shiny.
    New.
    Perfect.
    Can use it without knowing anything.

    They'll start complaining about the new stuff as soon as they realize it only gives them a new untested set of problems and work-arounds. If you want to keep working there, you'll change yet again when enough of the 'decision makers' can't take it anymore.

    I have a client with a very workable multi-platform enterprise calendaring/scheduling system. Two people out of 15 in the organization want to use Outlook. It's a fair bet the company will migrate to Microsoft Exchange within the next 6 months and if I want to keep making money from them, I will be training these two users and their colleagues on how to share calendars in Exchange/Outlook. Will life be any better for them? I think the learning curve for sophisticated use of Outlook/Exchange is a bit higher than for MeetingMaker... but we shall see.

  5. Perl IS the problem by Colin+Smith · · Score: 4, Interesting

    Particularly perl, even with coding standards, reasonable indentation, comments etc.

    I stopped writing the stuff years ago because I realised that I was only making things worse. Perl encourages big ball of mud development. It's specifically designed as a "glue" language which lets you stick things together, in fact it's a sticking plaster language which allows you to paper over cracks which would be far better filled in another way.

    Now if I see myself or others considering Perl to accomplish something, I'm pretty sure there's a problem with the entire approach.

     

    --
    Deleted
    1. Re:Perl IS the problem by Anonymous Coward · · Score: 0

      I don't know. Git is pretty successful.

    2. Re:Perl IS the problem by Anonymous Coward · · Score: 0

      Perl is, after all, referred to as "executable line noise".

    3. Re:Perl IS the problem by niceone · · Score: 4, Insightful

      Perl encourages big ball of mud development

      Is it really fair to blame the language? I think the reason perl is the centre of so many big balls of mud is that it is easy to do prototypes in it. If people choose to take those prototypes and turn them into big balls of mud, then that is their own fault. If you start with a clean sheet of paper, do a good design and then decide to implement it in perl you won't end up with a big ball of mud.

    4. Re:Perl IS the problem by Alioth · · Score: 0, Flamebait

      There's an old proverb: 'A bad worker blames his tools'.

      I don't have this problem with Perl.

    5. Re:Perl IS the problem by Anonymous Coward · · Score: 0

      Um, no.

      Perl, quite simply put, is a tool. It's a versatile one, like a Swiss army knife or so - and it's one that requires its users to actually have some intelligence because it doesn't FORCE them to do things The One True Way.

      Some people will be comfortable with that, some won't. Maybe you fall into the latter group - no, you *certainly* fall into the latter group -, and that's OK, but don't make the mistake of being so narrow-minded (quite literally) to think that everyone else is like that, too. It's precisely that same One True Way thinking again.

    6. Re:Perl IS the problem by MrMickS · · Score: 1, Insightful

      Perl doesn't help but its not the problem. The problem falls on the people writing the code and the demands made on them.

      My current berth is typical of this. We've been given a 'system' that requires a degree of scripting to be done to glue the various discrete parts together. A combination of Perl and Ksh has been chosen to do this. Why? No idea, those choices were made before I joined the project. Looking at the people writing the code, none of them have any sort of development background. Add to this the demands from the business that the 'system' has to work yesterday, means that a lot of hacking together of scripts has gone on.

      The result is that some of the code is practically unmaintainable by anyone but the person that wrote it. This isn't the fault of the language though, its the fault of the developers. With a framework of modules in place the newer code is readable and easy to maintain. Its the older stuff that we just poke with a stick. No Perl doesn't stop you writing bad code, it doesn't make you write it either though.

      Getting back to the original topic. A lot of Perl code was written around the time of the dotcom bubble, when there was a shortage of IT staff. The result was that if you could spell Unix and Perl you could get a job. Everything was fast paced, had to be first to market. Corners were, frequently, cut. The result was people with inappropriate skills developed systems without spending the necessary time spent in the design phase. Corporates have had to deal with the fallout from this when people have said "I can't fix that, I'll have to rewrite it". Instead of looking at the bad practice that generated the code they are blaming the language. Other languages may protect, somewhat, against these bad practices, I doubt that they instantly make code maintainable though. I can write bad code in any language, its experience and professionalism that means that I chose not to.

      --
      You may think me a tired, old, cynic. I'd have to disagree about the tired bit.
    7. Re:Perl IS the problem by LizardKing · · Score: 1

      Yeah this excuse comes up every time someone dares to go against the Slashdot orthodoxy and criticise Perl, along with "it's possible to write unmaintainable code in any language". The truth is that Perl code is generally a hack, because it's so easy to do something that just about works with it. Look at the CPAN modules for example - so much unmaintained, unfinished code (for example, has Perl/Tk stopped crashing and leaking memory like a sieve yet?). For systems where "just about works" isn't good enough, I'll choose a language and libraries that allow me to use decent profiling and debugging tools. One where there is also extensive literature on designing systems (programming in the large, not just the language details or programming in the small). Where OO and threading are an intrinsic part of the language, not another weird joke from Larry Wall or eternally marked as experimental.

    8. Re:Perl IS the problem by Anonymous Coward · · Score: 0

      Perl was designed to be a shell superglue. Put a drop of perl here, a drop there. Voila, comes some useful tool. The mess came when people found the superglue was in fact quite handy, they build an Empire building in a month. And then people complained, the toilet is in the wrong place, etc...

    9. Re:Perl IS the problem by jacquesm · · Score: 2, Insightful

      A good worker picks his tools carefully so he doesn't have to blame them. If you're forced to maintain a bunch of code and you can choose the language would you prefer to maintain a batch of perl code or a batch of python or C code ?

      I've done all three and I really *much* prefer C over both python and perl and python over perl.

      I'm sure that you can write very beautiful code in Perl the first time out, but that goes for any language, the real acid test is what you get after 10 coders have touched your poetry over the course of a few years maintaining a project and adding new functionality.

    10. Re:Perl IS the problem by Rogerborg · · Score: 4, Insightful

      The language itself is not the problem, but the 'community' and their promotion of it may be. I have seen good Perl written by good corporate developers, but that's despite the available Perl tutorial and examples.

      I can't recall seeing a Perl learning resource that presents code that is well structured, commented, and tolerant of bad inputs. That leads me to suspect that Perl attracts developers who take pride in hacking together "Works For Me" code in the shortest possible time using the fewest, tersest lines. Yes, you can do that in a C-like language, but Perl lets you get your "good enough" result faster.

      When Perl is promoted by impatient, sloppy bodgers, it's no mystery why it would attractd similarly minded developers. It doesn't have to be that way, but that does seem to be the de facto situation.

      --
      If you were blocking sigs, you wouldn't have to read this.
    11. Re:Perl IS the problem by cshirky · · Score: 4, Interesting

      There are two problems with this analysis. The first is that you (as many coders do) assume that tools that require intelligence on the part of the coder is an unalloyed good. Businesses, however, don't see it that way, especially large ones with many coders.

      As Dave Clark once said in a different context, and architecture is partly there to tell you what you *can't* do. Programming languages are like that as well. Java is very good at encouraging certain idioms and discouraging others. Perl is not so good at either thing. Organizations that want structure will also want languages that support structure.

      The answer "But its their fault for hiring dumb coders!" won't wash, because when you are the gas company working on maintaining a legacy billing system, you have to hire coders of average quality, and a language that allows coders of average quality to do stupid things is inferior to a language that shapes their work, *even if it slows them down*.

      The second problem with this argument is fetishization of the individual coder, when most large codebases, esp in businesses, are social affairs. Even stipulating the impossibility that every business should hire only coders of above-average intelligence, different coders are intelligent in different ways. When 'Code as thou wilt' is the whole of the law, confusion abounds.

      Did you ever see Rael Dornfest's bloxom blog project? Elegant, tight perl that did stuff like string replace on slashes in a fiel path to get an array of dir names, the file name itself, *and* kept the number of substitutions as a variable for traversal depth, in a single line. It was smart, but it also took other coders a long time to understand the JAPHishness of that single line of code, because it was doing three things at once.

      Interestingly, he re-wrote it in Python, and its better, mainly because you can't do stuff like use the Boolean return of an assignment as a side-effect for an if test, and there's no concept of $_. Perl doesn't require JAPHishness and Python doesn't completely banish it, but other things being equal, Python produces more sociable code.

      Once you start seeing the business imperative as enabling a group of acceptably competent programmers to work together, rather than being a platform for individual brilliance, the original article starts to look a lot more sensible.

    12. Re:Perl IS the problem by Dubu · · Score: 2, Insightful

      I think the reason perl is the centre of so many big balls of mud is that it is easy to do prototypes in it.

      You're very right with that, but there's more.

      In many cases, Perl allows you to reach your programming goal easily, without much effort. But this unfortunately also means that it encourages quick & dirty programming. Just scribble down your code and the job is done; it just works. In other languages that are less powerful/flexible in their syntax (that does not mean restricted in their possibilities!), like C, C++ or Java, you normally have to write a lot more lines of code. This not only makes the code more readable in many cases, it also urges you to think more about what you are doing. If your programming task will take a lot of time to implement, you will try to find an optimal (or at least, good) approach, a better solution to it, make it reusable, use a design pattern - you will just think more. And the time you invest in the design is well spent, as it may save you unnecessary effort in the coding and debugging phases.

      Okay, so a C/C++/Java/whatever programmer will need more time to design and implement. Perhaps. But that's not all: primarily, you must be able to design your software. You must know your design patterns, your algorithms, your best practices. Without that knowledge, most languages will give you a hard time to create working code. Heck, with many languages you will not even make it to "Hello, world" without compiler warnings if you don't understand how it works.

      But not with Perl. It makes your start quite smooth. You don't have to declare your variables, care about strange #includes or imports, just write print "Hello, world!" and it will compile and execute (and you will not even see these different steps). And unfortunately, this also means -- and that is also my experience with a lot of beginners in different Perl forums and on the Usenet -- that Perl is more attractive to those who do not have a formal education in software engineering. They do not have to wade through thick volumes about "C++ in $smallint days", just to find out how to convert a string into a number, split an input line at commas, or grab a page from the Web. They will soon find a quick&dirty, one-line solution in an online tutorial or a forum that can be pasted into their code without even breaking the rest of it or make the compiler scream (no beginner will use strict or warnings pragmas unless urged to). It will not be the most efficient solution. It will probably break when the input data vary a bit. It will likely be full of security flaws (but at least no buffer overflows!). But it will do the job and give even the hobby coder a (false) feeling of competence and aptitude.

      PHP has even more of that "easy for beginners" nimbus (sorry, folks), but Perl does not stand much behind. You can see the results most obviously in a lot of the CGI code that can be found on the Net. (Anyone think of "Matt's script archive"?)

      So, is it the fault of a programming language that it is attractive to non-programmers? Perhaps. I'm not the one to judge.

      If people choose to take those prototypes and turn them into big balls of mud, then that is their own fault. If you start with a clean sheet of paper, do a good design and then decide to implement it in perl you won't end up with a big ball of mud.

      YES, absolutely! But it is just so easy to get persuaded by Perl to do it quick, sufficiently working, and dirty. *sigh*
      I took the bait myself far too often.

    13. Re:Perl IS the problem by quirkyalone · · Score: 1

      >> Is it really fair to blame the language? Yes, because it *encourages* it, by design.

    14. Re:Perl IS the problem by pzs · · Score: 4, Interesting

      I see this claim all the time - "it's not Perl, it's that people write bad Perl."

      Well then, why is bad Python a million times easier to read?

      I also hear that Perl is great because you can write things quickly. This completely disregards the fact that you can write quickly in many other languages, that do not have the same "ball of mud" tendencies.

      I also think that those Perl mantras: "laziness impatience and hubris" are not virtues and nor is having a thousand different ways to do things - this just leads to code that can only be read by one person.

      Being methodical, aiming for clarity and simplicity, avoiding obscure functionality - this is what leads to code that can be maintained. Perl does not encourage any of these virtues.

    15. Re:Perl IS the problem by fbjon · · Score: 4, Insightful

      Perl attracts developers who take pride in hacking together "Works For Me" code in the shortest possible time using the fewest, tersest lines. Yes, you can do that in a C-like language, but Perl lets you get your "good enough" result faster.

      For me, that's the strength of Perl. I don't use it for anything other than works-for-me type small tidbits of code. Will it require maintenance, or extending, or support by other people? Then I don't use Perl, because it's complex enough to warrant a strict language. In essence, text parsing and one-off scripts are fantastic, other stuff I stay away from.

      --
      True confidence comes not from realising you are as good as your peers, but that your peers are as bad as you are.
    16. Re:Perl IS the problem by Mutant321 · · Score: 1

      So your logic is: I can't write good code in it, therefore it must be the language?

      Despite the fact that Amazon, IMDB, BBC, New York Times, Financial Times, etc. etc. seem to be pretty happy with it?

      The assertion that your language affects your architecture / high level design is the most baffling to me. How does Perl stop you loosely coupling the components/services of your system? If that really were the case, then surely people would've stopped using it years ago? But there are plenty of big companies (and new companies) still using it, so I'd really like to know what you're basing that on.

    17. Re:Perl IS the problem by Blakey+Rat · · Score: 3, Insightful

      People on this board blame VB all the time for bad programs. Perl doesn't get a pass.

      (That said, I agree with you, I don't think you can blame the language for bad code; I *do* believe a language can contain features that encourage bad code.)

    18. Re:Perl IS the problem by 10101001+10101001 · · Score: 2, Interesting

      I think the reason perl is the centre of so many big balls of mud is that it is easy to do prototypes in it.

      Perl is the center of so many big balls of mud because elegant Perl code tends to be both powerful and obtuse. Prototyping merely encourages the creation of more powerful code.

      If people choose to take those prototypes and turn them into big balls of mud, then that is their own fault. If you start with a clean sheet of paper, do a good design and then decide to implement it in perl you won't end up with a big ball of mud.

      Most corporations are more concerned with getting a project out and working by deadline than whether good design was carried out or that non-critical bugs persistent. In short, if you know ahead of time that you're likely never going to go back and do a clean design, you should choose a language that at least encourages good design from the start if you want to minimize the mudball that will form; that means choosing a language other than Perl (or finding the few Perl programmers who follow good design).

      --
      Eurohacker European paranoia, gun rights, and h
    19. Re:Perl IS the problem by Anonymous Coward · · Score: 0

      Dude, 90% of the programing tutorials in any language are not well structured, commented, or tolerant of bad inputs. I don't think that alone explains the messiness of perl code. I did write perl in a professional setting. I wrote it well structured, commented and tolerant of bad inputs. The code reviewer basically made fun of its verbosity and straight forwardness and turned it into one line. I sort of knew then I wouldn't be working there very long.

    20. Re:Perl IS the problem by JerkBoB · · Score: 1

      I stopped writing the stuff years ago because I realised that I was only making things worse. Perl encourages big ball of mud development. It's specifically designed as a "glue" language which lets you stick things together, in fact it's a sticking plaster language which allows you to paper over cracks which would be far better filled in another way.

      Just another comment from a fellow old-head... I've come around to the same perspective. I've spent a good chunk of my career writing Perl, as a sysadmin (primarily), web monkey, and other stuff.

      These days, I still use Perl, but in a very limited capacity. It's useful as a better awk/sed (when I need both sets of functionality and want to shorten a pipeline). It's sometimes useful for quicky hacks that are too complicated for shell (although this is rare). I've used it as a stand-in for netcat on remote systems that don't have nc.

      For writing most tools, I use bash. In the end, I've found that it's faster, more maintainable, and more reliable to tie together well-written chunks of code (GNU userspace), than to try and do it all myself or use CPAN. For doing anything web-related, I use Rails. For stuff that's not a good fit for shell scripts, I use Ruby or Python.

      Perl is like a really great swiss army knife, particularly when it comes to dealing with text. Like any swiss army knife, it's great in a pinch, but doesn't really hold up to serious use compared to tools that were designed for specific tasks.

      --
      A host is a host from coast to coast...
      Unless it's down, or slow, or fails to POST!
    21. Re:Perl IS the problem by encoderer · · Score: 5, Insightful

      Yes, it is.

      It's like saying "Most Basic & VB Code is Verbose, is it really fair to blame the language?"

      YES!!

      Every language has a unique idiom. And the best languages use this idiom to painlessly guide the developer to best practices.

      For exammple, lots of devs consider Java to be over-engineered and overly-complex. You've probably heard a dev talk about building something in, say, RoR in a week that would've taken 4 weeks in Java.

      That's probably true, because Java is a tool best designed for large applications and when you're using Java, it's idiom guides you into building multi-tiered architecture.

      Python's idiom guides devs into producing well formatted code and it's a great language for web apps because it puts powerful data structures right in the developers face.

      C# is a FANTASTIC language for teaching OOD to procedural developers. It's HARD for a procedural developer to think in terms of object hierarchies. The mechanics are easy to pick up. The ability to deconstruct a problem into an object hierarchy is hard.

      But you put them in front of a new project in C# and the language -- entirely OO itself -- just guides a developer to the right thing. It's very hard to shoe-horn a procedural architecture into an OO-only language.

      JavaScript makes it insanely easy to create an event-driven application. Anonymous functions, LAMBDAs, etc, guide a developer into producing code in an event/event-handler model.

      Any developer can do nearly anything with any language. But a language itself can make it easy and obvious when you're doing things right, and painful for you when you're doing them wrong. And a good IDE will reinforce both of these behaviors.

    22. Re:Perl IS the problem by Anonymous Coward · · Score: 0

      Java is often referred to as a "living hell, designed to crush the mind, body and soul of those doomed to use it"

      Just saying.

    23. Re:Perl IS the problem by Anonymous Coward · · Score: 0

      Is it really fair to blame the language?

      Yes.

      The mechanics of how people get into trouble in Perl are complicated, but can you really separate the language from its culture? I don't believe Larry Wall would think so (having read the camel book).

      If problems happen in Perl development that either don't happen in other languages or happen to a lesser degree, the increase in problems is Perl's fault.

      I think many of us just want to fix Perl (or whatever our favorite is) because we get attached to languages and want them to succeed.

    24. Re:Perl IS the problem by Abcd1234 · · Score: 1

      Well then, why is bad Python a million times easier to read?

      1) It's not. For example, most Python lacks sufficient vertical whitespace for separating code sections because it's presence makes it difficult to insure block-level indentation is right.

      2) Because Python forces a particular style on you. Woop-de-doo. If Perl forced you to format your code in a certain way, I'm sure it'd be a bit more readable, too.

      I also hear that Perl is great because you can write things quickly.

      No, you can write things quickly because CPAN is the end-all and be-all of shared package repositories. It's not a property of the language so much as the community, and no other language comes remotely close.

      I also think that those Perl mantras: "laziness impatience and hubris"

      I have never once heard those listed as "Perl mantras"... where is this coming from?

      Being methodical, aiming for clarity and simplicity, avoiding obscure functionality

      What does *any* of this have to do with the language? These are just good coding guidelines. Period.

      Perl does not encourage any of these virtues.

      It neither encourages nor discourages. It provides tools that allow an undisciplined programmer to write "clever", obfuscated code, but that's an easy-to-solve problem: fire the idiot who thinks he's so damn clever.

    25. Re:Perl IS the problem by Abcd1234 · · Score: 2, Insightful

      The funny thing is, all of your comments are equally applicable to C++. It's incredibly easy to abuse the language in a myriad of ways if you really want to, with many weird little edges and corners, and multiple possible styles available. And different programmers have a range of skill and discipline levels, producing code that widely ranges in terms of quality. But you don't see people blaming the language (well, okay, some do, but the industry uses it heavily anyway). Instead, we have things like coding guidelines and general corporate culture, code reviews, etc, to ensure that the output from poor to mediocre programmers is up-to-snuff.

    26. Re:Perl IS the problem by Evangelion · · Score: 1

      I have never once heard those listed as "Perl mantras"... where is this coming from?

      "We will encourage you to develop the three great virtues of a programmer: laziness, impatience, and hubris." -- Larry Wall, Programming Perl (1st edition), O'Reilly And Associates

    27. Re:Perl IS the problem by Abcd1234 · · Score: 1

      Ahh. So, got any context for that quote? Something tells me there's more to it than just that (for example, I consider laziness a virtue in a programmer because it encourages modularization and code reuse... I'm too lazy to rewrite the same things over and over).

    28. Re:Perl IS the problem by pzs · · Score: 1

      2) Because Python forces a particular style on you. Woop-de-doo. If Perl forced you to format your code in a certain way, I'm sure it'd be a bit more readable, too.

      I like the way you say "I'm sure if Perl did some of the things Python did, it would be more readable" as part of your argument about why Perl is just as readable. That's funny.

    29. Re:Perl IS the problem by Abcd1234 · · Score: 1

      I said "a bit more readable". Not "more readable". And I really mean that... a tiny, little bit. Because, in the end, most programmers indent correctly, anyway, and so the difference between typical Perl code and typical Python code is small to non-existent. Python simply ensures that morons who'd typically write ugly code are forced to due otherwise... and I don't consider that a virtue.

    30. Re:Perl IS the problem by Coryoth · · Score: 1

      If you're forced to maintain a bunch of code and you can choose the language would you prefer to maintain a batch of perl code or a batch of python or C code ?

      I've done all three and I really *much* prefer C over both python and perl and python over perl.

      Ah, but now compare C to a language like Ada or Eiffel that was actually designed with long term maintenance of large projects firmly in mind. Whatever else you may think of those languages, they are certainly near the top of the list of languages that you'd like a large codebase you're forced to maintain to be written in.

    31. Re:Perl IS the problem by jacquesm · · Score: 1

      I know ada is (or was?) actually quite popular in some government agencies, but I have never seen Eiffel 'in the wild', only in studies. Was it ever widely adopted ?

    32. Re:Perl IS the problem by Coryoth · · Score: 1

      Eiffel gained adoption within niche industries, generally in finance/business where correctness and maintainability was somewhat of a concern. These days it is getting heavily squeezed by Java, but is still kicking around nad has adherents (partly because those who did actually take it up generally stuck with it -- it is a pretty nice language in many ways).

    33. Re:Perl IS the problem by geminidomino · · Score: 2

      Ahh. So, got any context for that quote? Something tells me there's more to it than just that (for example, I consider laziness a virtue in a programmer because it encourages modularization and code reuse... I'm too lazy to rewrite the same things over and over).

      That's exactly the context Larry meant by laziness being a virtue.

    34. Re:Perl IS the problem by Anonymous Coward · · Score: 0

      Perl allows one to solve more problems faster with less code.

      If you need another reason to use Perl, then you may want to reconsider your qualification as a software developer.

    35. Re:Perl IS the problem by Just+Some+Guy · · Score: 2, Insightful

      When Perl is promoted by impatient, sloppy bodgers, it's no mystery why it would attractd similarly minded developers. It doesn't have to be that way, but that does seem to be the de facto situation.

      Oh, you nailed that one. When I was hacking Perl in the late 90s, it was fun and exciting and elite. The Perl culture was that we were special and cool and not like the corporate drones writing RPG in their cubicles. The problem was that it actively pushed you to do stuff as un-drone-like as possible as an ends to itself. If you did stuff in a clear, maintainable manner then you were just like one of "them", and that would have been missing the whole point of Perl.

      --
      Dewey, what part of this looks like authorities should be involved?
    36. Re:Perl IS the problem by Just+Some+Guy · · Score: 2, Informative

      I have never once heard those listed as "Perl mantras"... where is this coming from?

      "We will encourage you to develop the three great virtues of a programmer: laziness, impatience, and hubris." -- Larry Wall, Programming Perl (1st edition), O'Reilly And Associates

      It neither encourages nor discourages.

      He misspoke. Perl itself neither encourages nor discourages. Perl's community, however, is largely centered around those three exact things.

      --
      Dewey, what part of this looks like authorities should be involved?
    37. Re:Perl IS the problem by dalh · · Score: 1

      Can't argue that there are not a huge number of big balls of perl mud rolling around out there (many of them being standard modules on CPAN, unfortunately). However, that doesn't mean that perl itself is the cause of all those balls. Given the necessary motivation and resources, good design and maintainable code can happen with perl. The real cause is that it is harder to make well designed and manageable software than it is to just make something work and move on to the next thing. Perl doesn't force the same amount of structure on developers as some languages, so frequently even the crappiest perl still works fine (for now) and we get stuck with it. However, good design and structure CAN be imposed on perl by the developer (or his employer), and perhaps that is where the responsibility lies, not with the language itself.

    38. Re:Perl IS the problem by Exlee · · Score: 2, Interesting

      Well then, why is bad Python a million times easier to read?

      You won't get hit by a car if you're chained to your kitchen.

      And while impossibility of being hit by a car is a good thing, having chains around your leg gets troublesome.

      I have seen spaghetti code written in Python (10.000+ lines, jumping back and forth between files). I wonder if you would say it is maintainable?

      I also hear that Perl is great because you can write things quickly

      Just to illustrate the example:

      I rewrote small script written previously in Python to Perl. Around 130 lines of code (mostly CLI) turned into 20 lines of code while preserving readability, 100% of functionality and even adding some of its own, just because of "perl magic". And that's the prototyping speed I want!

    39. Re:Perl IS the problem by mypalmike · · Score: 1

      If people choose to take those prototypes and turn them into big balls of mud, then that is their own fault.

      Exactly where do you work that you actually throw away working code (a.k.a. "prototypes")? I don't think I've ever seen a prototype get thrown away.

      --
      There are 0x40000000 types of people: those who understand 32-bit IEEE 754 floating point, and those who don't.
    40. Re:Perl IS the problem by mr_mischief · · Score: 2, Informative

      You seem to be unfamiliar with the work of Damien Conway, Randal Schwartz, Tom Phoenix, and Lincoln Stein.

      Stop by Perlmonks to read some book reviews and maybe lurk the Seekers of Perl Wisdom or Meditations sections. You'll see that what you've been reading is not representative of how things actually get done.

      There are Perl Poetry and Obfuscation sections on the Perlmonks site, but those are games. You'll notice that there's a clear division between neat tricks for the sake of neat tricks and maintainable code for the sake of maintainable code.

    41. Re:Perl IS the problem by mr_mischief · · Score: 2, Interesting

      I disagree. Languages don't encourage bad code (well, maybe Intercal, Malbolge, etc). They just don't enforce good coding practices.

      There are problems with enforcing good coding practices, too, though. One that there are so many from which to choose that are good in different ways. You could just pick one, as Guido did, but then that makes other ones harder to use or less clear.

      Vertical whitespace often makes things easier to read than horizontal whitespace does, but the majority of the time horizontal whitespace wins. Objects can really help clarity and modularity, but they get in the way when a small procedural program makes more sense. Some programs make more sense in a functional style with recursion while many recursive solutions can be made clearer and faster with iteration and a few side effects.

      The difficulty people have with Perl is not that it encourages bad coding. It's that puts the responsibility for choosing a decent style and model on the programming team. If you're not ready to make those decisions, you can use Perl::Critic and PerlTidy or you can use a language that makes those decisions for you.

      Just be aware that whether you make coding standard decisions consciously or by defaulting to some language designer with a particular taste, you're going to have pros and cons to your coding standards. It is an advantage in some ways, I suppose, that you end up with the same standards as your competitor down the street. It's also an advantage if you come up with one that allows your coders to be more productive than his.

    42. Re:Perl IS the problem by mr_mischief · · Score: 1

      It really depends on what sort of programs you are having implemented.

      If you have the budget for many mediocre to downright poorly skilled people to work on a team for a huge multi-year project, then by all means choose a language and support tools for the language which facilitate that.

      If you need one, a couple, or a handful of mediocre to fantastic programmers to be really productive on many smaller programs, then use a language which facilitates that.

      Sometimes you can use the same programming language for both, but it's more difficult to use Perl, Forth, Lisp, or C for the former and more difficult to use Java, Ada, Eiffel, or COBOL for the latter.

    43. Re:Perl IS the problem by Rogerborg · · Score: 0, Flamebait

      If I don't know about them, and have to search for them, then they're not representative of the Perl programming community. Are they?

      --
      If you were blocking sigs, you wouldn't have to read this.
    44. Re:Perl IS the problem by Haeleth · · Score: 1

      this excuse comes up every time someone dares to go against the Slashdot orthodoxy and criticise Perl

      What Slashdot orthodoxy? To my eyes, the majority of highly-moderated comments in this discussion look like they're anti-Perl.

    45. Re:Perl IS the problem by HiThere · · Score: 1

      Ada has two main problems (probably linked). The lack of garbage collection and the inconvenience of using variable length strings. In most other respects I rate it a superior language. (Not the best, but considerably better than C++.)

      C and C++ suffer from pointers and macros. They make "clever" code unmaintainable. And that the default mechanism for addressing an array should be via a pointer is atrocious! (The language doesn't require it, but several early dialects severely penalized the use of array indexing. So a history developed.) That said, with sufficient discipline it's now quite possible to write good maintainable code in C and C++. But, like Ada, it doesn't have garbage collection. (Wait for C++ 2010?) Still, the wild use of pointers and macros are much worse than just lacking a garbage collector.

      Java is a language I keep coming back to and running away screaming from. It's an excellent basic language design, but it's LIBRARIES!!! They're extensive and many of them are nice, but other have vile user interfaces. And needing a chain of three libraries, each declared with a separate variable, to write a file in the "proper manner", UGH!!

      Eiffel is a language I had great hopes for. Had. It had excellent mechanisms for dealing with multiple inheritance. It was clean, elegant, sweet. It devolved into only two variants. One by the original language designer, who wanted to maintain sole authorship of the design, and the other by a group at a French University, who declared that their version was experimental, and came out with a new design that broke nearly all existing libraries (and there weren't that many). So the language is not progressing well. I may be less functional now than it was a decade ago. (I used to use SmallEiffel, which has been renamed SmartEiffel and made incompatible.)

      Python and Ruby are rather nice, but slow compared to the other languages that I been discussing. (In fact they're slow compared to Perl.)

      Currently I use Python if speed isn't needed, and I'm keeping an eye on D (Digital Mars D) for when I need speed. It's not quite there yet (libraries more than any other reason), but if it can avoid the Java-ization of its libraries, then it looks like a winner.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    46. Re:Perl IS the problem by mr_mischief · · Score: 1

      Well, considering you mentioned that you haven't seen a resource for learning Perl "that presents code that is well structured, commented, and tolerant of bad inputs" and I named 4 of the top 10 renowned authors of Perl books, I'd say it's fair to name them.

      Since Perlmonks along with Use Perl; and the Perl newsgroups, IRC groups, and mailing lists are the Perl community, I'd say they are representative. Conway, Schwartz, Larry Wall, chromatic, brian d foy, and several other very respected authors of Perl (the language), perl (the language system), and references about Perl and perl have accounts on and are relatively active on Perlmonks, too.

      If you speak about "the Perl programming community" and don't recognize those names, then what you know about the community is what's not representative of the community.

    47. Re:Perl IS the problem by wmbetts · · Score: 1

      but but but python is more web 2.0ish.

      --
      "Ubuntu" -- an African word, meaning "Slackware is too hard for me". - stolen from Dan C alt.os.linux.slackware
    48. Re:Perl IS the problem by dcam · · Score: 1

      But that is just the point, in C++ they are weird little corners. In perl they are displayed front and center. Sure you can do some pretty weird stuff in C++, but generally that is the domain of people who know the language well.

      --
      meh
    49. Re:Perl IS the problem by Abattoir · · Score: 1
      I prefer Ruby to Python, but anyway.

      Your comments about perl are exactly what I don't like about the language. Thank you.

    50. Re:Perl IS the problem by chromatic · · Score: 1

      Well then, why is bad Python a million times easier to read?

      Because you know Python and not Perl. Why is that surprising?

    51. Re:Perl IS the problem by bnenning · · Score: 1

      C, C++ or Java, you normally have to write a lot more lines of code. This not only makes the code more readable in many cases

      Ick, no. That may increase the average readability of each line of code, but because there's so much boilerplate that's unrelated to the actual problem being solved, net readability goes down. Even Java is starting to figure this out; the foreach loop in Java 1.5 is both more convenient and more readable than the silly Iterator incantations.

      Obfuscation is bad, but succinctness is good.

      --
      How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
    52. Re:Perl IS the problem by Rakarra · · Score: 1

      I wonder what it is that you read in the Perl community if you haven't heard of Randall Schwartz before. He's probably the most well-known person in the Perl community outside of Larry Wall.

    53. Re:Perl IS the problem by ggvaidya · · Score: 1

      I have never once heard those listed as "Perl mantras"... where is this coming from?

      "We will encourage you to develop the three great virtues of a programmer: laziness, impatience, and hubris." -- Larry Wall, Programming Perl (1st edition), O'Reilly And Associates

      If you need a more recent reference on that, it's also in the Perl manpage.

  6. To be fair to the corporates by Sycraft-fu · · Score: 4, Insightful

    I see the same thing with developers in general. Nobody wants to use Perl anymore, PHP was the new thing, and now Ruby is eclipsing that. Now I'm not talking about cases where the new language legitimately makes something much easier, I'm talking about a good deal of fanboy-ish "Oh I do all my code in Ruby now because it's way better!"

    It isn't just PHBs, programmers themselves seem to fall victim to fads in development. They want to use the new shiny stuff, simply because it is new and shiny. Hell I've seen developers say C/C++ are "dead" and that shiny_language_x is going to take over.

    1. Re:To be fair to the corporates by laejoh · · Score: 0

      PHP? Pointy Haired Programmers?

    2. Re:To be fair to the corporates by famebait · · Score: 5, Insightful

      Hell I've seen developers say C/C++ are "dead" and that shiny_language_x is going to take over.

      That may be not so much fadism as well-informed wishful thinking.

      OK, plain C is not _that_ bad, but you do need to fight its innate spirit in order to implement sane coding practices.

      But I recently had to return to C++ on a recent project, and although I was expecting some tedium, it was way worse that I remembered. MY GOD how painful it makes a lot of really trivial things. Even the nasty hack known as PHP starts looking well planned in this light.

      It may be better than alernatives if you really need the performance and low-level capabilities, but if you don't (or only a small part of your project does), you're paying a huge price for wizard points you don't need.

      Glitzy clicky interfaces do not a good product make, but a platform where _some_ thought has been given to workflow really is something we should start to expect in this day and age.

      --
      sudo ergo sum
    3. Re:To be fair to the corporates by iron-kurton · · Score: 2, Insightful

      It's true that programmers fall victim to fad-ism, but the fact is that the learning curve of Perl is quite steep compared to that of PHP. PHP (and, arguably ASP) brought something to the table that Perl lacks -- readability, comprehensibility, expandability.

      As far as RoR is concerned, it's nothing new -- it's simply a framework (a very young, immature one, at that, in terms of software maturity) that could have been written in ANY language (PHP on Rails, anyone?). This is why we're seeing RoR developers get frustrated and go back to PHP!

      I haven't heard many PHP developers going back to Perl.

      --
      Change is inevitable, except from a vending machine -- Robert C. Gallagher
    4. Re:To be fair to the corporates by Jedi+Alec · · Score: 1

      It's true that programmers fall victim to fad-ism, but the fact is that the learning curve of Perl is quite steep compared to that of PHP.

      I've never quite understood this. Now, I put a relatively large amount of time into making my own code readable, well commented and otherwise maintain good coding practices. True, I have encountered self-proclaimed php writers who couldn't make sense of my code. Then again, those same php writers also had no clue how to write a loop or what a regular expression was, used copy-paste as much as actual typing and delivered huge files of spaghetti, so if you don't mind I'm not placing too much value on their opinion.

      Is it really that hard to consistently write little black boxes that are both documented on the inside and outside? This is x, if you put y in you consistently get z back. Heck, Perl even allows doing everything in an OO fashion if that strikes your fancy.

      --

      People replying to my sig annoy me. That's why I change it all the time.
    5. Re:To be fair to the corporates by Niten · · Score: 1

      I haven't heard many PHP developers going back to Perl.

      I wrote my first CGI scripts in Perl, but I started using PHP for most of my projects a couple years ago, back when everyone else was switching to it too. But over time it became painfully obvious that, of the two, Perl is by far the more coherent and powerful language. Now I use Perl for most things again.

      So that's one data point, anyway...

    6. Re:To be fair to the corporates by Anonymous Coward · · Score: 0

      > It's true that programmers fall victim to fad-ism, but the fact is that the learning curve of Perl is quite steep compared to that of PHP.

      The learning curve is only a factor if you never read anyone else's code and no-one else touches yours. Once you move beyond your bedroom and into the real world, you can't expect people to limit themselves to whichever arbitrary subset of the language you bothered to learn. In that sense, what's relevant isn't the gradient at the bottom of the curve, but the height at the top.

    7. Re:To be fair to the corporates by Anonymous Coward · · Score: 0

      Whoever said C/C++ are dead don't do game or embedded system development.

      I don't know what innate spirit you are talking about. True if you want to do something stupid the compiler will not stop you, but that just made me get better at trapping errors and such. Of course when I started coding, you just couldn't assume anyone was using anything beyond stdin/stdout... no mouse, printer, etc. So I always check for something before I try to use it.

      Don't get me wrong, I don't feel that C/C++ are right for every problem. Sometimes you need a wrench, sometimes you need a hammer. You should let your job dictate the tool, not the other way around.

      No programming language is perfect for every solution.

    8. Re:To be fair to the corporates by evil_aar0n · · Score: 1

      I have to wonder whether it was the language, or the libraries you were using.

      I've done that - gone away for some time and come back - and I didn't find it all that bad.

      --
      Truth, Justice. Or the American Way.
    9. Re:To be fair to the corporates by Vexorian · · Score: 2, Insightful

      Sometimes I get the impression that the prophets for the Cs' demise might keep being wrong from quite a while, this has been predicted even since the nineties and the Cs are still around, I think that more dynamic languages focused in easy to use and fast development of mediocre apps are good things, however they are more likely to replace each other than to replace the Cs which are meant for another kind of application.

      I mean, python's all right as a language, but even if python took over - someone will have to code the interpreter...

      --

      Copyright infringement is "piracy" in the same way DRM is "consumer rape"
    10. Re:To be fair to the corporates by famebait · · Score: 1

      The libraries were pretty standard. I guess I never coded C++ intensively enough for it to really get into my fingers, but I still maintain that returning to C++ after C# feels like you are doing half the compiler's job manually. All those little things have to be there but do nothing to express the point of what you're doing. Even Java feels slightly like that compared to C#, but on a microscopic scale compared to C++.

      --
      sudo ergo sum
    11. Re:To be fair to the corporates by encoderer · · Score: 2, Interesting

      C++ is still around for a reason. There are whole classes of problems that simply cannot be solved using the higher level languages you're used to.

      Anyone that's ever used C++ for more than the required chapter in school would probably agree that it's not a language for dabblers.

      That is, if you want to get GOOD at C++, you need to use it regularly. You need to get GOOD at it. When you do, you learn how to avoid the most painful/tedious parts. You have easily accessible things in your toolbox, like a solid string class that you understand well.

      And you learn to avoid things like MFC where they're not needed.

      And more than anything, a good C++ developer knows that his language can do anything, and faster, than a higher level language. Device drivers. OS Kernels. Things like that.

      I'm no longer a FT C++ dev, but I did it for a long time. The ability to create and boot your very own OS is so, so worth the investment you make in the language.

      I'd never create a CRUD app in C++ because I can't see any reason I'd need to. But I could if I wanted to. And that's something that, say, a Ruby or PHP developer couldn't say (That they could build ANYTHING they wantetd to).

      And, really, if you think PHP is a "nasty hack" then you seem to me to be trading only in cliches here.

      I'm not a huge fan of PHP, but it's a modern language. It's library is ugly. It lacks naming conventions. But its actual code-base is really quite good. If you want to see some well done C++ code, check out the PHP internals. It's made a lot of progress in the last 5-7 years.

    12. Re:To be fair to the corporates by famebait · · Score: 1

      As my first post said, there is still stuff that C++ is best for (low-level or extremely performance critical things), but the stuff most people make with it is better served by something else.

      Nasty hack was indeed a bit unfair. I've been coding php full time lately, and version 5 is finally possible to do real work in, and the Zend framework constitutes a really nice standard library as well.
      It's just that every now and again you bump into some esoteric remnant or limitation that has you screaming "WHY?" to the heavens.

      Along with the regular annoyances of $this not being part of the scope, and the ability to read variables that have never been defined or assigned to.

      --
      sudo ergo sum
    13. Re:To be fair to the corporates by encoderer · · Score: 1

      You're right about those last 2. I make my devs code PHP at E_NOTICE so they can initialize variables before reading/appending them. It would be nice if there was a strict mode that could raise those errs as an E_WARNING instead of E_NOTICE.

      And you're totally right about scoping issues w/ $this.

      We have a company-wide template in Zend studio called 'thischk' that we put at the top of any non-static method. It checks that $this is an instanceof whatever the current class is, or else it throws an exception.

      (That is, the template uses a variable so when the template is inserted into the code it's replaced by the actual name of the class. Important because the __class__ magic variable has the same scoping problem)

    14. Re:To be fair to the corporates by pherthyl · · Score: 1

      MY GOD how painful it makes a lot of really trivial things. Even the nasty hack known as PHP starts looking well planned in this light.

      It may be better than alernatives if you really need the performance and low-level capabilities, but if you don't (or only a small part of your project does), you're paying a huge price for wizard points you don't need.

      Others have mentioned it, but it really comes down to what classes you use. Stay away from anything produced by microsoft for example (MFC is the devil), and the C++ standard libraries are also of very limited use in modern programs. Go for a complete class library like Qt, and you get a language that's very near as easy to use as C# with all the advantages of C++ (native speeds, cross platform).

    15. Re:To be fair to the corporates by famebait · · Score: 1

      Sure there are workarounds, but to me that does not defend the problems being there in the firt place.
      Most of them have little or nothing to do with its power or speed anymore anyway, they're just plain dreadful design and obsolete baggage.

      --
      sudo ergo sum
    16. Re:To be fair to the corporates by Blakey+Rat · · Score: 1

      I felt the same way when I returned to some C coding after doing tons of web work in Javascript/ECMAScript. C is just painful, even setting up the simpliest functions takes three times as much work as in Javascript and the list of things Javascript can do that C can't is nearly endless.

      And Javacsript libraries (in this case, DOM) suck ass.

    17. Re:To be fair to the corporates by ojustgiveitup · · Score: 1

      I'm not a Ruby fanboy, but I do like Ruby, and I find it particularly useful in making less complex and thus more readable versions of everything I used to use Perl for. Fanboism aside (on both sides of the aisle), what do people use Perl for these days that could not be done as well in Ruby?

    18. Re:To be fair to the corporates by jc42 · · Score: 1

      Anyone that's ever used C++ for more than the required chapter in school would probably agree that it's not a language for dabblers.

      I think you've hit onto an elegant explanation for the success of perl: It is a language for dabblers. That was more or less one of its many design goals. And this is one of the main reasons that there's so much crap code in perl. Most perl code was written by dabblers.

      It's not the only language like this, of course. Ease-of-entry was much of the original attraction of languages like Cobol and Basic. The result in all such cases is that the language gets the blame for all the awful, incomprehensible code produced by dabblers (including programmers who are experts in some other language, but are just dabbling in the "easy" language).

      And the whole argument falls down on the old observation that it is always easy for a poor programmer to write bad code in any language. Management tends to not understand (or believe) this, making them fall for the claims that some New! Improved! language will solve all the problems of those awful old languages. So they spend a lot of money and time converting to the latest fad language. In a few years, they (or their successors) see that most of the code in the new language is incomprehensible, unmaintainable crap. They don't believe that the real reason is their management style, not the language, and they're ready to impose the next programming fad on their organization.

      Well, it does make for some fun learning experiences for those of us who like learning new languages. But it'll never lead to a body of good code. For that, you need to hire (and keep) some good programmers, with software managers who actually understand how to keep it organized.

      And if you do that, you're likely to find that all your software has been rewritten in LISP, so management will never go for it. ;-)

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
    19. Re:To be fair to the corporates by mr_mischief · · Score: 1

      On the up side for C++ is the fine-grained control it gives you. On the down side for C++ is the fine-grained control it demands of you.

      You can use smart pointers, better string libraries, garbage collection libraries, and more to make you life with C++ easier.

      If you're using garbage collection and string libraries, though, you're not gaining quite as much performance by using C++. You're also probably not using the same garbage collection and string libraries as your next hire used at his last employer.

      You start getting the same issues as Perl, the many Pascal flavors, and Forth: there are more ways to do something than you need. Not all of them are compatible with one another, not all of them work as well alone as the incompatible pieces, and not all of them are familiar to the maintainer.

      The problem is not the language, but how it's extended. The whole reason for standardization of languages is that once people start extending them, they start extending them in different ways. That's why CPL is not BCPL is not B is not K&R C is not the first ISO C which is not C99 which is not C++ which is not D, C# or Objective C.

      Perl 5 is not Perl 4 and Perl 6 will not be Perl 5. Turbo Pascal is not ISO Pascal, Objective Pascal is neither of those. VB is not Dartmouth Basic, QuickBASIC, or LibertyBasic. Scheme is related to Lisp, but is not Common Lisp. Arc is not quite Scheme. OCaml is not Caml is not Standard ML of New Jersey.

      It's time that Perl got a rewrite and a stronger standard. There's an actual language specification for Perl 6, and there will be multiple compatible implementations. That's how C evolved. It's only natural that as many ways to do something come along that a few of the best get selected for a new iteration. C++ might be next if any of Java, D, C#, Objective C, and whatever else aren't considered close enough descendants already.

    20. Re:To be fair to the corporates by mr_mischief · · Score: 1

      Most of them have to do with using a systems language to write user-level applications.

    21. Re:To be fair to the corporates by Anonymous Coward · · Score: 0

      Try D. Almost the performance and low-level access of C/C++, but with MUCH more powerful concepts.

    22. Re:To be fair to the corporates by King_TJ · · Score: 1

      I dunno. One of my good friends is doing a LOT of analysis of all of these "current generation" programming languages and development frameworks. He has a need to do some coding for his current employer, and they're pretty much "language neutral", as long as he picks a sensible one and can get the work done efficiently in the one he goes with.

      He came from more of a systems administration background than a programming one, but used to rather like perl and php, when he dabbled in them to write web apps that accessed back-end databases and such.

      Now that he's gotten really deep into all of this, watching everyone's training videos and tutorials, reading tons of example code, etc. - he tells me he's leaning heavily towards python as the "best overall solution", and a growing preference for django as a framework of choice.

      Like many others here commented, he found perl to be sub-optimal because as a general rule, code written in it is harder to follow than the same thing done in python. Performance and "portability" across platforms is roughly equal. But the "harder to follow code" in perl bites you in the butt 2 ways. Obviously, it means other people might have a tough time figuring out what YOU coded, and you might even have a tough time with your OWN code if you haven't visited it in a while. But it ALSO means the pre-made libraries of code snippets other people have out there can be harder to manage. They're fine if they do what they say, and that's exactly what you need. But later on, you might change something that requires it to change too -- and then you're struggling again, trying to learn how the darn thing does what it does.

      Incidentally, his opinion on "Ruby on Rails" was; Ruby itself is great, but the Rails dev. team seems a lot more immature, all the way around, than some of their competitors. Instead of objectively considering criticisms of various things they do in their framework, they tend to resort to name-calling, down-talking the alternatives and insisting their way is "best".

    23. Re:To be fair to the corporates by Anonymous Coward · · Score: 0

      Sometimes you need to change the underlying tech simply to retrain human behaviors. If they know how to do something poorly in Perl and you switch to another tech they're forced to change how they do it and you get a chance to retrain them.

    24. Re:To be fair to the corporates by wmbetts · · Score: 1

      Not to be nit picky, but the part of the PHP code base I looked at was C.

      --
      "Ubuntu" -- an African word, meaning "Slackware is too hard for me". - stolen from Dan C alt.os.linux.slackware
    25. Re:To be fair to the corporates by Anonymous Coward · · Score: 0

      The libraries were pretty standard. I guess I never coded C++ intensively enough for it to really get into my fingers, but I still maintain that returning to C++ after C# feels like you are doing half the compiler's job manually. All those little things have to be there but do nothing to express the point of what you're doing. Even Java feels slightly like that compared to C#, but on a microscopic scale compared to C++.

      I'm having the opposite experience working back and forth on two projects, one in C# and the other in C++ and Delphi. C# has its share of constructs that "have to be there but do nothing to express the point of what you're doing". C#, like Java, requires the member access specifier (private, protected, etc.) on every class member for which you don't want the default member access; in C++ & Delphi, the access specifier applies to every subsequent member until the next access specifier (or the end of the class). Now, that's just verbose and annoying, but C# switch statements really irritate me. In a C# switch statement, you cannot "fall through" from one non-empty case to the next case - this is part of the language definition, and case fall-through a recognized source of bugs in C/C++ code. Despite that (entirely reasonable) language constraint, the compiler still requires the (pointless) break statement. Not only that, but the compiler requires the break statement even on the last case in the switch statement. Think about that: there's nothing to fall-through to, yet the compiler requires that final break statement. I'm using C# 2.0, so maybe they've fixed that particular stupidity in C# 3.0.

      I have my list of gripes about C++, too, but I'd rather use it than C# for almost anything. Some of the standard .Net assemblies provide compelling counter-arguments, though.

      - T

    26. Re:To be fair to the corporates by iron-kurton · · Score: 1

      You quoted me saying that PHP has a less steep learning curve than Perl. Then you argued against that claim by saying that you write neat code, and that coders can, in fact, write neat Perl code? I don't mean to sound smug, but I honestly fail to see a connection.

      I never claimed that Perl code was messy or that PHP code was neater. All I said was that given 5 hours with a decent book, a person learning PHP will be able to accomplish a lot more than the person learning Perl at the end of the day.

      --
      Change is inevitable, except from a vending machine -- Robert C. Gallagher
    27. Re:To be fair to the corporates by iron-kurton · · Score: 1

      Let's keep the conversation civil, and the insults to a minimum. You don't know me, and making sweeping generalizations about my knowledge level just makes you look like an ass.

      --
      Change is inevitable, except from a vending machine -- Robert C. Gallagher
    28. Re:To be fair to the corporates by serge587 · · Score: 1

      Kind of like .NET?

    29. Re:To be fair to the corporates by chromatic · · Score: 1

      All I said was that given 5 hours with a decent book, a person learning PHP will be able to accomplish a lot more than the person learning Perl at the end of the day.

      Perhaps in the domain of the web, which is PHP's only successful ecological niche. Not all Perl programmers are web programmers.

    30. Re:To be fair to the corporates by Jedi+Alec · · Score: 1

      Not only that, but php has a separate function for the most obscure of things, whereas with perl one typically falls back on the basic concepts of programming. Hence, someone who is already familiar with programming in general will probably a lot more productive after having spent 5 hours with perl for dummies than he would with the php equivalent, from what i gather.

      --

      People replying to my sig annoy me. That's why I change it all the time.
  7. heyho, python - the new perl. by apodyopsis · · Score: 3, Interesting

    python seems to be the new perl - ie. a general purpose, scripting glue language. its small number of keywords and simple layout make it easier for the less technical minded to learn quickly.

    of course, many people will prefer to use perl because of its larger amount of add-ons and clever tricks.

    at work I use PHP a lot for many of my simulations and quick fixes, its really good for processing 2M line data files (try doing that with excel). I know its not what it was originally designed for, but it works for me.

    look on the bright side, perl will no longer be learnt by many people and in a few years legacy "perl coders" can command higher wages to work on "legacy system" - much like COBOL programmer do now (though there are less of them every year).

    I think this is the way it will always be, there will always be a simpler language to replace the old standards, and a new shiny technology that those who have managerial power but less technical knowledge can mandate from on high.

    so, what happened to java? I liked it, it never went away but seems to hover on the edge.

    1. Re:heyho, python - the new perl. by mcvos · · Score: 3, Interesting

      python seems to be the new perl

      There's one big diifference, however: python is a well-designed, highly structured language. Perl sort of grew organically from a couple of scripting languages, and had OO pasted on later.

      Perl is probably brilliant for simple scripts, but should not be used for large programs. Python is very useful for large programs, however.

      so, what happened to java? I liked it, it never went away but seems to hover on the edge.

      On the edge of what? Java is the biggest programming language in the world today. It dominates the web and mobile phones, and although it's not quite as popular for desktop programs, it's not uncommon there either.

      It's not a scripting language like Perl, however, so if your world looks like Perl, you may not notice Java that much.

    2. Re:heyho, python - the new perl. by Anonymous Coward · · Score: 0

      I don't do much coding now and if I do it's in java. I used to use perl exclusively for prototyping. It was easy to knock up an 80 line program that did EVERYTHING.

      To do the same in java these days, it probably takes 80 lines, but you need to import a dozen classes.

    3. Re:heyho, python - the new perl. by Anonymous Coward · · Score: 4, Insightful

      so, what happened to java? I liked it, it never went away but seems to hover on the edge.

      On the edge of what? Java is the biggest programming language in the world today. It dominates the web and mobile phones, and although it's not quite as popular for desktop programs, it's not uncommon there either.

      It's not a scripting language like Perl, however, so if your world looks like Perl, you may not notice Java that much.

      Your assertion that Java 'dominates the web' is laughable, as applets have been a near-total failure, replaced wholesale by Flash- and AJAX-based systems, while on the backend PHP, Perl and more recently Python and Ruby have eaten Java's lunch. Where Java has succeeded is on big iron and with corporate accountingware (it is the new COBOL, much as C# is the new VB), and on mobile phones (as you stated), with some moderate success on the desktop.

    4. Re:heyho, python - the new perl. by DJProtoss · · Score: 1

      Perl is probably brilliant for simple scripts, but should not be used for large programs. Python is very useful for large programs, however.

      I agree. However, I'll go further and say for most simple scripts sh ( or at a push bash ) is better. The only thing you can't easily do is arrays ( which you *can* do, but its nasty ). Oh, and the performance can be poor if you have too many calls to sed. On the other hand, if its a sufficiently time critical / important script that a few extra seconds because of all the spawning matters, I'd probably be cracking out the c compiler anyway...

      --
      "Success is based on knowing how far to go in going too far"
    5. Re:heyho, python - the new perl. by baest · · Score: 3, Insightful

      There's one big diifference, however: python is a well-designed, highly structured language. Perl sort of grew organically from a couple of scripting languages, and had OO pasted on later.

      You can argue that Perl's OO is pasted on, which is somewhat true, but that doesn't mean that it isn't powerfull. Try Moose. Certainly OO is a thing being fixed in Perl6. Until that is available use Moose or try to realize that OOP isn't the only form of programming.

      Saying indirectly that Perl5 isn't well designed, just pisses me off. It grew organically, but changed during these years and got refined. If you keep to best practises, Perl code can be as readable as any language and even better as it is more powerfull.

    6. Re:heyho, python - the new perl. by js_sebastian · · Score: 1

      I love python, but I see my own python projects (developed at astonishing speed) quickly become pretty ugly, as opposed to say, my C++ code which mostly has a reasonably thought out design. That's mostly ok, as most of them are prototypes anyway... but you never know when a prototype will turn into something else!

      I think a robust python codebase requires strong committment to quality coding standards, and an automatic checker to enforce at least some of them. I'm not sure if pychecker cuts it. Otherwise it's just too easy to do potentially evil things (like adding members to a class from outside the class, which is convenient but very confusing too, or getting into the whole import mess with too many from import *). Oh and unit tests, unit tests...

    7. Re:heyho, python - the new perl. by mcvos · · Score: 3, Insightful

      On the edge of what? Java is the biggest programming language in the world today. It dominates the web and mobile phones, and although it's not quite as popular for desktop programs, it's not uncommon there either.

      It's not a scripting language like Perl, however, so if your world looks like Perl, you may not notice Java that much.

      Your assertion that Java 'dominates the web' is laughable,

      No, it's your suggestion that applets are even relevant to this discussion that's laughable.

      Have you ever heard of servlets? Have you head of the dozens of web frameworks that run in them?

      You're living 10 years in the past. Right now, Java does dominate the web backend. PHP and Perl are hasbeens, and simply not suitable for the large scale web applications of today. Ruby is deifintely up and coming, but is still a long way from eating Java's lunch (though I'm sure that will happen someday -- I hope it will, because Java kinda sucks).

    8. Re:heyho, python - the new perl. by Fross · · Score: 4, Informative

      Applets? This isn't 1998.

      If you missed it, this thred is about corporates. All the big players - governments, big iron (ibm, etc), large enterprise developers (logica, capita, etc), military and most cutting-edge science development projects, use Java for Enterprise-grade applications.

      Sure, the front-end desktop/browser embedded side is dominated by flash and ajax, with flex on the rise. But only small to medium development houses use much PHP and Python. Ruby is too new/too niche for now, and Perl *is* legacy, due to too few developers around, and no major new projects being written in it (Thank God).

      Thanks for playing, try again sometime.

    9. Re:heyho, python - the new perl. by BlackCreek · · Score: 1

      Your assertion that Java 'dominates the web' is laughable, as applets have been a near-total failure, replaced wholesale by Flash- and AJAX-based systems, while on the backend PHP, Perl and more recently Python and Ruby have eaten Java's lunch.

      There are servlets, and there is also stuff like GWT abstracting javascript into java. Can you get anything like GWT using Python or Ruby? (it's a serious question, if there is stuff like that I would like to look at it)

    10. Re:heyho, python - the new perl. by BlackCreek · · Score: 1

      I think a robust python codebase requires strong committment to quality coding standards, and an automatic checker to enforce at least some of them. I'm not sure if pychecker cuts it. Otherwise it's just too easy to do potentially evil things (like adding members to a class from outside the class, which is convenient but very confusing too, or getting into the whole import mess with too many from import *). Oh and unit tests, unit tests...

      When I was coding python, I used to love pylint.

    11. Re:heyho, python - the new perl. by Ragzouken · · Score: 1

      You can try pylint instead of pychecker, I don't know which is superior.

    12. Re:heyho, python - the new perl. by Anonymous Coward · · Score: 0

      Perl is probably brilliant for simple scripts, but should not be used for large programs. Python is very useful for large programs, however.

      I suppose you consider 100K+ line systems developed in Perl to be small applications? Any language in the right hands can perform small miracles.

    13. Re:heyho, python - the new perl. by mgkimsal2 · · Score: 2, Insightful

      Right now, Java does dominate the web backend.

      In what context? PHP/Perl and to a growing extent Ruby have scads of hosting options for public projects to fit every budget, which means companies and individuals of every budget can write or use web apps and make them available publically at a domain name. This doesn't require any sort of weird mod_rewrite hacks or anything of the sort.

      Website hosting for Java-based apps is abysmal (and more expensive) by comparison. It's far more complicated to set up and maintain, hence fewer orgs offering it, less competition, fewer innovations, and more expensive service. It's also far more memory hungry than typical PHP (and perl, etc) apps.

      There are dozens of web frameworks to run Java apps. So what? There are dozens of web frameworks for PHP. And you can deploy most of them in a couple of minutes on almost any shared web host out there.

      It may 'dominate' the 'web backend' in certain vertical markets in internal usage at many companies. But that's defining the 'web' pretty narrowly.

    14. Re:heyho, python - the new perl. by famebait · · Score: 1

      I suppose you consider 100K+ line systems developed in Perl to be small applications? Any language in the right hands can perform small miracles.

      Sure. But that doesn't make Perl a good or natural choice for large projects.
      If those "right hands" spent a couple of weekends learning a modern OO language
      and its core APIs, they too would be that much more efficient.

      --
      sudo ergo sum
    15. Re:heyho, python - the new perl. by Anonymous Coward · · Score: 0

      It's not a scripting language like Perl, however, so if your world looks like Perl, you may not notice Java that much.

      For a scripting language that runs on the java platform, check out groovy

    16. Re:heyho, python - the new perl. by mcvos · · Score: 1

      Right now, Java does dominate the web backend.

      In what context? PHP/Perl and to a growing extent Ruby have scads of hosting options for public projects to fit every budget, which means companies and individuals of every budget can write or use web apps and make them available publically at a domain name.

      Sure, for small scale and hobby projects PHP, Perl, whatever is perfectly fine. That's what those hosting providers are aimed at. Large corporations tend to use their own IBM/HP supplied server parks, or use corporate hosting providers offering J2EE environments.

      Website hosting for Java-based apps is abysmal (and more expensive) by comparison. It's far more complicated to set up and maintain, hence fewer orgs offering it, less competition, fewer innovations, and more expensive service.

      More expensive, yes, but the rest is bullshit. It's aimed at larger, more complex projects with completely different demands in terms of performance and availlability. Fewer innovations is even more bullshit. You should really take a look at some of the web frameworks in Apache. Many of them are quite a bit more innovative than the stuff that'd happening in PHP.

      As for hosting, you can run them in anything from Jetty on a simple linux server, to full blown clustered Websphere environments, to anything in between (JBoss, WebLogic, and many more).

      It's also far more memory hungry than typical PHP (and perl, etc) apps.

      No idea if that's true, but it's often irrelevant. Memory costs nothing, nowadays. So what if my code caches 100 MB of data permanently in memory? If that helps performance, that's what's needed.

      There are dozens of web frameworks to run Java apps. So what?

      Well, that kinda implies it's not marginal.

      It may 'dominate' the 'web backend' in certain vertical markets in internal usage at many companies. But that's defining the 'web' pretty narrowly.

      It dominates the part of the web that pays salaries to programmers. And that matters to a lot of people.

      Take a look at job vacancies. I haven't checked, but I'm willing to bet that big job sites have more job offers asking for Java or Java-based technologies than PHP.

    17. Re:heyho, python - the new perl. by Richard+W.M.+Jones · · Score: 3, Informative

      There's one big diifference, however: python is a well-designed, highly structured language.

      But still, dynamically typed so we get type errors at customer sites, slow, and memory hogging. (Also 'features' of Perl too). OO-paradigm, so clumsy to use. And the stupid whitespace thing means that patches get misapplied and it's very easy to accidentally misindent some existing code in the editor, not notice, then have the program do some totally different thing.

      Perl is probably brilliant for simple scripts, but should not be used for large programs

      That's complete nonsense. I personally have maintained 100,000-line Perl programs without problems. Divide the program up, factor out modules as libraries, do lots of testing and code reviews. It's really not that hard.

      Rich.

    18. Re:heyho, python - the new perl. by Parham · · Score: 2, Insightful

      Sorry, "hasbeens" is a strong word for a language (PHP) that can run that behemoth we call Facebook. I don't know exactly how much code is behind it, but it can't be small for the stuff they're doing.

    19. Re:heyho, python - the new perl. by Arkham · · Score: 1

      Applets? Oh come on. Applets were never what Java is about. A large majority of corporate server-side software is written in java. The only part of commercial software that java doesn't dominate is the desktop, and it's even becoming the de-facto standard for corporate apps now.

      Java isn't perfect, but it's infinitely more maintainable than Perl. Most places I know of use java for apps they are going to sell, and use python for automation and testing. Perl is generally reviled by anyone who's ever had to deal with it in the past.

      --
      - Vincit qui patitur.
    20. Re:heyho, python - the new perl. by mgkimsal2 · · Score: 1

      Job vacancies:

      relative PHP job growth over past 3 years:
      http://www.indeed.com/jobtrends?q=php&l=&relative=1

      relative Java job growth over past 3 years:
      http://www.indeed.com/jobtrends?q=java&l=&relative=1

      One might simply argue that it takes more people longer to do stuff in Java than in other languages, hence the need for more developers. And it's not always just "Java is superior so we stick with it" as the reason for continued usage. "We've already got 4 years of experience with this tech, let's just keep going with it cause adopting something else will mean more ramp up time." "Sunk cost" analysis I think that's called, and while not always useful, it's used in some (many) shops to justify their decisions.

      Memory costs nothing, nowadays. So what if my code caches 100 MB of data permanently in memory? If that helps performance, that's what's needed.

      I'm primarily talking about the 'shared hosting' market in reply to your comment (it was yours, right?) that "java dominates the web market". "Dominate" is a strong word, and I just simply don't accept that word. Difference of definition perhaps? What constitues 'domination'?

      Many current PHP frameworks are trying to ape Java techniques from years ago (large config files, build processes, etc.). Current Java trends are to move away from that complexity and towards more dynamic language benefits (faster prototyping, etc.) Much of the hype in the Java world these days is around Groovy and JRuby, which provide Grails and Rails for rapid web development.

      It's aimed at larger, more complex projects with completely different demands in terms of performance and availlability.

      This is exactly why I question the term 'dominate'. The huge majority of work out there is not with large corps with 'complex' projects. It is with small busineses dealing with more narrowly defined (but often still very complex) problems. PHP/Perl/Ruby are eating Java's lunch in this space. And guess what? Many of those companies grow up to be larger companies. They will not be running wholesale to adopt Java as they grow up because of some idea that Java 'dominates' the web arena. They will continue to build on their current platforms (PHP/Ruby/etc) and end up 'dominating' their own verticals.

      Java's good for some problems. However, it does not lend itself to rapid prototyping (Grails helps) nor does it lend itself to shared hosting scenarios (which is the majority of 'the web').

    21. Re:heyho, python - the new perl. by Blakey+Rat · · Score: 1

      PHP and Perl are hasbeens, and simply not suitable for the large scale web applications of today.

      Yeah. Like that teeny-tiny Facebook.

      Seriously, you love Java, we get that. But it doesn't even close to "dominate the web backend." I'm not even sure it gives the Microsoft languages a run for its money; most of the huge sites I deal with on a daily basis are Microsoft technologies. (eBay, to give one example.)

    22. Re:heyho, python - the new perl. by Anonymous Coward · · Score: 0

      Uhh.. You realize that Google uses Python right? http://panela.blog-city.com/python_at_google_greg_stein__sdforum.htm

    23. Re:heyho, python - the new perl. by mcvos · · Score: 1

      Any language in the right hands can perform small miracles.

      Definitely true. The problem is that commercial software engineering is more reliable when it's actual engineering, instead of miracle working.

      Despite its many failings, one of the strongest points of Java is that it's really hard to produce utter garbage in it. Even the biggest idiot can be somewhat productive in it.

      This is probably one of the reasons why Java is so popular: consider the amount of demand for programmers, and consider the number of idiots in the world, and you'll quickly see a fit. (The other big reason is that C++ was once very popular, and Java is very much like C++, but without the aggravated brain damage.)

      It may also explain why there are so many Java web frameworks that do everything for you; the miracle workers build the framework, and the idiots use it to build sites.

    24. Re:heyho, python - the new perl. by mcvos · · Score: 1

      There's one big difference, however: python is a well-designed, highly structured language.

      But still, dynamically typed so we get type errors at customer sites, slow, and memory hogging.

      I can't help you with the speed, but with good unit testing you should be able to catch those type errors.

      I used to think that Java's static typing was a big advantage over dynamic typing, but not anymore. While the compiler will catch type errors for you, you still need to test every possible situation for other bugs. Besides, if you don't use generics everywhere (and who would blame you?), you can still get casting errors.

      And once you've got good unit tests for every conceivable scenario, does it matter if a type error is caught by the compiler or the test? No, it doesn't.

      So despite my Java background, I'm now seriously looking at Ruby (and to a lesser extend Python).

    25. Re:heyho, python - the new perl. by syousef · · Score: 1

      Java kinda sucks

      Java's got a few rough edges but it doesn't suck. What sucks is the crudware bloated frameworks which in turn implement the ShinyNewWillSaveYourBusiness people insist on using pattern that people insist on using, even where something simpler is going to do the job much better.

      In other words Java doesn't suck. EJBs suck. Hibernate sucks. Struts sucks. Spring sucks. Try working on a project that uses them all. The other pain in the arse is that none of the technologies last for more than about 3 years before someone finally does say "Hey this sucks" and starts again, only to make the same mistakes with a whole new framework you have to learn.

      Seriously, how much did ANSI C change over the years. If you took a 5 year break from coding Java you'd have to practically start again. Even the core language is still evolving.

      --
      These posts express my own personal views, not those of my employer
    26. Re:heyho, python - the new perl. by Anonymous Coward · · Score: 0

      PHP and Perl are hasbeens, and simply not suitable for the large scale web applications of today.

      I think Facebook, Yahoo and a plethora of others will disagree with you on that.

    27. Re:heyho, python - the new perl. by Anonymous Coward · · Score: 0

      Are you aware of the fact that *NONE* of the mega-sites uses Java in any form ? Coincidence ?

    28. Re:heyho, python - the new perl. by encoderer · · Score: 1

      Lumping PHP & Perl together is incorrect. For one, PHP is finally approaching consideration as a "modern" language. It's still being improved upon. And while there's a lot of bad PHP, there's also a lot of bad Java.

      Java is right for large applications. For small apps, it's over-engineered. It guides a dev into a multi-tiered architecture. This is good, except when it's overkill.

      The secret to being a good dev, with highly marketable skills is simple:

      Pick one language from each group:

      Group A:
      Java, C#, Obj-C

      Group B:
      Python, Ruby, PHP

      Group C:
      Perl, VBScript

      Obviously this depends on the technology stack at any given company. But if you're a dev that brings:

      Java, Python, and Perl

      or

      C#, PHP and VBScript

      or

      Obj-c, Ruby, and Perl,

      etc, etc, etc

      then you're going to be a valuable team member and you're going to have no trouble finding work.

      Of course, the judgment to know when to use each is also very important.

    29. Re:heyho, python - the new perl. by ukpyr · · Score: 1

      Angry much? Worried about your job security or something?

      Settle down. Plenty of large corporation rely on Perl, Python, PHP, Ruby/rails to keep their business going or provide critical services.

      To deny that is to admit you've not been around much.

    30. Re:heyho, python - the new perl. by Richard+W.M.+Jones · · Score: 1

      I used to think that Java's static typing was a big advantage over dynamic typing, but not anymore. While the compiler will catch type errors for you, you still need to test every possible situation for other bugs. Besides, if you don't use generics everywhere (and who would blame you?), you can still get casting errors.

      Yeah, I mean I wouldn't really say that Java is a serious contender here. It doesn't even have type inference, and it's got the effectively typeless Object class which defeats static typing as you say, because the designers of the language didn't know about polymorphic types. And of course, NullPointerException - modern day languages have type systems which can catch that.

      See my slashdot signature for the language I usually advocate ...

      Rich.

    31. Re:heyho, python - the new perl. by Anonymous Coward · · Score: 0

      If you really think that most websites run Java, your view of the world must be pretty limited. Banks use Java for websites. Companies that have existing Java back-ends use Java for websites. It's still a god-awful clusterfuck, it takes enormous effort to do even the simplest of things.

      Everyone else uses either PHP or ASP.Net, depending on background.

      As long as you aren't an idiot, PHP is so much quicker and simpler to develop with than Java. Granted, you can produce crap if you don't know what you're doing, but with Java you wouldn't be able to produce anything.

      Really, scaling a PHP app is not hard. Far easier than Java, in fact. As long as you don't share state between requests except using a database, and have PHP set up correctly, it scales very easily.

    32. Re:heyho, python - the new perl. by mcvos · · Score: 1

      Job vacancies:

      relative PHP job growth over past 3 years:
      http://www.indeed.com/jobtrends?q=php&l=&relative=1

      relative Java job growth over past 3 years:
      http://www.indeed.com/jobtrends?q=java&l=&relative=1

      If you want the full picture, you'll have to click on "absolute". Then you'll see Java has about 5 times as many jobs. And does this also count job description that ask for Java technologies without asking explicitly for Java?

      One might simply argue that it takes more people longer to do stuff in Java than in other languages, hence the need for more developers.

      Yeah, sure, its lack of productivity is why Java is such a success. Not that I'm claiming that Java is terribly productive, mind you. Ruby is much better, and I suspect so is Python. PHP is no doubt more productive for smaller applications, but I have my doubts about large applications.

      But the real reason Java is so popular is because it's established, well-supported, reliable technology running on one of the best (safest, fastest) VMs currently availlable. You don't do bank transactions in PHP. Lots of people do bank transactions in Java, however.

      I'm primarily talking about the 'shared hosting' market

      But that's only a small part of the market. I'm talking about web development in general. This includes hobby projects and web forums, but also corporate websites, webservices, internet banking, and tons of other stuff.

      in reply to your comment (it was yours, right?) that "java dominates the web market". "Dominate" is a strong word, and I just simply don't accept that word. Difference of definition perhaps? What constitues 'domination'?

      Well, Java certainly dominates the enterprise end of the market, and that's pretty big.

      Ofcourse there are a lot of ways to measure size. Is it number of websites, number of servers, number of programmers, amount of money, lines of code?

      I believe a while ago there was a slashdot article about the most discussed languages on the web, and I believe Java was #1 or #2 on that list.

      This is exactly why I question the term 'dominate'. The huge majority of work out there is not with large corps with 'complex' projects.

      That depends entire on how you calculate your huge majority. For number of websites involved perhaps not, but if you look at number of man-hours involved, it changes.

      It is with small busineses dealing with more narrowly defined (but often still very complex) problems. PHP/Perl/Ruby are eating Java's lunch in this space.

      Are they? I know a lot of Java companies that are quite successful at building websites for small companies. A lot of our older customers are small.

      I also knew of a government website that was built in PHP for that matter, but it fell over everytime people had a reason to visit it. We redid it in Java and now it's rock solid.

      And guess what? Many of those companies grow up to be larger companies. They will not be running wholesale to adopt Java as they grow up because of some idea that Java 'dominates' the web arena.

      There is a reason why Java dominates. As they grow up, their needs and requirements will grow too. Even my employer did some sites in ASP and PHP in its early days. But it turned out Java fit our requirements much better.

      Java's good for some problems. However, it does not lend itself to rapid prototyping (Grails helps)

      I'll grant you that. Although there are also some very productive Java frameworks.

      nor does it lend itself to shared hosting scenarios (which is the majority of 'the web').

      I disagree on both counts. Shared hos

    33. Re:heyho, python - the new perl. by Anonymous Coward · · Score: 1, Insightful

      Suitability aside, there's nothing that can be written in Java that can't be run at the same scale written in Perl or PHP. This is just ignorance passed around as "common wisdom". As is often the case, this "common wisdom" is completely lacking in any wisdom at all.

      Ruby is definitely the shiny buzz of the day, but it will likely end up going nowhere because there's no rational basis for its present popularity and this will be realized soon enough. Expect Java to stick around until something we have yet to see takes over.

    34. Re:heyho, python - the new perl. by mcvos · · Score: 1

      Seriously, you love Java, we get that.

      I don't, actually. I used to, but it got rather awkward to work with due to an overdose of architecture. I'm looking for a fresh start with Ruby. Lots of stuff that's hard but necessary in Java, is trivial in Ruby.

      But it doesn't even close to "dominate the web backend." I'm not even sure it gives the Microsoft languages a run for its money; most of the huge sites I deal with on a daily basis are Microsoft technologies. (eBay, to give one example.)

      Ofcourse there are a lot more languages than just Java, but Java is big. "Dominates" is probably an overstatement, as I don't think any language has a more than 50% share, but I'm pretty sure Java is #1 or #2, and it does dominate the enterprise web market. Lots of large companies with more money than sense just don't feel safe without an expensive J2EE server (which is not always better than a simple linux server with Jetty or tomcat).

    35. Re:heyho, python - the new perl. by mcvos · · Score: 1

      Java kinda sucks

      Java's got a few rough edges but it doesn't suck. What sucks is the crudware bloated frameworks which in turn implement the ShinyNewWillSaveYourBusiness people insist on using pattern that people insist on using, even where something simpler is going to do the job much better.

      In other words Java doesn't suck. EJBs suck. Hibernate sucks. Struts sucks. Spring sucks. Try working on a project that uses them all.

      Nowadays that's almost all of them. Well, not Struts. That one is on the way out, fortunately.

      The other pain in the arse is that none of the technologies last for more than about 3 years before someone finally does say "Hey this sucks" and starts again, only to make the same mistakes with a whole new framework you have to learn.

      I agree. Yes, some of those frameworks really are cool and very productive. Take a look at Wicket, for example. Coolest framework I've seen in ages. Yet also not perfect.

      Seriously, how much did ANSI C change over the years. If you took a 5 year break from coding Java you'd have to practically start again. Even the core language is still evolving.

      And it's evolving in the wrong way. I think static typic is a lost cause. I keep hearing more and more Java veterans praising the joy the working with Ruby or Python. I think the future will definitely look like one of those two. But Java is the present, for now.

    36. Re:heyho, python - the new perl. by Fross · · Score: 1

      I've been around enterprise-grade stuff long enough to know what tech the big solution players specialise in. If you want to talk corporate you're in the league of Logica, Accenture and the like. Java, Oracle and SAP. I've also worked a lot in the medium-large business sector, and sure, they do use Perl, PHP, Python and the like extensively. I've used it there myself. But that is not corporate. They don't have Enterprise-level solutions.

      When I see one of those solution providers recommending a military or government-grade system in perl, I'll laugh. Actually, I won't, that would be kind of scary.

    37. Re:heyho, python - the new perl. by Alpha830RulZ · · Score: 1

      In what context?

      Anything down by enterprises like banks or fortune 2000 companies, or that is large enough that shared web hosting is irrelevant. The LAMP stack, is popular and useful for smaller endeavors, but most people going large are either on the .Net or Java/JSP/Oracle stacks.

      --
      I was taught to respect my elders. The trouble is, it's getting harder and harder to find some.
    38. Re:heyho, python - the new perl. by Anonymous Coward · · Score: 0

      To start with, I hate perl, but your comment is really hilarious.

      python is a well-designed, highly structured language

      I have three words for you:

      Global Interpreter Lock

      Python may be highly structured, but it is *not* well designed.

      At All.

    39. Re:heyho, python - the new perl. by Anonymous Coward · · Score: 0

      As an X perl programmer, I disagree statements that perl has more "add ons". It is true
      that you can find anything under the sun at CPAN, but 95 percent of the functionality
      that I require is included in python's base lib. The constant need to visit CPAN for
      modules has cause many problems for the organization that I work for.

      One other thing mentioned in another post. Perl's OO is a joke. The last time I reviewed
      the implementation for OO in perl6, it was still a joke. Just an opinion.

    40. Re:heyho, python - the new perl. by Skapare · · Score: 1

      On the edge of what? Java is the biggest programming language in the world today. It dominates the web and mobile phones, and although it's not quite as popular for desktop programs, it's not uncommon there either.

      You mean desktop programs like Eclipse.

      --
      now we need to go OSS in diesel cars
    41. Re:heyho, python - the new perl. by Anonymous Coward · · Score: 0

      Well, I've been writing in PHP and Python for a living: I like static typing. So many of the ways in which dynamic types are used are essentially error-prone lazy shortcuts that create libraries where you have to check the docs constantly to figure out whether an error is False or Null or -1 or "" etc.

      and it's got the effectively typeless Object class which defeats static typing

      No, it says that the type must be an Object that is a class or subclass of the base Object class. End of story. It doesn't defeat or subvert the static typing system any more than inheritance "subverts" object class restrictions.

    42. Re:heyho, python - the new perl. by mr_mischief · · Score: 1

      So does CCP. They run EVE Online, the world's largest online game, which they developed in Stackless Python.

      I'm not a huge fan of Python as a programmer. I'm primarily a Perl guy myself. That's just personal taste and is entirely subjective. Despite my dislike of its syntax and that it mostly fills a niche I've already covered with more than one other language I've considered giving it a go just because of the projects for which I've seen it used.

      There are many wonderful things being done with Python, and they range from small things to huge things. Anyone who underestimates what Python and its community are capable of getting done do so at their own peril. From Google and EVE down to my favorite solitaire game (PySol), it's a language and group of developers worthy of respect.

    43. Re:heyho, python - the new perl. by jez9999 · · Score: 1

      Right now, Java does dominate the web backend.

      I dunno, maybe my 'feel' for the market is way off... but I'm currently working in a web development company and looking for a new job at the same time (or just seeing what's out there). The VAST majority of contact I get from recruitment companies is from people wanting C#/ASP.net developers. I'm talking 90-95% of contact. So, C#/ASP.net feels like it's dominating more than Java.

    44. Re:heyho, python - the new perl. by sirdisc · · Score: 1

      To even suggest ruby or php or perl for real enterprise applications is utterly laughable and comes from dynamic script kiddies or system admins who know nothing else, not true enterprise programming and development.

    45. Re:heyho, python - the new perl. by Anonymous Coward · · Score: 0

      I know someone who works at Facebook. There are people inside Facebook trying to figure out a way to transition from the PHP to Python.

      PHP is an expensive way to run Facebook. They need far more servers than they would if they ran on something sane. They are trying to improve the performance of PHP but that's not easy.

      Not everyone at Facebook cares about this, but there is a strong "rebel alliance" trying to push for Python.

      I don't understand why they don't just start using Django for new features, and gradually wean themselves over. The person I know said "that is not happening" and did not elaborate.

    46. Re:heyho, python - the new perl. by mr_mischief · · Score: 1

      I'm sure Yahoo!, Amazon, CSC, and the BBC will be glad to hear it.

    47. Re:heyho, python - the new perl. by Haeleth · · Score: 1

      python is a well-designed, highly structured language

      This is a popular myth among Python fanboys. It's highly questionable.

      Not to mention that Perl actually has a number of extremely valuable structuring features which Python lacks. I'm thinking of things like proper lexical scoping, and requiring variables to be declared -- both of these make it a lot easier for those of us with backgrounds in "real" programming languages to write robust and readable code in Perl than in Python.

      (And I'm not a Perl fanboy here; I'm not a fan of dynamically typed languages at all, and much prefer C++ or OCaml for large projects.)

    48. Re:heyho, python - the new perl. by Haeleth · · Score: 1

      However, I'll go further and say for most simple scripts sh ( or at a push bash ) is better

      You must live in a single-platform world. As soon as a second platform comes into the equation, shell scripting becomes a world of pain.

      As for performance being poor... damn right it is. I replaced a "simple" ksh script with a simple Perl script a few months back. The ksh script was taking up to five minutes to run, only worked on one of the three platforms we wanted to run it on, and produced subtly incorrect results in certain edge cases. The Perl replacement (which is half the length) runs in under a second, works on all three platforms, and always gives the right answer.

      Pathological case? Sure. But it makes the point. Shell scripting is a Bad Idea for anything other than the simplest of simple single-platform scripts. Anything else needs something more sophisticated... and Perl is a good choice, because Perl is installed out of the box on pretty much every Unix there is these days.

    49. Re:heyho, python - the new perl. by mcvos · · Score: 1

      Suitability aside, there's nothing that can be written in Java that can't be run at the same scale written in Perl or PHP.

      Could be. I wasn't aware of a Perl or PHP equivalent of J2EE. (Not that J2EE is all that great, mind you.)

      Even so, the fact that you can write something, doesn't always mean it's a good idea. I shudder at the thought what some over-architectured Java projects would look like in Perl.

      Ruby is definitely the shiny buzz of the day, but it will likely end up going nowhere because there's no rational basis for its present popularity and this will be realized soon enough.

      Why do you say that? Is it not a much cleaner and more powerful object oriented language than just about anything else? Is it not so much more productive that hordes of Java programmers who wouldn't touch any other dynamic language with a 10-foot pole, are now flocking to Ruby?

      I admit Ruby still has some issues to work out, but it's definitely what I want the future to look like.

      Expect Java to stick around until something we have yet to see takes over.

      Expect Java to stick around for a long time after that. I'm afraid Java is going to be the COBOL of the future.

    50. Re:heyho, python - the new perl. by mcvos · · Score: 1

      You can argue that Perl's OO is pasted on, which is somewhat true, but that doesn't mean that it isn't powerfull.

      Well no, nobody in his right mind would deny that Perl is powerful. I've seen some amazingly scary Perl code that does in a single line what should rightfully be done in two pages of code.

      But Perl is not very clean or structured. It's often hard to read. And that makes it a bad choice for large software engineering projects.

      Certainly OO is a thing being fixed in Perl6.

      But how much pre-Perl6 code is already out there?

      Until that is available use Moose or try to realize that OOP isn't the only form of programming.

      Ofcourse OOP isn't the only form of programming, but there are a lot of situations where it is a very effective and easily maintainable form of programming.

      Different programming paradigms have different uses, different ecosystems. Different places. Trying to use Perl for enterprise code just doesn't sound like the best use of that language.

    51. Re:heyho, python - the new perl. by IntlHarvester · · Score: 1

      And MySpace is written in ColdFusion. According to your logic, therefore ColdFusion is still going strong. ColdFusion Forever!

      (Actually PHP still seems broadly popular, but every environment gets that midlife crisis where the bloom is off the rose.)

      --
      Business. Numbers. Money. People. Computer World.
    52. Re:heyho, python - the new perl. by mcvos · · Score: 1

      Well, I've been writing in PHP and Python for a living: I like static typing. So many of the ways in which dynamic types are used are essentially error-prone lazy shortcuts that create libraries where you have to check the docs constantly to figure out whether an error is False or Null or -1 or "" etc.

      Surely PHP and Python have exceptions? Abusing returned values for passing error information is Just Wrong. I mean, I know it was the standard in C, but we've grown out of that, yes? Please?

      and it's got the effectively typeless Object class which defeats static typing

      No, it says that the type must be an Object that is a class or subclass of the base Object class. End of story. It doesn't defeat or subvert the static typing system any more than inheritance "subverts" object class restrictions.

      It defeats static typing in the sense that every object is an Object, and once you end up with an Object in your hands, you've essentially lost your static typing. You have to figure out what it was again, and cast it to the correct type.

      And Objects happen quite a lot, particularly in Collections. Now generics are supposed to solve that, but they solve it by forcing you to declare the type of your collection at least three times, and it's still easy to circumvent.

    53. Re:heyho, python - the new perl. by RzUpAnmsCwrds · · Score: 1

      Right now, Java does dominate the web backend.

      No, Java dominates in some fields (enterprise applications) and is hardly used in others.

      At the high-end, Java is facing serious competition from ASP.net. At the low-end, PHP continues to be hugely popular, along with newer frameworks like Rails.

      Java's problem is that it's a pain in the ass. PHP is dead-simple to install and configure on Linux, which is partly why it's so popular with small websites. And ASP.net integrates extremely well with Microsoft environments (e.g. Windows Server, SQL Server, AD).

    54. Re:heyho, python - the new perl. by nidarus · · Score: 1

      PHP and Perl are hasbeens, and simply not suitable for the large scale web applications of today.

      Facebook, Wikipedia, and yes, even the website you're currently posting are pretty "large scale".

      Now, I hate PHP (and Perl), and it's completely possible that it would've been easier to write those sites in Java, but claiming that PHP "isn't suitable for large scale web applications" when there's lots of empirical evidence to the contrary, reeks of fanboyism.

    55. Re:heyho, python - the new perl. by wmbetts · · Score: 1

      I know people as well as myself that have worked for big corporations that use PHP. Several state, city, and county governments also use PHP.

      To quote you "Thanks for playing, try again sometime."

      --
      "Ubuntu" -- an African word, meaning "Slackware is too hard for me". - stolen from Dan C alt.os.linux.slackware
    56. Re:heyho, python - the new perl. by synthespian · · Score: 1

      Small number of keywords. Now THERE'S an interesting discussion in Python vs. Perl (almost all others being useless, like syntax).

      This is like Scheme vs. Common Lisp. One's easy to pick up, but you go around sometimes having to build a lot of stuff. While the other is harder to pick up, because the spec is lo large, but when you need something it's like, "hey, this is nice, they already put that in the language."

      This actually might apply more to Perl 5 vs. Perl 6.

      But Perl 6 is Chinese. Common Lisp is Latin (or is it Greek?). Perl 5 is Japanese and Scheme is a Romance language.

      Come to think of it, Perl and Python are very, very different languages and approaches to languages. Perl is more creative and flexible and Perl 6 will let you bend it in whichever direction you want. This is definitely not Python. I don't even know why people compare them all the time.

      --
      Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
    57. Re:heyho, python - the new perl. by synthespian · · Score: 1

      Python is not well-designed.

      --
      Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
    58. Re:heyho, python - the new perl. by chromatic · · Score: 1

      Perl sort of grew organically from a couple of scripting languages, and had OO pasted on later.

      You might not be aware that Larry borrowed Python's object model for Perl 5.

    59. Re:heyho, python - the new perl. by chromatic · · Score: 1

      Is [Ruby] not a much cleaner and more powerful object oriented language than just about anything else?

      No, not really. It's a nice combination of Perl and Smalltalk (and in some ways, a very immature descendant of both), but it's only somewhat syntactically cleaner than Perl (implicit variables magically springing into existence, boo, but the lack of dereferencing syntax and better metaprogramming syntax yay) and no more powerful than Smalltalk (block/Proc distinction, boo).

    60. Re:heyho, python - the new perl. by baest · · Score: 1

      But Perl is not very clean or structured. It's often hard to read. And that makes it a bad choice for large software engineering projects.

      Not true! You can make bad code in any language. There are a lot of bad code written in Perl, but well there are several reason for this. Perl was one of the first languages to hit the net and therefore people without real knowledge wrote programs in it. The MVC kind of paradigms wasn't applied and so on. You can't compare Ruby on rails to 10 year old Perl programs, but you can easily compare something written in e.g. Catalyst to rails.

      But how much pre-Perl6 code is already out there?

      Some, not a lot ofcourse, but the point wasn't the amount of code, it was that the area has been getting atention in the last years. Use Moose or similar frameworks if you want clean OOP in Perl 5

      Trying to use Perl for enterprise code just doesn't sound like the best use of that language.

      If you say so it must be correct. Can you please tell Amazon and Yahoo that? I'm sure they would like to know. Also a lot of banks in London use Perl for critical parts of their operation, they will probably not too be happy about this, but if you say so...

      Different programming paradigms have different uses, different ecosystems

      You are correct! That's why Perl allows different ways of accomplishing the same thing. Sometimes one way is best other time another is better. The single mindedness of OOP right know is the reason why Java is soo verbose.

    61. Re:heyho, python - the new perl. by Just+Some+Guy · · Score: 1

      But still, dynamically typed so we get type errors at customer sites, slow, and memory hogging. (Also 'features' of Perl too). OO-paradigm, so clumsy to use.

      Sounds like you're trying to write C in Python. Surprise, surprise: that doesn't work.

      A recent ex-coworker made that same mistake time and again. He'd write pages of code that we could literally replace with three or four lines of idiomatic Python, dropping runtimes from 2 hours with a gig of RAM to 8 seconds with 5 MB. No, that is not an exaggeration.

      The point was that he never learned to quit fighting the language, and it showed. Sounds like some of your programmers are hitting the same wall.

      --
      Dewey, what part of this looks like authorities should be involved?
    62. Re:heyho, python - the new perl. by tkinnun0 · · Score: 1

      List strings = new ArrayList();

      I count only two, where does the third come from?

    63. Re:heyho, python - the new perl. by DJProtoss · · Score: 1

      Actually some of my scripts run on linux ( a total of 7 different distro / major release combinations ), solaris, hp-ux, aix and cygwin. good old raw sh is about the only thing that hasn't caused cross platform issues on these (yes, including perl).
      As for your pathological case, it only makes the point that shell scripting is a Bad Idea for *that* case. Go brush up your formal logic, showing 'There Exists' does not prove 'For All' - e.g. for a counter example, go look at http://swtch.com/~rsc/regexp/regexp1.html - there, since we have a pathological case where perl is much worse than awk, perhaps we should advise that perl is a Bad Idea for anything other than simple single-platform scripts...

      --
      "Success is based on knowing how far to go in going too far"
    64. Re:heyho, python - the new perl. by mcvos · · Score: 1

      List<String> strings = new ArrayList<String>();

      I count only two, where does the third come from?

      I forgot. It could be:

      String str = strings.get(i);

      Although that's standard Java, and not special for generics ofcourse.

      And ofcourse if you want a new reference to the collection, you need to do

      List objects = strings;

      because if you do

      List objects = strings;

      the compiler will accept it, but your type safety is gone.

    65. Re:heyho, python - the new perl. by Anonymous Coward · · Score: 0

      instead of useless unsubstantiated statements how about some prrof on yahoo amazon csc and BBC and how they use dynamic languages. I promise you they use java or another static language for any real enterprise programing work. Script kiddie dynamic languages like python, perl ruby are great for text munging and that's all they use it for.

    66. Re:heyho, python - the new perl. by mr_mischief · · Score: 1

      What the hell do you think HTML, XML, news stories, book descriptions, and reviews are? Are they not text?

      Yahoo Shopping was written in Lisp. It was later rewritten, in sections at least, by a mixture of C++ and Perl. They wrote a Lisp interpreter in C++ to facilitate this.

      Yahoo would have never happened without Perl.

      Slashdot already ran a story about the BBC making a Rails-like framework for Perl because they liked Rails but prefer Perl as a language. The article at that second link says they're pretty dedicated to Perl for their whole Web infrastructure.

      Amazon use Perl as a major component gluing the front end order-entry system to a back-end database, and also for part of their document authoring chain.

      Amazon (for Amazon.com's own site) uses Mason (a Perl website templating system) as their official web development template system, and they're hiring for people with that skill set. They do use a lot of Java, too, apparently, but Perl is an important part of the site.

      IMDb uses Linux, Apache, Perl and mod_perl to run pretty much the whole site, and is part of Amazon.

      Google is using quite a bit of server-side JavaScript -- on the JVM as a replacement for Java in many cases.

      Google uses C++, Python, and Java for most public-facing sites, and much of the management of the systems is done with Python.

      This Google job (for a software engineer) lists C++ as a must and Python as a plus. This other job (for a software engineer) requires both one or more of C, C+, or Java and one or more of shell, Perl, PHP, or Python.

      The nation of Scotland used Perl to migrate millions of land records between systems, which certainly is data munging, but a pretty important bit of it.

      It was way back in 1999, but Agilent used Perl to build their big customer-facing e-commerce site.

      Booking.com (part of Priceline) uses primarily Perl to run their site.

      This PowerPoint presentation says Morgan Stanley in 2004 was using Perl written by over 500 developers on over 9000 (no, that's not a /b/ ism) systems to keep their network running smoothly, for a web front end development language, to develop middleware, and to develop backend applications.

      ValueClick and TicketMaster make much use of Perl, too. That's along with the content management system -- Bricolage -- used by the Dean for President campaign, ETOnline, and the World Health Organization being written in Perl. You may have also heard of MovableType, which is a serious CMS from Six Apart. Or maybe you've heard of a site that runs it, called The Huffington Post, who right now is looking for someone to work on it?

    67. Re:heyho, python - the new perl. by Anonymous Coward · · Score: 0

      See, I told you Israel isn't alone. There's plenty of people who call fascism when they see it, and it isn't limited to your fascist state.

  8. Flon's Law by Anonymous Coward · · Score: 1, Interesting

    There is not now, and never will be, a language in which it is the least bit difficult to write bad programs.

  9. Perl is WRITE-ONLY language. by Anonymous Coward · · Score: 0, Flamebait

    Perl is WRITE-ONLY language.
    You have to be a well-disciplined person an write the comments for every line of Perl code otherwise
    it's hard to decrypt the flow. Such things happens
    rarely in other languages (C++/Java/Python).
    IMHO, a syntax where you have to prefix a variable with a special character ($ in Perl's case) is a bad syntax.

    1. Re:Perl is WRITE-ONLY language. by Vectronic · · Score: 3, Funny

      Dim Perl As String.WriteOnly
      If You = Well.Disciplined.Person And Write.Comments(UBound(Perl.Lines) = True Then
              If Decrypt(Flow) Then
                      Such Things Happen
              Elseif Other.Languages = (C++ Or Java Or Python)
                      Decrypt.Method += Hard
              End If
      End If
      If Syntax.Contains("$") Then
              Return Format(My.Opinion, Humble) & "Bad Syntax"
      Else
              Return Format("", Opinions.Null)
      End If

      Ok, so the code sucks (in VB no less)... but, I just found the way you wrote your comment kinda weird...

    2. Re:Perl is WRITE-ONLY language. by fishbowl · · Score: 5, Insightful

      >IMHO, a syntax where you have to prefix a variable with a special character ($ in Perl's case) is a bad syntax.

      The argument isn't really about syntax; it is rather the strong-typing versus weak-typing argument,
      and that is worthy of far more investigation than simply declaring it "bad".

      --
      -fb Everything not expressly forbidden is now mandatory.
    3. Re:Perl is WRITE-ONLY language. by Anonymous Coward · · Score: 0

      ' you missed a paren ...
      If You = Well.Disciplined.Person And Write.Comments(UBound(Perl.Lines)) = True Then

    4. Re:Perl is WRITE-ONLY language. by oliderid · · Score: 3, Insightful

      If you give your variables/functions meaningful names (ie: $StoredPrice instead of $st, savePrice() instead of sv()) then half of your reading problems is fixed already.

      I'm truly tired of that laziness. Well written codes should need the minimum of comment. Oh...And by the way, tabulation and don't play the genius coder while trying to put as much as instructions per line. Split them wisely. Then everybody is happy, whatever the language is...It will be readable.

      My main concern with Perl is the object oriented feature, for the rest, it works like a charm. The synthax isn't that hard, the problem is the lambda Perl coder bad habits IMHO (trying to be the most cryptic possible), it is purely cultural and it has nothing to do with the language as far as I know.

    5. Re:Perl is WRITE-ONLY language. by Anonymous Coward · · Score: 1

      Variable prefixes are useful in language design, as they prevent variables from conflicting with keywords. This feature is particularly useful when you decide to extend the language, such as when Java decided to add a foreach loop. Instead of introducing a new keyword, which might have conflicted with variable or function names, the designers had to introduce a complex punctuation-based variant of the for loop syntax.

  10. Why not Python? by Raul654 · · Score: 4, Interesting

    At the risk of starting a programming language holy war, can someone explain to me why someone would choose to start a new project in Perl instead of Python? From what I've seen, they both do essentially the same things in the same ways, and they're both (roughly) the same as far as language overhead (from language interpretation) is concerned. But from a readability perspective, there's no question that Python is miles ahead. (Perl's readability, or lack thereof, is literally the source of jokes) In the long run, this translates into lower total development budgets, which is something businesses like to hear. So, why would anyone choose Perl over Python?

    --


    To make laws that man cannot, and will not obey, serves to bring all law into contempt.
    --E.C. Stanton
    1. Re:Why not Python? by cheater512 · · Score: 2, Insightful

      Python's syntax pisses me off.

      I primarially program in Perl, PHP and C/C++ which all share virtually identical syntax.
      Makes it a lot easier mentally and you can still use the right tool for the job.

    2. Re:Why not Python? by gullevek · · Score: 5, Insightful

      Very simple:

      * the user has deep knowledge of perl but not of pythong
      * the program needs certain libs that are easy available for perl but not for python
      * the user is not very keen on the syntax of python
      * there already exists a lot of perl code & libs that can be re-used and would need to be re-written to python

      whenever you start something from scratch in a different language you have to see if it pays off. If you already have tons of libs & classes and knowledge in one language there is no need to write it in another again.

      That's why I code my scripts still in perl, because I know what I am doing, I am fast, I get it done and I have classes that help me do the things I want to do. I see no reason why I should start again in python. I really don't have the time to re-do everything from scratch ...

      --
      "Freiheit ist immer auch die Freiheit des Andersdenkenden" - Rosa Luxemburg, 1871 - 1919
    3. Re:Why not Python? by kriss · · Score: 1

      Whitespace.

    4. Re:Why not Python? by Anonymous Coward · · Score: 0

      CPAN

    5. Re:Why not Python? by dltaylor · · Score: 1

      Embedded system with a very small footprint.

      There was already some Perl in it because it used an easily modifiable bit of existing code. Rather than add the burden of yet another interpreter, I use Perl to manipulate text files that are a bit too clumsy in bash/sed/awk.

      As for Java, there are some problems that lend themselves to class/... solutions (and, yes, I have read my copy of "Design Patterns"), but there are a LOT of small text utilities, among other things, needed in an autonomous Linux box that are a royal pain to code in OO, utterly unmaintainable when hammered into that model, and bulkier, when all of the libraries are added, than even Perl.

      Pick a language that solves the problem. Sometimes, maybe even frequently, that language is Perl.

    6. Re:Why not Python? by El_Muerte_TDS · · Score: 4, Funny

      Reason is simple.
      Pearls are shiny and worth a lot.
      Pythons are scary, they can bite, and have venom and stuff.
      Rubies on the other hand are a viable replacement for pearl.

    7. Re:Why not Python? by beefstu01 · · Score: 1

      What lack of readability? All my Perl stuff is very readable, and it's easy to follow what's going on. If I use a crazy regex, then I leave a nice comment saying what it does.

      Just because you can obfuscate Perl to the point where you can move a mountain with one line of code doesn't make it unreadable- I can do that in any language. If you're complaining about readability, the problem probably exists between the keyboard and the chair. A good dev puts out good code, and a bad dev will make unreadable stuff.

      Over here we use the right language for the job. Perl, Python, C, Java- they're all tools with strengths and weaknesses. Use appropriately and you win.

    8. Re:Why not Python? by neuromanc3r · · Score: 1

      Regular Expressions. I love Python, it's definitely the language I use most, but its regexp support is a joke compared to perl's.

      Which does not mean that it's bad, it is logical and consistent with the rest of the language, but it isn't nearly as fast and effortless as in perl

    9. Re:Why not Python? by k-zed · · Score: 1

      From a more technological point of view there is also a fundamental difference between the philosophies of the two languages.

      Perl subscribes to "there is more than one way to do it"; Python is all about "there should be only one way". The latter is what made Java such an insipid and annoying language to develop in. Python is probably saved from this only by its much better standard library and generally smaller verbosity.

      Personally, if I had to choose from the two, I would still choose Python because of the gentler learning curve, and because I hate forced indentation/whitespace slightly less than Perl's type sigils.

      But if you can choose any language, try one of those newly popular "modern" languages - finally get down on your ass and learn Haskell (as I should), or Kaya, or LISP (which, as one of the oldest still in use today, is more "modern" than almost anything that has seen light ever since), or Ocaml, or even F# or something. (Any one of these can also show you that OO is not the only way of abstraction, or the best way, or, god help me, even a particularly good way.)

      --
      we discovered a new way to think.
    10. Re:Why not Python? by lpontiac · · Score: 1

      Perl is still a good fit for Extraction and Reporting.

    11. Re:Why not Python? by Anonymous Coward · · Score: 0

      It's all a matter of what you're trying to write. For a short script mostly consisting of string munging, I find perl much better (REs are first class, not this object you have to construct). For things with more logic, python encourages more verbosity, which is better when I have to come back and look at it in a week. I have really bad memory :)

    12. Re:Why not Python? by BlackCreek · · Score: 2, Insightful

      What lack of readability? All my Perl stuff is very readable, and it's easy to follow what's going on.

      Myself I almost never have a problem reading my own code. It is generally other people's code that are hard to read. You will only have an honest idea of how readable your code is when somebody else has to start maintaining it.

    13. Re:Why not Python? by jacquesm · · Score: 1

      amen.

      That's one I'll never get over.

    14. Re:Why not Python? by Anonymous Coward · · Score: 0

      Very simple:

      * the user has deep knowledge of perl but not of pythong
      * the program needs certain libs that are easy available for perl but not for python
      * the user is not very keen on the syntax of python
      * there already exists a lot of perl code & libs that can be re-used and would need to be re-written to python

      * an in-house development team which understands Perl but would need to learn Python (most of them from scratch).
      * well defined and understood coding standards which ensure clear, easily maintained code.

    15. Re:Why not Python? by Anonymous Coward · · Score: 0

      You will only receive responses from people who prefer the ugly syntax of Perl, or from those who know about some obscure library, or who use it for legacy reasons. For a laugh try asking about using C as a web development language and you'll find as many people preciously defending their unreasonable bizarre choice.

    16. Re:Why not Python? by Ragzouken · · Score: 1

      That's such a terrible reason.

    17. Re:Why not Python? by antirelic · · Score: 1

      I tried to show what Python looks like to a Perl programmer and here's what happened:

      Filter error: Please use fewer 'junk' characters.

      (thats what python looks like from a perl programmers perspective)

      --
      20th century Marxism is not progress...
    18. Re:Why not Python? by Anne+Thwacks · · Score: 1
      pythong

      The language of preference for beach parties?

      --
      Sent from my ASR33 using ASCII
    19. Re:Why not Python? by Anonymous Coward · · Score: 0

      I think UNIX/Linux sysadmins often prefer perl because perl is, by design, very unix like, so it seems more familiar.

      Also, for UNIX/Linux sysadmin work, perl is - by far - more standard. UNIX/Linux sysadmin have to know perl, python is optional.

    20. Re:Why not Python? by VVelox · · Score: 1

      Having required white space does not make a language readable in the least. It is a sad fact that most Python programmers can't admit to them selves. Code is under no circumstance ever self documenting nor does good formatting happen make it easy to ready.

      If you have bad formatting in Perl or any other language, it means you have a bad and lazy programmer.

      I personally find Perl way easier to read and manage. I love brackets.

      On a side note, the example you posted why Perl is unreadable does nothing other than prove you to be ignorantly biased. With it you are saying all Perl code looks like that and is unreadable as that. Creating that sort of level of bad and obfuscated code is something that can be done in any language. The exact method one goes about it will very but bad and obfuscated code is bad and obfuscated regardless of the language.

      Why do I like it over python?

      1: I've run into far fewer dependency issues over the years with it when compared to Python.
      2: A wide variety of modules already available for it.
      3: Easy to read.
      4: Easy to write modular stuff with it.
      5: Easy to document.

    21. Re:Why not Python? by Corunet · · Score: 1

      In one word, CPAN. You can find modules that do _everything_ and are enough tested to rely on them. Operations with dates, files, web services, anything you wish. And if you take seriously best paractices and write code following the rules (syntax, unit testing...), you can write perl easy to maintain and as fast as you can type glue code.

    22. Re:Why not Python? by Anonymous Coward · · Score: 0

      Pythons are not venomous.

      http://en.wikipedia.org/wiki/Python_(genus)

      Your comment's not funny, it's ignorant.

    23. Re:Why not Python? by VVelox · · Score: 1

      Actually if you can't come back and read your Perl code in a week nor have done documentation on it, it means you really need to take some time to sit down and seriously review your coding style. If you can't do it in Perl, it is unlikely your Python code is any better.

      Look into POD and learn how to use it... also comment every other bloody line pretty much regardless what it is. The first is useful for Perl only and the second applies to all languages.

    24. Re:Why not Python? by riley · · Score: 1

      I don't know that people really want to code in perl. I think they want to use CPAN, and perl is the carrier for that. Perl's feature set is the community grown extensions to the language.

      You can say that perl grew organically, and that poorly written perl is identical to line noise, but the reason folks put up with that is CPAN makes their project finish faster, with less work.

      If all that were in CPAN were available to python, then python would be the "it" language for the market in between application programming and systems programming.

      That (in my opinion) is what makes perl popular among certain segments (including a past iteration of me).

    25. Re:Why not Python? by Anonymous Coward · · Score: 0

      Pythons have no venom, they just squeeze you to death.

    26. Re:Why not Python? by sgtrock · · Score: 1

      So, you write all your code blocks with no indentation?

    27. Re:Why not Python? by webnut77 · · Score: 1

      Very simple:

      * the user has deep knowledge of perl but not of pythong

      Pythong? Isn't that an undergarment that an attractive female programmer wears?

    28. Re:Why not Python? by jacquesm · · Score: 2, Insightful

      no, but I really don't feel a need to go back to the seventies when 'significant whitespace' was all the fashion.

      Especially the fact that tabs and whitespace are visually indistinguishable and will cause your code to suddenly not work is a real hoot. Similar gripes apply to makefiles and DNS configuration files that need significant tabs in some places. Utterly ridiculous.

      Try switching editors, importing a chunk of code using cut-and-paste with a non-python aware tool and so on.

      IMNSHO this was the biggest possible stumbling block that they could have installed to avoid large scale python adoption, it seems to have worked admirably so.

      I'll give you this though, perl is worse :)

       

    29. Re:Why not Python? by Anonymous Coward · · Score: 0

      FIOC.

    30. Re:Why not Python? by Anonymous Coward · · Score: 0

      Well, phytons are more likely to strangle you (and do not have venom)

    31. Re:Why not Python? by The+Moof · · Score: 1

      pythong

      Waiting for a new ThinkGeek item in 3... 2... 1...

    32. Re:Why not Python? by wideglide · · Score: 1

      We still start new projects in assembler /370 you insensitive clod !

      --
      The sum of intelligence on a planet is constant. Nowadays we have more people. When classic goes away, so do I. Copy
    33. Re:Why not Python? by Bluesman · · Score: 1

      Because PERL is extremely powerful and awesome in ways that Python can only dream about for manipulating text.

      Yeah, PERL's syntax is horrible, it has ugly subroutines instead of functions, and has the ugliest object/class implementation bar none, but if you need to change one form of text into another, or pull specific data out of a nearly unparse-able file, PERL's where it's at.

      Surprisingly, the number of times that I need to do just that far outnumbers the times where I want to write a large-scale application in a scripting language.

      --
      If moderation could change anything, it would be illegal.
    34. Re:Why not Python? by Anonymous Coward · · Score: 0

      I'm interested in Python but I haven't bothered learning it yet because I'm waiting for the planned major new release which will break compatibility with earlier versions. I don't want to invest time and effort learning it now, only to have to learn it again soon.

      Anyone thinking about learning Perl right now also faces this predicament, but I learned Perl years ago. Although Perl is a complex messy language utterly unlike anything I would ever have designed or wanted, as a practical matter it has surprised me as being quick, easy and fun to use; it has billions of libraries; it has tons of great documentation (included for free and in aftermarket books); and ironically I find it quite lovable in spite of (or because of) its quirks.

      Time will tell what place Python wins in my career and heart, but I suspect I'll never give up Perl.

    35. Re:Why not Python? by meringuoid · · Score: 1

      Pearls are small lumps of grit surrounded by thick coagulated oyster snot.
      And pythons aren't poisonous; they just wrap around and crush you to death instead. Then swallow you whole.

      --
      Real Daleks don't climb stairs - they level the building.
    36. Re:Why not Python? by Anonymous Coward · · Score: 0

      I've written programs in Perl, Python, and Ruby, and although I don't necessarily intend to, I keep coming back to Perl.

      The biggest reason is that Perl code ends up running much faster and more efficiently.

      For projects that are resource-sensitive, Python and Ruby aren't anywhere near Perl.

      I actually prefer Ruby as a language, over Perl as well as Python: Ruby's much cleaner than Perl, and somewhat cleaner than Python. Ruby seems to be what Python pretends to be.

      However, it doesn't have the speed, and there's much more of a community around Python than Ruby at the moment.

      For what it's worth, I've never understood why people complain about Perl code being too abstruse. It can be, but it can also be as elegant and clean as any language. I respect the argument that "if it can be dirty, it is dirty," but I disagree. You can--and do--get crappy code in any language.

    37. Re:Why not Python? by DeBaas · · Score: 1

      a reason _can_ be: http://search.cpan.org/

      --
      ---
    38. Re:Why not Python? by jjn1056 · · Score: 1

      I have nothing against Python, but if I am choosing between Python and Perl for the type of work I normally do (web applications development, mostly backendish stuff) Here's why I like Perl:

      1) Database Support: Perl DBI (http://search.cpan.org/dist/DBI) is very powerful and mature. Last time I used Python I found it didn't have all the options I needed for my database of choice. Also, I like the ORM choices for Perl better. DBIx:Class (http://search.cpan.org/dist/DBIx-Class) is very flexible and full featured as an ORM.

      2) Stablity and Speed: Perl 5.10 has more built in tests than PHP, Python and Ruby combined (and I'll throw in the additional tests that come with RoR) and that gives me the confidence I need to build my enterprise software.

      3) Object Oriented Programming: No doubt Perl's default OO is weak, but if you are using a solid OO framework like Moose (http://search.cpan.org/dist/Moose) there really isn't anything as straightforward or productive, IMHO.

      4) Depth of tools. CPAN rocks (http://www.cpan.org), there's nothing else like it. Perl programmers have opensource code shareing build into their bones.

      What we suck at is promoting ourselves and at cleaning up some of the crufty bits that turn off newbies but longtimers are just used to working around.

      --
      Peace, or Not?
    39. Re:Why not Python? by suzzer99 · · Score: 1

      Pythons != venom

    40. Re:Why not Python? by Morkano · · Score: 1

      Pythons are scary, they can bite, and have venom and stuff.

      FUD. Pythons don't have any venom. You're just a shill for the precious gems industry.

      --
      Victory or awesome!
    41. Re:Why not Python? by Anonymous Coward · · Score: 0

      sorry dude, but to me it just looks as you're speaking from your very own specific perspective

      most of the people
      * do not know how to write good perl code
      * have zero clue how to the get the extensions hooked up
      * perl's syntax is just awful when you get into large frameworks and decide that hey , i don't want this %smth thing to be a hash anymore ...
      * there's a bunch of really bad and unsecure perl code out there that causes old security issues all over again every day.

      i really liked perl 9 years ago, it was cool and efficient. but times have changed, standards have changed, needs have changed.

      for business code it's time to move on, proper perl code is just too f'n expensive to write, and i'm not rich enough to run shitty perl code.

      ÃÃÃÃ
      my %02d cents, 0

    42. Re:Why not Python? by Anonymous Coward · · Score: 0

      Until Ruby got railed.

    43. Re:Why not Python? by cpghost · · Score: 1

      What's wrong with the Cheese Shop PyPI? Even if it doesn't contain as many modules as Perl, let's not forget that a lot of modules are already part of the Python Standard Library. Additionally, many modules in the CPAN are either obsolete or orphaned. So more or less, support for Perl and Python in terms of modules is roughly equivalent (with Perl being still slightly at an advantage). And regarding DBI::DBDs, what's wrong with Python's DB-API 2.0? Or with object-relational mappers a la SQLObject, if you prefer that?

      --
      cpghost at Cordula's Web.
    44. Re:Why not Python? by Anonymous Coward · · Score: 0

      To me, Python code is like a run on sentence. I have to really look to see where code stops. If you have looked at lengthy Python code you will know what I mean by that.

      Lack of readability isn't the languages fault. It is the programmers.

      I like Perl because it gives me everything I need to get the job done and with CPAN sometimes more.

    45. Re:Why not Python? by Anonymous Coward · · Score: 0

      1. CPAN
      2. Any language can be source of jokes (especially PHP). Ex.: http://thedailywtf.com/Articles/My-Kind-of-copyFile.aspx and others article on this site.
      3. Many hate treating whitespaces as special symbols.
      4. No global variables in Perl, variables have visibility. use strict.
      5. Almost transparent Unicode support.
      6. Integrated regular expressions.
      7. Perl is stable. Anything written for Perl 5.8 should work in Perl 5.10. Perl development version are automatically tested on different OS and by testing CPAN modules on them.

      Read a good tutorial about modern Perl - you'll be amazed.

    46. Re:Why not Python? by mr_mischief · · Score: 1

      Yes, suffocating you by holding you too tight. What a perfect analogy for the one true brace(less) style!

    47. Re:Why not Python? by mr_mischief · · Score: 1

      I'm not sure why "grew organically" is something to "put up with". The fastest way to overengineering something is to design what you think you want before you know what you really want. Iterative design can be a good thing, in moderation.

    48. Re:Why not Python? by Anonymous Coward · · Score: 0

      Put me down for your item #3-- indentation (i.e., whitespace) is significant? Puh-leeze. At least in Perl, when I have 100 lines of code that are buried inside of a couple of loops and if clauses, I can use vi's % command just like I do in C++ or Java or a dozen other languages to find matching brackets-- I can't imagine having to count indented spaces to see if a given line of code is in or out of a particular block.

      And while you might argue that the code should be better factored, that's only an argument a theoretician would use, not someone who's had to fix a lot of other people's code in the wild...

    49. Re:Why not Python? by Anonymous Coward · · Score: 0

      ... But I sed I get the same satisfaction gawking at shells.

    50. Re:Why not Python? by bitMonster · · Score: 1

      Seriously, don't do that.

      If I need help from my editor to figure out nesting, I fix the fucking nesting. I work in python, perl, C++, and Verilog. 3 out of 4 of those use braces, but I still don't allow 100 lines of deeply nested code in any of them. And yes, I'm a non-corporate (chip designer) who considers perl to be "legacy".

    51. Re:Why not Python? by chromatic · · Score: 1

      So more or less, support for Perl and Python in terms of modules is roughly equivalent (with Perl being still slightly at an advantage).

      Statistics please, not handwaving.

    52. Re:Why not Python? by morkk · · Score: 1

      sings:

      I'd rather be a camel than a snake
      Yes I would
      If I only could...

    53. Re:Why not Python? by jjn1056 · · Score: 1

      I guess what it partly comes down to that I know Perl very well and if I'm going to learn something new I'd rather learn a new Java framework, since Java kicks the crap out of every scripting language combined. It's a bang for the buck thing. I'm an IT professional, what I know is my livelihood, and the livelihood of my family as well.

      Last time I used Python, which admittedly was a few years ago, I couldn't even get basic features like placeholder bindings in my SQL queries to work. It seemed half baked to me. Perl has just been around longer so I find the tools are more mature. Additionally, I find that Perl fits the way I think better while with Python I feel like I am struggling to fit myself to the language. If I have to wear a straightjacket I'd rather do Java or .Net, since if I'm not going to be happy I may as well get paid :)

      However I know that for a subset of programmers, writing Python just works for them, and that's totally cool.

      My post is not meant as a diss on Python. The overall thread is about Perl in the enterprise and what I am responding to are all the people that seem to think Perl is only good for one off scripts.

      --
      Peace, or Not?
    54. Re:Why not Python? by metamatic · · Score: 1

      At the risk of starting a programming language holy war, can someone explain to me why someone would choose to start a new project in Perl instead of Python?

      The whitespace thing. Not touching Python because of it, and I'd even use Perl to avoid it.

      I just don't get why it isn't being fixed for Python 3000. Hasn't Guido von Rossum admitted that the whitespace thing was a mistake in retrospect?

      --
      GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    55. Re:Why not Python? by gullevek · · Score: 1

      I am very willing to learn new languages and always try out to be at least up to date.

      But when it comes down to business and I have to do something, like extract data from a DB and create CSV and I have only X time, then it is hard to say, I will spend X + a lot of time, just because I want to use some of the new modern languages.

      As much as I would love to use ruby or python in some web applications, just to see how it works, when I have to do a project and I already have a full framework ready, then there is no way I can or will re-do all the things in another language.

      That's my problem.

      On the other hand, if there is a certain outside requirement to do something in a certain language, then this would be a perfect thing to learn something new.

      --
      "Freiheit ist immer auch die Freiheit des Andersdenkenden" - Rosa Luxemburg, 1871 - 1919
    56. Re:Why not Python? by gullevek · · Score: 1

      no, but I don't know why, but I always add a "g" to python ... is this some deep want for "Thongs"? who knows ;)

      --
      "Freiheit ist immer auch die Freiheit des Andersdenkenden" - Rosa Luxemburg, 1871 - 1919
  11. Sometimes the correct answer is the simplest by tanveer1979 · · Score: 3, Informative

    If we forget the conspiracy theories for a while, there are other reasons too.
    A 100K/year good programmer can also have difficulties understanding perl code.

    If you look at the most efficient perl code, it will be very small, and do a lot. But it will also mean that nobody else can understand the code

    Heck I have difficulty in understanding a couple own scripts if I look at them after a year, and that too when I add comments.

    Perl is a very very powerful language. A small change can make the code do something completely different, hence the fear.

    For example look at this
            s!(?:^|\w*/|\.\./|\./)[^\s,@;:]*(?<=/)([^\s,@;:]+?)(?=[\s,@;:]|$)!$1!g;

    Interesting?
    Thats a one line regexp which does something which appears to be very very simple to do, but actually isnt.

    --
    My Aurora : http://www.youtube.com/watch?v=o91ZsGwJYyg
    FB : https://www.facebook.com/TanveersPhotography
    1. Re:Sometimes the correct answer is the simplest by smittyoneeach · · Score: 5, Insightful

      Regular expressions are by no means a perl-only feature.
      Possibly not the best example of why perl is shunned.
      Perl is simply not winning the marketing war.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    2. Re:Sometimes the correct answer is the simplest by Alioth · · Score: 4, Insightful

      Your regexp example isn't awfully good - any language that has regexp support will have lines like that. These days, PHP has regexp support (possibly always has), C has regexp support, C++ has it, Java has it, and I expect that even C# has regexp libraries.

      The alternative to a regular expression is usually a very convoluted parser that's a lot of effort to support.

    3. Re:Sometimes the correct answer is the simplest by arth1 · · Score: 0, Troll

      A 100K/year good programmer can also have difficulties understanding perl code.

      You don't have to understand how to read it, beyond grepping for comments and function names. You have to understand how to write it.

      Perl is a very very powerful language. A small change can make the code do something completely different, hence the fear.

      Which is why you never do a "small change". You replace non-functioning code with functioning code.

      This is why specs and comments that document the API, and not just the code, is crucial. It allows you to replace code far easier.

    4. Re:Sometimes the correct answer is the simplest by tomtomtom777 · · Score: 3, Insightful

      s!(?:^|\w*/|\.\./|\./)[^\s,@;:]*(? Interesting? Thats a one line regexp which does something which appears to be very very simple to do, but actually isnt.

      That looks really simple? Sorry but it doesn't look to me. Perl may be a a very very powerful language, but that alone does not make it a language of choice.

      For a company to choose a language, one should not only consider the power, but also the maintainability. One should not only consider how a strong programmer would perform in it, but also how a beginner can screw it up, and how a beginner can understand a powerful program.

      These considerations make Perl generally a bad choice. As a simple test, download 50 perl programs at random, download 50 python programs at random, compare the quality. Fact that there is to much f*cked up perl code, shows that it is an inferior language.

    5. Re:Sometimes the correct answer is the simplest by baest · · Score: 5, Insightful

      For example look at this s!(?:^|\w*/|\.\./|\./)[^\s,@;:]*(?<=/)([^\s,@;:]+?)(?=[\s,@;:]|$)!$1!g;

      But this "Perl" code is really a regular expression which is also used in PCRE and PHP and so on. Copied because it was the best there was.

      To improve readability of a regex use best practise and use /x (with whitespace and comments) and stop confusing Perl and regex.

    6. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      So, you're the $100k/yr programmer who's confusing between Perl and regex? Man, I want your job.

    7. Re:Sometimes the correct answer is the simplest by Etrigoth · · Score: 1

      For example look at this
              s!(?:^|\w*/|\.\./|\./)[^\s,@;:]*(?<=/)([^\s,@;:]+?)(?=[\s,@;:]|$)!$1!g;>

      I tried to follow your example but there appears to be some line noise in your post ...

      --
      When we remember we are all mad, the mysteries disappear and life stands explained.
    8. Re:Sometimes the correct answer is the simplest by Paolone · · Score: 0, Flamebait

      That looks really simple? Sorry but it doesn't look to me.

      You fail the reading test. It says "[it] does something that looks very simple [but it's not]".

      Fact that there is to much f*cked up perl code, shows that it is an inferior language.

      By this metric, just need to release crappy python code in the intertubes to make it inferior.

    9. Re:Sometimes the correct answer is the simplest by BlackCreek · · Score: 3, Insightful

      s!(?:^|\w*/|\.\./|\./)[^\s,@;:]*(?<=/)([^\s,@;:]+?)(?=[\s,@;:]|$)!$1!g;

      "You have a problem, and you discover you can solve it by using regular expressions.
      Well, now you have another problem"

      I read this in the opening of a regular expression chapter of a Python book by Tim Peters (though the quote is certainly not exact); so I am unsure whether he was quoting somebody, or not. Anyway, the point stands.

    10. Re:Sometimes the correct answer is the simplest by unavailable · · Score: 5, Insightful

      s!(?:^|\w*/|\.\./|\./)[^\s,@;:]*(? Interesting? Thats a one line regexp which does something which appears to be very very simple to do, but actually isnt.

      That looks really simple? Sorry but it doesn't look to me. Perl may be a a very very powerful language, but that alone does not make it a language of choice.

      Well that is a regular expression, not Perl. It's a different language, and is the standard way of handling strings in most programming languages. To be honest, I first learned about them in a formal language class in college, years before I picked up Perl.

      If you don't like regular expressions, that's your choice, but it really has nothing to do with Perl, and you should try to understand them, as they are very useful, even outside programming.

    11. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      Well, that thing won't work in anything but a perl-derived regex engine.

    12. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      That's because you can't read perl. If it was written in COBOL, it would be equally obsfuscated for you.

    13. Re:Sometimes the correct answer is the simplest by AC-x · · Score: 1

      Regexp != Perl.

      Give me an example of one modern language that *doesn't* have regexp support.

    14. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      For example look at this
              s!(?:^|\w*/|\.\./|\./)[^\s,@;:]*(?<=/)([^\s,@;:]+?)(?=[\s,@;:]|$)!$1!g;

      Regular expressions are a language of their own.
      You can do complicated regular expressions in Java, JavaScript, Python, PHP, Ruby... It is not a good idea to use regular expressions to show the characteristics of a language.

    15. Re:Sometimes the correct answer is the simplest by jsebrech · · Score: 3, Insightful

      So your argument boils down to "perl is unmaintainable, but that's ok, because you can just replace code instead of maintaining it".

      You must write bug-free code if you never have to make small changes to existing code. My hat is off to you sir.

    16. Re:Sometimes the correct answer is the simplest by jalefkowit · · Score: 3, Informative

      The actual quote is this:

      Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.

      The source of the quote is Jamie Zawinski, who said it on Usenet in 1997.

    17. Re:Sometimes the correct answer is the simplest by houghi · · Score: 4, Funny

      Do you need help with regular expression?
      http://houghi.org/shots/vim001.gif

      --
      Don't fight for your country, if your country does not fight for you.
    18. Re:Sometimes the correct answer is the simplest by Phroggy · · Score: 2, Insightful

      Fact that there is to much f*cked up perl code, shows that it is an inferior language.

      I'd say it shows that there is a lot of perl code out there. There was a time when Perl was one of the only scripting languages that people wrote crappy code in, but now people are free to choose from Python, Ruby, PHP, Java, or other languages to write crappy code in. However, since Perl is older, more crappy code has been written for it.

      I challenge you to take a random sampling of code written in the last five years, in different languages. When you exclude code written more than five years ago, you might find that Perl fares rather better, comparatively.

      --
      $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
      $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
    19. Re:Sometimes the correct answer is the simplest by PhilHibbs · · Score: 1

      The only fair comparison would be to implement that same functionality in, say, Python and compare the complexity of the two solutions.

      As a simple test, download 50 perl programs at random, download 50 python programs at random, compare the quality. Fact that there is to much f*cked up perl code, shows that it is an inferior language.

      The fact that there is a highly active Perl subculture devoted to creating obscure code kind of goes unfairly against Perl in this test. Also, when I have something difficult to do, I do it in Perl. If it's easy, I might use VBA and wrap it in an Excel spreadsheet.

    20. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      While there is a lot of poorly written Perl code, there is a lot of poorly written code in many programming languages out there in production environments.

      I develop in Perl with the objective of easily maintainable code for those who will inevitably have to maintain it at some later date or for those who want to learn Perl by studying my own code.

    21. Re:Sometimes the correct answer is the simplest by totally+bogus+dude · · Score: 4, Insightful

      Interesting that you got modded so high, despite failing to understand what the GP was saying.

      I'm not positive what that regexp is doing, but the presence of / and ../ or ./ matches suggests it's manipulating a directory path in some way. After a few tests I think it may be intending to return the filename portion from a path, but if so it's a little buggy (and a good example of why reinventing the wheel isn't a great idea; just use basename).

      You do make a point, but I feel your method of comparison is a bit questionable. While Python is a fairly old language, it's only seen general use for a very short period of time compared to Perl. That means that a) there's likely to be a lot more Perl code around than Python code, and b) a lot of the Python code that's around will be of high quality.

      The main reason for this is that when a language first begins to be noticed, it's usually going to be embraced by people who want to show how good it is. They'll take extra care to make sure it's well written and easy to understand, because they're evangelizing the language. As a language ages, people will be using it who really don't give a crap about the quality of the code, and that will "pollute" your sample set.

      Accessibility will also have a lot to do with it. Even when PHP was a pretty new language, a random sample of code would reveal it to be vastly inferior to just about every other language you could possibly think of. A lot of this is simply because PHP became so widespread that virtually every cheap (and many free) web hosts supported it, so every newbie who wanted to learn to program started with PHP.

      A new programmer -- or a bad programmer -- can write terrible Python code just as easily as they can write terrible Perl code. But at least it will have proper indentation. I would be very hesitant to base too much of my assessment of a language on its "newbie safety factor". Else we'd all be using BASIC and Logo.

    22. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      That regex string would look about the same in ANY language... because it's regex... which has a very defined notation. Saying perl is hard to maintain becuase regex looks hard is like saying a car is hard to drive because the engine looks complicated.

      I always thought perl was really hard too... until I tried it. Hell, it's almost as easy as php to tell you the truth.. as long as you don't use a lot of the more advanced features (which php is building in more and more of every year).

    23. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      http://livemalayalam.blogspot.com/

    24. Re:Sometimes the correct answer is the simplest by RazzleDazzle · · Score: 1

      These considerations make Perl generally a bad choice. As a simple test, download 50 perl programs at random, download 50 python programs at random, compare the quality. Fact that there is to much f*cked up perl code, shows that it is an inferior language.

      50 python programs?? I don't know that I have ever seen that many on the internet all at one time!
      It's a joke, laugh.

      --
      ZERO ZERO ONE ZERO ONE ZERO ONE ONE! Just brushing up for my next big invention: Ethernet over Voice (EoV)
    25. Re:Sometimes the correct answer is the simplest by famebait · · Score: 5, Insightful

      The problem here is that small != mean efficient.
      Parsing the code is not what makes a program slow, and
      we don't code for 1K or RAM anymore.

      "impressive" oneliners completely fail to impress me.
      Lines are cheap.
      Time is not.
      And bugs are expensive as hell.

      I'm sure if you wrote code that walked through the
      steps in what you are trying to achieve, all the
      following would be quicker:

      * for me to see the point of what you're doing
      * for me to correctly change what it does.
      * for you to get it working right in the first place.

      If you feel it is childish to write code like
        "find A"
        "find B based on A"
        "generate C based on B"
        "silently fail for some values of C"
        "replace B with C"
      -rather than one giant, brittle regex-replace, I submit that you are the childish one.

      --
      sudo ergo sum
    26. Re:Sometimes the correct answer is the simplest by samkass · · Score: 2, Interesting

      I don't think so. It's much, much harder to write crappy code in Java than it is in Perl. Java enforces a lot of practices in its syntax that annoy the code hacker type but make the software much more maintainable down the road.

      --
      E pluribus unum
    27. Re:Sometimes the correct answer is the simplest by evil_aar0n · · Score: 1

      You can take _any_ language and make a hash of it. Trust me - I see it all the time.

      The problem is the people writing the code. It's easy to be "clever" in perl and say a lot in a little. That ability gets abused, sometimes. That hardly makes it an "inferior" language.

      I agree with you: code should be maintainable. And, except in cases of oversight, I opt for readability over cleverness, because I know, at some point down the road, I'll have to maintain this. Just because a language _allows_ you to obfuscate the code doesn't mean you have to. If you want to blame something for ugly code, blame the practitioners.

      It's like an artist with paints: he or she can create a very beautiful picture, or a hideous, festering pile of trash. Do you blame the materials or the artist?

      --
      Truth, Justice. Or the American Way.
    28. Re:Sometimes the correct answer is the simplest by bytesex · · Score: 2, Informative

      And even then, perl deals with regexes more elegantly than others, because they are an integral part of the language's syntax. In java, the GP's example would have to be enclosed inside a string, and be escaped.

      --
      Religion is what happens when nature strikes and groupthink goes wrong.
    29. Re:Sometimes the correct answer is the simplest by Hyppy · · Score: 1

      Fact that there is to much f*cked up perl code, shows that it is an inferior language.

      You're missing a couple boxcars in your logic train.

      Just because there is "f*cked up" code in a language, doesn't mean that the language is inferior. For one, the person making the claim that the code is "f*cked up" may have no idea what he's reading.

    30. Re:Sometimes the correct answer is the simplest by Tsunayoshi · · Score: 1, Funny

      http://xkcd.com/208/

      I love this particular comic...

      --
      "Get a bicycle. You will not regret it, if you live." - Mark Twain, "Taming the Bicycle"
    31. Re:Sometimes the correct answer is the simplest by Daimanta · · Score: 4, Interesting

      Look at this site: http://99-bottles-of-beer.net/

      This site make the song "99 bottles of beer" into a program that displays the lyrics of 99 bottles of beer. Now look at the Java implementation, it's a bloody mess! Waaaay to complex in order to maintain flexibility. Now look at the a comment where another person has done the same thing but then in a simple manner.

      Yes, you can make any language look butt ugly if you try.

      --
      Knowledge is power. Knowledge shared is power lost.
    32. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      50 python programs?? I don't know that I have ever seen that many on the internet all at one time! It's a joke, laugh.

      I realize it's a joke, but why would I laugh at one that sucked that bad?

    33. Re:Sometimes the correct answer is the simplest by nstlgc · · Score: 3, Insightful

      You don't have to understand how to read it, beyond grepping for comments and function names.

      This has to be the single most retarded thing ever to be said in the context of software development.

      --
      I'm Rocco. I'm the +5 Funny man.
    34. Re:Sometimes the correct answer is the simplest by cmaurand · · Score: 1

      Yes C# has regex libraries, PHP has perl compatible regex.

    35. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      The original is often attributed to Linus, can't recall what the initial issue was, but it is generally applied to the latest problem technique du jour (recursion, OO, regex, todo)

    36. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      Are you comparing the quality of the algorithms, or are you comparing the quality of the whitespace?

    37. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      For example look at this
              s!(?:^|\w*/|\.\./|\./)[^\s,@;:]*(?<=/)([^\s,@;:]+?)(?=[\s,@;:]|$)!$1!g;

      Interesting?
      Thats a one line regexp which does something which appears to be very very simple to do, but actually isnt.

      The problem isn't the regular expression. The problem is that a Perl programmer will almost never precede that regular expression with a comment that explains what is going on...

      # In $_, replace (start-of-line, (zero or more word characters followed by a slash), "../", or "./") followed by zero or more characters that are not whitespace, comma, at-sign, semicolon, or colon, possibly followed by a slash if it isn't part of the next segment, (start remembering stuff here) followed by one or more characters that aren't whitespace, comma, at-sign, semicolon, or colon, matching as little as possible (stop remembering stuff here), possibly followed by one or more whitespace, comma, at-sign, semicolon, or colon characters, or the end of the line, with the remembered segment, repeatedly.

      That's the literal interpretation, best as I can get it. As for English, I'm at a loss; it looks like it's trying to be basename, but I can't be sure. And if I have to maintain this, I hate not being sure, because I can't tell the difference between a bug and a clever fix.

      I don't routinely use perl, but I'm familiar with it, and using the O'Reilly Perl 5 Pocket Reference, it took me 45 minutes to puzzle that out. 45 minutes I would want back if maintaining this code were my job.

      Perl programmers are encouraged to be mean to other programmers who must maintain the code. Thus Perl code is generally considered unmaintainable if not maintained by the original author. There are exceptions, but far too few.

      Please, for the love of God and fluffy kittens, someone write a Regexp-to-English translator. It would be useful for far more than Perl.

    38. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      Well, a regexp is complex in nature. Maybe it has higher maintenance requirements, and one could argue that it is maintainable by a certain level of programmers. Maybe not the average joe will be able to maintain it, but that doesn't mean it's unmaintainable.

      Sometimes the equivalent to a reg exp is many lines of code, and somehow multiple lines of code are perceived as "easier" to maintain/understand than a one line regexp.

      Most are afraid of regular expressions, but sometimes it takes a few minutes to read the manual and understand the basic stuff.

      There's a balance that needs to be achieved, just like anything else, so a 3 page long reg exp may be retarded, but the posted one doesn't look "impossible".

      My approach is always use them whenever I can because of how solid the logic behind them is, and I just write as many lines of comments as needed to explain what it does, just so another somewhat decent dev can pick it up and maintain it.

      I am sorry if my post sounds elitist, but just like anything else, the fact that 80% of the workers in a field don't get something doesn't mean we shouldn't pursue it. Quite the contrary, I think that if every programmer had to maintain a bunch of regular expressions, they quality/level of the programmers out there would improve.

      Or are we supposed to stop using advanced technology because the masses can't maintain it?

      Just like anything else, there's a balance, and the posted regexp looks understandable, or at least short enough for someone to figure out what it does, and that is without comments....

    39. Re:Sometimes the correct answer is the simplest by jacoby · · Score: 3, Insightful

      A new programmer -- or a bad programmer -- can write terrible Python code just as easily as they can write terrible Perl code. But at least it will have proper indentation.

      And we all know that proper indentation will never break anything.

      TAB Code
      TAB Code
      SPACETAB Code
      TAB Code
      TAB Code

      How long would it take you to debug that problem? It took me two hours the first time I tried to learn Python (reading someone else's code) and that's why there hasn't been a second time.

    40. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      s!(?:^|\w*/|\.\./|\./)[^\s,@;:]*(?<=/)([^\s,@;:]+?)(?=[\s,@;:]|$)!$1!g;

      Care to share with the rest of the class? It's pretty much impossible to search for strings like that, and I'm too lazy to walk through and try to figure it out.

    41. Re:Sometimes the correct answer is the simplest by jjn1056 · · Score: 1

      To be totally fair, regex's look difficult in most languages. Updates in the latest Perl 5.10 series should remove a bit of the line noise effect.

      Perl started off as a admin language, many scripts were written by non programmers who needed to automate jobs and reports. These scripts got crufty due to the rapidly changing requirements most reporting jobs have. As a result, despite the fact that a glance at the codebase of any serious, modern Perl application which is following the evolved best practices will be well tested, documented and regularized, Perl still seems to suffer from the line noise effect.

      Writing a modern Perl application using a solid framework such as Moose (http://search.cpan.org/dist/Moose) will result in very pleasing code.

      --
      Peace, or Not?
    42. Re:Sometimes the correct answer is the simplest by cube135 · · Score: 1

      ISO C++?

    43. Re:Sometimes the correct answer is the simplest by glop · · Score: 4, Insightful

      So true.
      I switched to Python because I could not market Perl to anybody including myself.
      I was using it from time to time and would try to convince coworkers to use it too.
      But the readability issues and the lack of keywords made it more difficult to look for documentation etc.
      As a result I could not market it to my coworkers and started having serious doubts myself. So I switched to Python.
      Suddenly, I could convince my coworkers easily as it looked good, readable, easy to learn by example etc.
      Also Perl and Python are very similar in what they offer (regexps, hashtables, string parsing, networking, modules). But Python usually offers a language construct to support important software engineering concepts (e.g. objects are native and not reimplemented every time as in Perl).

      Just my 2 cents. I tried to love Perl and market it around me. But I couldn't. PHP, Python, Linux, Wikis are easy sells but Perl is not.

    44. Re:Sometimes the correct answer is the simplest by parnold · · Score: 5, Informative

      How long would it take you to debug that problem?

      About 12 seconds. Run Python with the -tt option and it will tell you about lines with inconsistent use of tabs and spaces.

      --
      this sig intentionally left blank
    45. Re:Sometimes the correct answer is the simplest by bugg · · Score: 1

      Such as?

      I've seen people write procedurally designed programs in an OOP syntax, which provides the worst of both worlds.

      --
      -bugg
    46. Re:Sometimes the correct answer is the simplest by suggsjc · · Score: 1

      If you don't like regular expressions, that's your choice, but it really has nothing to do with Perl, and you should try to understand them, as they are very useful, even outside programming.

      Completely agree. However, for some reason when something comes up that I'm going to need to use regex's with I go to perl first. If it is just something procedural (if this, do that) then I'll typically use something else, especially if it will have to be maintained by someone else later on.

      I can't explain exactly why that is the case, but since (I)we tend to use perl for its regex capabilities (because its fantastic) it probably gets associated with them and hence regex's (percieved) complexity especially to people who are unfamiliar with them. Heck, I'm familiar with them but my no means an expert and that "example" looks a little daunting until you start breaking it down piece by piece.

      As much as I love perl, I personally feel as though if you put a well written and commented perl script beside a python or php (I actually use php from the command line every now and then too), that the perl just looks more complex. And to some (management) its more about perception than performance...hence the distaste for perl.

      --
      When I have a kid, I want to put him in one of those strollers for twins and then run around the mall looking frantic.
    47. Re:Sometimes the correct answer is the simplest by Talderas · · Score: 2, Informative

      use strict;

      --
      "Lack of speed can be overcome. In the worst case by patience." --Znork
    48. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      You have obviously never used any of the languages you are talking about or you are just desperately trying to defend Perl. Perl is a very bad language for many reasons. Maintainability isn't even Perls worst aspect. The number one reason it is a horable language is that it doesn't complain when you do something wrong it just tries to make it work. The result is a multitude of side effects.

    49. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      Get a better text editor and turn on view invisible characters, dumbass.

    50. Re:Sometimes the correct answer is the simplest by DaemonDazz · · Score: 1

      You don't have an editor that can show whitespace? You know, the faded out dots for spaces and arrows for tabs?

      And in any event, that as posted should still work as the tab character indents to the next tab stop, which is 8 spaces by default.

    51. Re:Sometimes the correct answer is the simplest by DuckDodgers · · Score: 2, Interesting

      A major Perl moto is "There is more than one way to do it".

      Flexibility in a language is good. Too much flexibility is a problem. You only need to know one way to do a set of tasks in Perl to write an effective program. I only need to know one way to do a set of tasks in Perl to write an effective program. He only needs to know one way to do a set of tasks in Perl to write an effective program.

      But you, he, and I need to know multiple ways to do sets of tasks in Perl to read, fix, and extend each others' code.

      Now, I agree that Perl's biggest problem is really just the marketing war. But this too-much-flexibility problem also exists. I understand Perl6 addresses that somewhat, but I haven't heard whether any of the compilers has a final release yet.

    52. Re:Sometimes the correct answer is the simplest by ivan256 · · Score: 1

      Yup. The other problem is that you have to actually know regular expressions to understand them. You can't fumble your way through by the implied meaning of the syntax.

      It weeds out the people who don't know what they're doing, lest they make the same mistake writing java code for you and use '==' instead of .equals() to compare objects and create the same types of problems without the excuse that regular expressions are "unreadable".

       

    53. Re:Sometimes the correct answer is the simplest by slashgrim · · Score: 2, Informative
    54. Re:Sometimes the correct answer is the simplest by SanityInAnarchy · · Score: 1

      As Talderas says, there's always use strict;

      And what you're talking about is a language enforcing a coding standard -- particularly syntax-wise -- which just strikes me as a bad idea, especially considering that if the only thing forcing you to write maintainable code is a stricter language, it's going to surface in other ways.

      If you look at The Daily WTF, you'll find that there's pretty much equal opportunity f*cked up code.

      Yes, Perl makes it easy to write such code, if you really want to. But it's ultimately your choice whether to write readable code or not, just as it's your choice whether to use ObjectWrapper.

      --
      Don't thank God, thank a doctor!
    55. Re:Sometimes the correct answer is the simplest by SanityInAnarchy · · Score: 1

      My editor make spaces visually obvious to me, so this probably wouldn't even be saved. Does negative time count?

      Disclaimer: I write Ruby, not Python. I do, however, use haml, and I'm seriously considering Lazibi -- the indentation is one of the things I miss from Python.

      --
      Don't thank God, thank a doctor!
    56. Re:Sometimes the correct answer is the simplest by Zaiff+Urgulbunger · · Score: 1

      Apart from Perl and JavaScript, are there any languages that implement regexes without stuffing them into a string? I really hate having to deal with the addition escaping issues. I was disappointed to discover that Python goes the string too. :(

    57. Re:Sometimes the correct answer is the simplest by Directrix1 · · Score: 1

      :set expandtab
      :%retab

      --
      Occam's razor is the blind faith in the natural selection of least resistance and in universal oversimplification. -- EF
    58. Re:Sometimes the correct answer is the simplest by corbettw · · Score: 1

      How long would it take you to debug that problem?

      I don't know, how long does it take you to read "Indentation Error: line 3"?

      --
      God invented whiskey so the Irish would not rule the world.
    59. Re:Sometimes the correct answer is the simplest by binary+paladin · · Score: 1

      The only way that would make a difference in Python is if your text editor is using soft tabs (as in, X spaces inserted per tab) AND your text editor doesn't just toss in 8 spaces but rather takes it to the next tab point regardless.

      I just recently ran into a Python problem like this, but it didn't take me that long to debug. It wouldn't have even with invisibles turned off.

    60. Re:Sometimes the correct answer is the simplest by Medievalist · · Score: 1

      s!(?:^|\w*/|\.\./|\./)[^\s,@;:]*(?<=/)([^\s,@;:]+?)(?=[\s,@;:]|$)!$1!g;

      Can you see the bug in this code? I didn't think so. Perhaps if you re-wrote it as an iterative loop it would be obvious... it will probably execute as an iterative loop at run-time anyway, so you shouldn't lose any performance unless you're incredibly bad at writing loops.

      Adding a comment to the effect of "strip path to create untainted filename" would be nice, too.

      This regex could be made even less comprehensible by eliminating the repeating \s,@;: in favor of a variable built with hex codes. Write it in sed for maximum obfuscation!

      Bad coders can write bad code in any language.

    61. Re:Sometimes the correct answer is the simplest by Bemopolis · · Score: 1

      My god, man! We're trying to have a language flamewar here — let's not get distracted by vi-vs-emacs.

      --
      "I guess the moral of the story is, don't paint your airship with rocket fuel." -- Addison Bain
    62. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      Ruby has a first-class syntax for regexes, one of the many good ideas it stole from Perl.

    63. Re:Sometimes the correct answer is the simplest by Just+Some+Guy · · Score: 1

      How long would it take you to debug that problem?

      About 2 seconds. Honestly, haven't you people ever heard of programming editors?

      --
      Dewey, what part of this looks like authorities should be involved?
    64. Re:Sometimes the correct answer is the simplest by nametaken · · Score: 1

      Yes. The .net framework has regex libs. It's available in C#, VB, etc.

    65. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      Such as?

      I've seen people write procedurally designed programs in an OOP syntax, which provides the worst of both worlds.

      LOL well I've definitely wrote unmaintainable procedural code in Java when I was first learning it as it was my first exposure to OOP.

      It's easy to write bad code in any language.

    66. Re:Sometimes the correct answer is the simplest by visualight · · Score: 1

      You know, with every kid coming out of college knowing java, I'm not really surprised that there's so many java applications, a couple of major projects at my company are written in java. The devs love it. The execs seem to as well, that does surprise cause I've never seen a java gui toolkit with attractive widgets.

      But I gotta tell you, as a user, and as an SA that has manage the paths, toolkits, and jre's I really wish you guys would just fucking quit already.

      --
      Samsung took back my unlocked bootloader because Google wants me to rent movies. They're both evil.
    67. Re:Sometimes the correct answer is the simplest by Bob+Uhl · · Score: 1

      Regexp != Perl.

      You're 100% correct. Most every language has regexp support these days, and rightly so: they can be very useful in their place. But Perl makes them very easy to use (which is a good feature) and more importantly has a culture which encourages their frequent use. You know how when all you have is a hammer everything looks like a nail? Well, when all you have is Perl every problem looks like it can be solved with regexps.

      The terrible thing about regexps--and the reason why they should be avoided in code if possible--is that they tend to be write-only. It's very easy to take something you want to match and turn it into a regexp; that's why grep and emacs and vi and all sorts of end-user tools support them. But going in the opposite direction--reasoning from a regexp to figure out the class of strings it matches--is more difficult. In fact, a suitably-complex regexp matches an infinite number of strings (hint: most any use of * will do that...).

      This write-only tendency of one of Perl's key language features ties in with the write-only tendency of Perl code in general. It's very easy to figure out what Perl you need to write in order to do X; it's rather more difficult to figure out from Perl code what X or Y or Z it is doing.

      This is why so often the answer to Perl maintenance is to rewrite it.

      This problem is not unique to Perl; in fact, I imagine that write-only code is possible in almost any language. But its probability is different in different languages; it seems less likely in Python than it is in Perl. In fact, no language in my experience lends itself to write-only code like Perl does.

    68. Re:Sometimes the correct answer is the simplest by GeneralTao · · Score: 1

      You've clearly never had to code for performance.

      There are cases where a complicated regex is killing a fly with a sledgehammer. Yet there are other cases where using the regex means the difference between a 12 minute run time and a 45 second run time. And even other cases where pre-compiling the regex can bring you down to 30 second run times.

      --
      --- Tao
    69. Re:Sometimes the correct answer is the simplest by mr_mischief · · Score: 1

      A construct in Perl does not have a runtime in relation to its length. It has a runtime in relation to the number of opcodes it generates.

    70. Re:Sometimes the correct answer is the simplest by Just+Some+Guy · · Score: 1

      I'm sure if you wrote code that walked through the steps in what you are trying to achieve, all the following would be quicker

      While I agree in general principle, there are very real reasons why one-liners may be (possibly much) faster. For instance, suppose you want to execute an idempotent function, foo(), on every value in a list. The order of execution isn't important. Real world example: image manipulation where each pixel can be processed independently.

      Writing it out longhand would give you something like:

      for item in values: foo(item)

      That's certainly clear enough! But suppose instead you do something like:

      map(foo, values)

      A naive implementation of map() will work similarly to the longhand version. A parallelized version of map(), though, could potentially process many values simultaneously, possibly even via a cluster of remote machines.

      Another example: SQL. You don't say "loop across every row in table 'foo' and try to find a corresponding row in table 'bar'. Then, loop across that relation and give me the first and third values from 'foo' and the fourth value from 'bar'." Instead, you say "select foo.a, foo.c, bar.d from foo, bar where foo.id = bar.id". The database engine knows the best way to generate that set of tuples, so you ask it to do so and don't usually care what happens behind the scenes.

      What I'm saying in a roundabout way is that sometimes there are huge wins from letting the language do as much of your work as possible. This isn't "cleverness" or "premature optimization" as much as asking the machine to do its job in the most efficient manner.

      --
      Dewey, what part of this looks like authorities should be involved?
    71. Re:Sometimes the correct answer is the simplest by rnturn · · Score: 1

      ``But I gotta tell you, as a user, and as an SA that has manage the paths, toolkits, and jre's I really wish you guys would just fucking quit already.''

      I hear ya. The Java folks surely never got their head around backward compatibility did they. I've got one system that has to keep four different run-time environments around for various applications that nobody has time to rewrite/re-engineer to work with newer versions of Java. I'm sure there are other folks out there with even more JREs that cannot be de-installed. Java's version of DLL Hell.

      --
      CUR ALLOC 20195.....5804M
    72. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      Perl itself has its own excellent documentation bundled with it. No need to search the internet, just perldoc perltoc for the table of contents and you're off.

    73. Re:Sometimes the correct answer is the simplest by mr_mischief · · Score: 1

      "Building in" is a key phrase there. PHP's biggest disadvantage is that everything becomes part of the main namespace. Most extensions in Perl are provided in manageable external modules that import nothing or optionally import nothing into your main namespace. For all the people talking about "maintainability" this and "hard to understand" that and praise PHP over Perl, they've obviously never messed with PHP extensions with conflicting function names. Perl has its downsides, but this generally isn't one of them.

    74. Re:Sometimes the correct answer is the simplest by g0bshiTe · · Score: 1

      This is really why perl is shunned.

      Obfuscated Perl

      --
      I am Bennett Haselton! I am Bennett Haselton!
    75. Re:Sometimes the correct answer is the simplest by Al+Dimond · · Score: 1

      Actually that makes me think a bit. The regex is hard to understand, a manually-written parser would be much worse. I'm sure this will sound like blasphemy to some, but maybe what we need is a more verbose regex syntax.

      I like current regex syntax for fairly simple expressions. But in complicated regexes it's hard to see the structure of the expression. So, at least something that ignored returns and whitespace and thus allowed the programmer to structure the expression hierarchically would be nice. And then verbose symbolic names for some of the constructs. They'd need to be clearly differentiated from literals -- maybe even require literals to be quoted. That would be awful for expressions that use lot of literals, but we could just use existing syntax for those.

    76. Re:Sometimes the correct answer is the simplest by mr_mischief · · Score: 1

      "modern".

    77. Re:Sometimes the correct answer is the simplest by crustymonkey · · Score: 1

      Python has a simple mechanism to get around that though. You simply put an "r" in front of the string and the only thing you have to escape is your string delimiter (" or '). Ex.:

      reg = r'^finding this at it\'s beginning'

      --
      \033:wq!
    78. Re:Sometimes the correct answer is the simplest by mr_mischief · · Score: 1

      Considering that Perl was originally intended to replace sed, awk, and many twisty shell languages, all different in many projects, saying that rewriting something from Perl into sed obfuscates it is exactly the point.

    79. Re:Sometimes the correct answer is the simplest by Medievalist · · Score: 1

      Considering that Perl was originally intended to replace sed, awk, and many twisty shell languages, all different in many projects, saying that rewriting something from Perl into sed obfuscates it is exactly the point.

      Nice advent reference, Mr. Mischief.

      In theory, theory and practice are the same. In practice, they aren't.

      The regex we're talking about is a buggy implementation of bash's basename function. Rewriting it from bash into perl obfuscated it, but that's not a shortcoming of the language, it's a design decision made by the programmer.

    80. Re:Sometimes the correct answer is the simplest by onto_dry_land · · Score: 1

      What problem are you talking about debugging? All the code in your example is on the same indentation level. The code runs just fine.

    81. Re:Sometimes the correct answer is the simplest by bytesex · · Score: 1

      I write websites exclusively in perl. Because there is no substitute for cpan, and because I love perl. I never have any problem decoding things I, or other people wrote five years ago, only a kind of resignation that I can keep on learning in this language and that I should have dotted a few 'i's and crossed a few 't's then. Now, my anecdote is obviously better than yours, so we'll call this the truth. Over to you.

      --
      Religion is what happens when nature strikes and groupthink goes wrong.
    82. Re:Sometimes the correct answer is the simplest by texwtf · · Score: 1

      here's a java stack trace. No, not the whole thing, because that would take an hour to parse. This is just the main() call.

                      at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
                      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.ja
      va:289)
                      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.jav
      a:461)
                      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
                      at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEAppli
      cation.java:106)
                      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandl
      e.java:169)
                      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runAppli
      cation(EclipseAppLauncher.java:106)
                      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Ec
      lipseAppLauncher.java:76)
                      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja
      va:363)
                      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja
      va:176)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:585)
                      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
                      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
                      at org.eclipse.equinox.launcher.Main.run(Main.java:1173)

      While to a small extent I agree with your assertion about maintainability, the reality is there are _gobs_ of ugly java, and core failings in the language (yeah, and other languages too). CLASSPATH, for example, is pure fustercluck.

    83. Re:Sometimes the correct answer is the simplest by wmbetts · · Score: 1

      If you don't like regular expressions, that's your choice, but it really has nothing to do with Perl, and you should try to understand them, as they are very useful, even outside programming.

      Indeed I use them all the time for stuff I don't consider programming like command line string replacements in files using sed.

      --
      "Ubuntu" -- an African word, meaning "Slackware is too hard for me". - stolen from Dan C alt.os.linux.slackware
    84. Re:Sometimes the correct answer is the simplest by Doctor+Faustus · · Score: 1

      Ruby has special delimiters for beginning and ending a regex, and then a regex is its own type as much as a string is, pretty much like Perl.

      I think Ruby's general design goal was to be good at what Perl is good at, without being so perverse.

    85. Re:Sometimes the correct answer is the simplest by 0xABADC0DA · · Score: 1

      The thing is that mixing tabs and spaces is annoying as hell in any programming language. Personally I find the whole concept of using an invisible character with both undefined and variable width to be absurd. Frankly I'm surprised that the programmers using tabs haven't moved on to using <blink> in the code.

      The only difference in Python is that it requires the programmer to use a consistent indentation. While that's annoying while writing code it helps a lot reading it because every program has consistent indentation. No matter how messed up the programmer a least the program's physical structure is sane.

      And I doubt debugging mixed tabs/spaces is any harder than debugging "while(var); { /* the loop? */ }". And the editor can clearly show you where tabs vs spaces are, for instance in vimrc:

      "highlight tabs at the beginning of the lines
      highlight TabLevel term=reverse ctermbg=LightGray
      match TabLevel "^\t\+"

      I despise the python indenting when I am writing a program because I have to do more work. But I love that other people have to do that work, and sometimes paradoxically what's worse for an individual programmer makes the language better because the community benefits. For instance Java having static, sealed, unchangeable core classes makes a lot of programs harder to write then say in smalltalk, but overall it makes Java a better language.

    86. Re:Sometimes the correct answer is the simplest by Doctor+Faustus · · Score: 1

      The alternative to a regular expression is usually a very convoluted parser that's a lot of effort to support.
      Currently, sure. I think regular expressions have proven pretty well that a domain specific language (DSL) for string scanning is a positive thing, and that structuring the DSL by matching the order of the string is a viable way to do that. It does not follow from that, though, that the syntax needs to look like line noise.

    87. Re:Sometimes the correct answer is the simplest by Doctor+Faustus · · Score: 1

      Personally I find the whole concept of using an invisible character with both undefined and variable width to be absurd.
      Tabs mean I can view code with four space indenting, you can view the same code with two space and someone else can view it with eight space. Besides, a tab's whole purpose is indenting. And if you didn't use spaces, you wouldn't have problems.

      For instance Java having static, sealed, unchangeable core classes makes a lot of programs harder to write then say in smalltalk, but overall it makes Java a better language.
      No, it doesn't. Starting with 2008, C# is letting you associate new methods with existing classes.

    88. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      regexp isn't limited to Perl.

    89. Re:Sometimes the correct answer is the simplest by dallaylaen · · Score: 1

      So, at least something that ignored returns and whitespace and thus allowed the programmer to structure the expression hierarchically would be nice.

      In perl, you can do just that:

      s{
      search # here comes
            # a multiline expression
            # with comments and indentation
      }
      {replace}gx

      Perl does have horrible things about it (mentioned elsewhere in this topic), but the regexps are NOT one of them.

      --
      WYSIWIG, but what you see might not be what you need
    90. Re:Sometimes the correct answer is the simplest by dgatwood · · Score: 1

      So, at least something that ignored returns and whitespace and thus allowed the programmer to structure the expression hierarchically would be nice.

      You mean like the /x modifier in Perl?

      http://www.regular-expressions.info/freespacing.html

      They'd need to be clearly differentiated from literals -- maybe even require literals to be quoted.

      No. That's exactly the opposite of what we need. It should be harder for something to not be a literal. If I were designing a regexp language, I would make it so that the contents of variables are always automatically quoted---none of this \Q and \E crap. You should have to add additional stuff around a variable to get the non-quoted behavior. This is the most common bug I've found in Perl code---user-entered text treated as part of an expression when it shouldn't be.

      The problem is that regular expressions are often used for things that they aren't suited for. As soon as you add look-behind and crap like that, you're already beyond usable regular expressions. At that point, you need to take a step back and look at the problem again. Chances are, you'll find that the problem would be solved better programatically with a few lines of code rather than a jumbled, cryptic regexp that no one can understand without staring at it for five minutes. (Of course, it doesn't help that half the time, there's no comment before that snarled mess of a massive, bloated regexp to tell what it does....)

      Regexp is good for quick text processing. As soon as you're writing things in it that would be better served by a proper parser, you're just asking for maintenance problems of the "Oh, this declaration formatting code doesn't indent correctly when the user puts a struct nested in another struct nested in a typedef struct:" variety.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    91. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      I write bug free code. Can I have that hat?

    92. Re:Sometimes the correct answer is the simplest by mdfst13 · · Score: 1

      maybe what we need is a more verbose regex syntax.

      What's really ironic about that statement is that Perl's RegEx syntax is actually one of the best parts of it. If you use /x, you can comment your RegEx and spread it over multiple lines. If you switch from the original // notation to {} notation, you can make it more readable (particularly when you need to use /s in your RegEx). Further, Perl supports embedding RegExes in other RegExes, e.g.

      my $ALPHA = qr{[A-Za-z]}xsm;
      my $NUMERIC = qr{[0-9]}xsm;
      my $ALPHANUMERIC = qr{$ALPHA|$NUMERIC}xsm;
      my $VALID_USER_ID = qr{$ALPHA $ALPHANUMERIC*}xsm;

      if ( $user_field =~ m{$VALID_USER_ID}xsm ) {
          # do something
      } else {
          # handle error case
      }

      (my syntax may be slightly off, I'm writing without a perl interpreter). In any case, the point I was making was that you can write self documenting Perl RegExes now. The problem is that you can also write horribly obfuscated RegExes.

      The problem isn't that it is impossible to write elegant, maintainable code in Perl. It's that there are so many bad ways to write Perl code, chances are that at least one programmer who has worked on the script has done so. Especially since Perl maintains backward compatibility with all the stupid ways that things were done previously, which makes it hard for the interpreter to determine at compile time if something is stupid. It needs the run time context.

      This isn't unique to Perl. I have the same problem with (the JAVA ORM) Hibernate's inability to tell me that I misspelled a column reference in my HQL until it fails catastrophically at run time (and its inability then to tell me which column reference is broken). This leads to a large number of Hibernate unit tests that basically implement compiler warnings by exercising code. However, it is very common in Perl.

      IMO, it's not that Perl has passed its time. It's just that the language is not really intended for the purposes to which it is being put. It's not a highly maintainable language for user facing code. It's a system administrator language with its scripts intended to be run by the author of the script.

    93. Re:Sometimes the correct answer is the simplest by jdoss · · Score: 1

      *stammers* Screw you, doodiehead! *runs out of the room*

    94. Re:Sometimes the correct answer is the simplest by jez9999 · · Score: 1

      You can take _any_ language and make a hash of it.

      Yes, but you can't take _any_ language and make a hash in it.

    95. Re:Sometimes the correct answer is the simplest by jez9999 · · Score: 1

      Yeah, and can you make Java look like this? ;-)

    96. Re:Sometimes the correct answer is the simplest by DrVomact · · Score: 1

      I've been using Perl for abour 15 years. I experimented with Python once: I wrote a program that controlled a WebDAV doc management system using http protocol and xml. It worked great, and there were a lot of things I liked about Python. However, one thing absolutely killed it for me: it's indent sensitive. That is, code blocks (like if and while loops and such) are defined by their indenting. If your indenting is off, you get a syntax error, or unexpected results. This seems completely bizarre to me. Don't get me wrong—I'm downright compulsive about indenting my Perl code because it makes the code readable. But I want those curly braces to set off blocks, so that if my editor accidentally eats all the white space at the beginning of every line in my code, I won't be left with a complete mess. Not only does this remind me of my Cobol punch-card days, when commands had to begin at a particular column or the juju would fail, but the whole notion of meaningful white space just strikes me as unholy.

      My impression was that both languages were about equally good; both have active user communities supporting them. If Python had some sort of edge, I'd put up with the indent thing, but as it is, I see no reason to change to a language that has such an annoying feature, and offers no clear benefits over what I'm using.

      --
      Great men are almost always bad men--Lord Acton's Corollary
    97. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      Shouldn't you take into account what the programs are trying to accomplish? If I download 50 python programs that connect to a db and print something and 50 Perl programs that try to parse a language and insert synonyms, it'd be really different.

      The fact is: most code SUCKS. Most programmers are marginal at best. A lot of the Perl people complain about was written a long time ago, and can be updated. By updating shouldn't mean switching languages. It might, but it doesn't necessarily map 1:1. Bad code is bad code, but bad code does not make a bad language.

      For instance, your point was fallible, but we all still continue to speak in English here. No one is saying we should use French just because your logic is poor.

    98. Re:Sometimes the correct answer is the simplest by HiThere · · Score: 1

      I that's your metric, you should clearly choose APL. (I think the current version is called J, as the older version required special keyboards and typeballs.)

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    99. Re:Sometimes the correct answer is the simplest by HiThere · · Score: 1

      There are some problems best solved through regular expressions.

      OTOH, in my experience even Ruby code that does what is needed (with minimal help from regular expressions) is both faster and more maintainable than a long complex regular expression. And Ruby is one of the slower languages. (Possibly because so much regular expression is embedded into it...though that's just a WAG.)

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    100. Re:Sometimes the correct answer is the simplest by istartedi · · Score: 1

      You left out the other big advantage of tabs: You can move across one level of indentation with one keystroke. Whenever I come across code that uses spaces for indent, if it's a four-space indent I have to use 4 keystrokes, or hold the key down a fixed ammount of time. Some people have the dexterity for this, or consider carpal tunnel a badge of honor. Or, maybe they're like one of my co-workers who prefers vi--but she also plays a musical instrument and I don't. I sometimes wonder if playing a musical instrument helps build the dexterity to handle an editor that requires more challenging key sequences... but anyway, I digress. Continue to use tabs. The wrists you save might be your own.

      --
      For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
    101. Re:Sometimes the correct answer is the simplest by jacoby · · Score: 1

      That works if you know that's the problem. I don't set that by default because sometimes I deal with tab-delimited stuff.

    102. Re:Sometimes the correct answer is the simplest by synthespian · · Score: 1

      Regexs should be documented, because each one deals with a very specific problem. So you better mention what is is you're solving.

      Are you done with the fallacy?

      --
      Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
    103. Re:Sometimes the correct answer is the simplest by jacoby · · Score: 1

      And if you didn't use spaces, you wouldn't have problems.

      YeahIcanseewhyspacescanbeaproblem.

    104. Re:Sometimes the correct answer is the simplest by jacoby · · Score: 1

      I suspect it was my programming editor that added that space, but I've since left that job so I'm not 100% on it.

    105. Re:Sometimes the correct answer is the simplest by jacoby · · Score: 1

      Which is something that a person new to the language, when faced with "Try this, it's an app in Python you can learn from", would immediately go for. Clearly.

    106. Re:Sometimes the correct answer is the simplest by radish · · Score: 1

      I would posit that if the regexp parser built into your language is able to execute an algorithm significantly faster than than code written in your language itself, your language is broken.

      Regexps are great for saving you having to write big complex parsers full of ugly boilerplate code, but if you take the time to write that code it should be at least as fast as the regexp (and in fact should be faster in the general case as they can be more specialized).

      --

      ---- Den ene knappen er powerknapp, den andre er Bender voice knapp "Bite My Shiny Metal Ass"

    107. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      I expect that even C# has regexp libraries

      Yup.

    108. Re:Sometimes the correct answer is the simplest by mr_mischief · · Score: 1

      It's kind of silly to rewrite basename at all, considering all one needs to do is this:

      use File::Basename;
      $basename = basename($fullname,@suffixlist);
      $dirname = dirname($fullname);

    109. Re:Sometimes the correct answer is the simplest by IntlHarvester · · Score: 1

      Actually that makes me think a bit. The regex is hard to understand, a manually-written parser would be much worse.

      Yup, see any VB codebase (or anything written by VB programmers). Loads of difficult to read stuff like:

      If Mid(blah,x,y)=a And (Left(blah,z)=b Or InStr(blah,p,q) > 0) And Mid(blah,r,s) ...

      Which often can be replaced by a very simple regex.

      --
      Business. Numbers. Money. People. Computer World.
    110. Re:Sometimes the correct answer is the simplest by smittyoneeach · · Score: 0, Offtopic

      This is /., where reading TFM is like reading TFA.
      (Confession: I am a documentation geek, and actually do read the stuff. Is this why I have no friends?)

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    111. Re:Sometimes the correct answer is the simplest by smittyoneeach · · Score: 1

      So, the significant whitespace conveys the information formerly within { and }.
      This is only a problem in Python in the rare case that you want to generate some Python code on the fly,
      or the slightly less rare case of wanting to do something on the command line.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    112. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      Matter of fact, since Java doesn't support raw strings, the same perl regex in java is even uglier. enjoy a sampling (and I'm not even doing the substitution part):
      (?:^|\\w*/|\\.\\./|\\./)[^\\s,@;:]*(?=/)([^\\s,@;:]+?)(?=[\\s,@;:]|$)
      ;

    113. Re:Sometimes the correct answer is the simplest by blair1q · · Score: 1

      But you have a problem.

      The specs and comments do not always match the code. Especially after a few dozen late-date revisions to fix bugs.

      Code has to be readable. Otherwise you might as well be coding in binary and commenting it.

      The whole point of high-level languages was to make it easy for humans to tell computers what to do.

      The point of much of perl seems to be to make it take fewer bytes of source.

    114. Re:Sometimes the correct answer is the simplest by 0xABADC0DA · · Score: 1

      Tabs mean I can view code with four space indenting, you can view the same code with two space and someone else can view it with eight space. Besides, a tab's whole purpose is indenting. And if you didn't use spaces, you wouldn't have problems.

      Tabs mean that the default indenting is neither what the author wanted nor often what the viewer wanted, unless they are the same. For instance, viewing code in cvsweb or svn web gateway.

      The purpose of tabs was creating TABles on a typewriter, not indenting.

      Either all alignment is on a tabstop or you must use spaces. Most code uses some alignement (for instance #defines), so requires spaces, but no code requires tabs.

      No, it doesn't. Starting with 2008, C# is letting you associate new methods with existing classes.

      ... which is done by the compiler writing a static method on *your* class and rewriting your code to call that static method when it looks like you are calling an instance method. It's compile-time only and behaves exactly the same as Java -- you aren't actually adding a method the the actual class, as you can do in Smalltalk, python, ruby, javascript, etc.

      I guess you are playing at devil's advocate ?!

    115. Re:Sometimes the correct answer is the simplest by 0xABADC0DA · · Score: 1

      You left out the other big advantage of tabs: You can move across one level of indentation with one keystroke.

      New lines are automatically indented the proper amount. Changing indent is done by using ctrl-d or ctrl-i, or selecting a block and auto-formatting, or using the block-shift (> and < in vim). Move to the first character on the line with ^ or 0w.

      If you are typing multiple spaces or cursoring over them, there's a problem. That problem is that you don't know how to use your editor very well. Even Windows style text boxes have combos for this.

      If anything, I would expect vim to reduce carpal tunnel risk by complex operations on the text reducing the total keys needed, and using command mode instead of modifiers to reduce finger contortions. But like 'back pain' a lot of cases are just people whining (psychosomatic).

    116. Re:Sometimes the correct answer is the simplest by Doctor+Faustus · · Score: 1

      neither what the author wanted
      Good. If I'm viewing it, I want it to follow my rules.

      nor often what the viewer wanted
      Huh?

      For instance, viewing code in cvsweb or svn web gateway
      Not familiar with those, sorry.

      Most code uses some alignement (for instance #defines)
      It does? It's been a while since I've done C (1995?), but I don't remember it particularly caring about spaces in the #define.

      which is done by the compiler writing a static method on *your* class and rewriting your code to call that static method when it looks like you are calling an instance method.
      My understanding was that it was making it appear as though the class had a new method within your code, while leaving it alone for other people's code. I've only read about it, though, and I don't remember how the scope was managed; within one class is awfully narrow.

      I have added methods to core classes in Ruby, and it seemed like a good approach. I do think the way Ruby lets you add methods to individual objects is going a bit far, though.

    117. Re:Sometimes the correct answer is the simplest by CromeDome · · Score: 1

      And that is exactly why you comment your code:
      * For others to see the point of what you're doing
      * For you to correctly change what it does
      * For you to get it working right in the first place.

      Don't know how to correctly change it? RTFM. There are so many good regex tutorials and books out there, I don't know where to begin.

      Your inability to understand or program regex does not make those of us that can childish.

    118. Re:Sometimes the correct answer is the simplest by Fulcrum+of+Evil · · Score: 1

      Python is cool for its ability to shift code from script to native libraries as needed; perl isn't quite as handy if you want to do something like embed an interpreter into some app with callouts back to native code.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    119. Re:Sometimes the correct answer is the simplest by Fulcrum+of+Evil · · Score: 1

      In the general case, it shouldn't be written at all - regex code is nasty stuff that likes to hide bugs; far better to use a slightly slower construct that's easier to test.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    120. Re:Sometimes the correct answer is the simplest by Fulcrum+of+Evil · · Score: 1

      Another example: SQL. You don't say "loop across every row in table 'foo' and try to find a corresponding row in table 'bar'.

      You do know the difference between imperative, declarative, and functional languages, right? You don't tell SQL what to do because SQL is about telling the computer what you want.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    121. Re:Sometimes the correct answer is the simplest by Just+Some+Guy · · Score: 1

      You do know the difference between imperative, declarative, and functional languages, right?

      Yep!

      You don't tell SQL what to do because SQL is about telling the computer what you want.

      Yep! And in the much the same way, there are constructs in many imperative languages that operate similarly, such as the example of an enhanced map() function. Rather than specifically telling the program how to do its job, you tell it what you want to accomplish and let it figure out the details. The point I wanted to make is that such things aren't inherently "clever" or "hackish", but genuinely better in a lot of measurable ways.

      --
      Dewey, what part of this looks like authorities should be involved?
    122. Re:Sometimes the correct answer is the simplest by stmfreak · · Score: 1

      Fact that there is to much f*cked up perl code, shows that it is an inferior language.

      That's like claiming Chess is an inferior game to tic-tac-toe because there are more weak players than strong ones.

      If your goal is to create a language that any average employee can use, bravo. If your goal is to identify the better language for accomplishing some task, I think you are evaluating the wrong criteria.

      --
      These opinions guaranteed or your money back.
    123. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      As a simple test, download 50 perl programs at random, download 50 python programs at random, compare the quality. Fact that there is to much f*cked up perl code, shows that it is an inferior language.

      Could it also be that there are more incompetent Perl coders than incompetent Python coders?

    124. Re:Sometimes the correct answer is the simplest by Fulcrum+of+Evil · · Score: 1

      map is more of a functional thing; you tell the compiler 'call this function on every element in this bag' and let it work out how to do things faster (but you already knew that), and it's really useful with something like reduce, where you distill the results of map() into something manageable. Expanding on your point a bit, these aren't hacks, they're just not the straight imperative style we've been using for umpteen years - it's a shame too, since the concepts are 20+ years old.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    125. Re:Sometimes the correct answer is the simplest by FormOfActionBanana · · Score: 1

      It looks like your problem is on line 466 of WorkBench.java.

      CLASSPATH is awesome; it's the solution to DLL hell. I don't get how people get so confused over the classpath... do you also have trouble with your socks and underwear in the dresser? Everything goes it its place.

      --
      Take off every 'sig' !!
    126. Re:Sometimes the correct answer is the simplest by bar-agent · · Score: 2, Informative

      So, the significant whitespace conveys the information formerly within { and }.

      There's more to it than that. It's like Python has personal space. Whenever another tool, or even another conceptual model impinges on its personal space, it gets cranky. Three examples:

      First, in complex software environments, you sometimes need to edit, elide, or change source code on the fly to support special software distributions. This is error-prone when you have to care about tabs and spaces.

      Second, XML and HTML. They don't acknowledge differences between spaces and tabs, or even the existence of consecutive white space. You put Python code in one of those formats, and you are guaranteed to receive errors of some kind or another. If you've ever used the STAX testing framework, you'll know this pain.

      Third, copy & paste. You can't use it reliably.

      --
      i'd hit it so hard, if you pulled me out you'd be the king of britain [bash.org]
    127. Re:Sometimes the correct answer is the simplest by bar-agent · · Score: 1

      Tabs mean I can view code with four space indenting, you can view the same code with two space and someone else can view it with eight space. Besides, a tab's whole purpose is indenting. And if you didn't use spaces, you wouldn't have problems.

      Everyone uses spaces. But let's say you don't. Everyone else uses spaces, so other people's code still looks messed up. Tabs suck, that's all there is to it. Elastic tab-stops look like a solution, but not likely to see wide adoption.

      --
      i'd hit it so hard, if you pulled me out you'd be the king of britain [bash.org]
    128. Re:Sometimes the correct answer is the simplest by smittyoneeach · · Score: 1

      So, the environments you're in make assertions about source code which are as strong, but conflicting with, Python's.
      OK
      I mainly code Python within emacs, where textual sculpture is trivial.
      Where I fall short of agreeing with anyone is the point where an absolute right answer is proclaimed: these matters are more stylistic than substantial, and mileage varies in a variety of directions.
      Many would contend that the loosy-goosy nature of Perl syntax is in fact the bug. I'd argue that the challenge is more the awsome prevalence of short-cut semantics in Perl. Perl blows away all comers in the number of cunning stunts cooked into environment.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    129. Re:Sometimes the correct answer is the simplest by texwtf · · Score: 1

      > It looks like your problem is on line 466 of WorkBench.java.

      It looks like you didn't read my posting, nor really comment on the substance.

    130. Re:Sometimes the correct answer is the simplest by totally+bogus+dude · · Score: 1

      It might help if you defined what you mean by "do something wrong". Can you give some examples of what you mean?

      I do want to like Python, and I went through a period where I used it for everything I would have used Perl for. After a few months I've decided that I really do prefer Perl, and I kind of regret writing these things in Python whenever I need to make changes. Not enough to actually rewrite them in Perl, mind you; they do work, after all.

      It may be that I'm approaching Python in the wrong way, and trying to treat it as a "scripting language" (whatever that actually is) as opposed to a "real programming language" (whatever that is). Python seems to sit closer on that continuum to "real" language, but things like it not being able to tell me that I just assigned a value to a variable that doesn't exist make me feel a bit uncomfortable using it in that way. Hell, when I have to write VBScript I always use "option explicit".

      As a "scripting language", Perl just seems much more comfortable to me. But, I'm not a programmer and I haven't had to work with a team of others on a large project and deal with their different styles or different levels of proficiency. I may well have a different feeling if I did. As it stands, if I'm doing something quick and dirty I'll use bash; if I'm doing something a bit more complicated I'll use Perl; and if I want to write something serious, I'll use the subset of C++ that doesn't make my head explode. I just don't seem to have a niche for Python to fill.

    131. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      nor often what the viewer wanted
      Huh?

      <quote> much?

      Here are two cases:

      1) The original author uses two-spaced tabs, uses several tabs (gnu style for instance). When you view it at 8-space tabs the code takes up far more horizontal width then you would care for.

      2) You don't have control over the tabstop, for example in cvsweb which lets you access cvs repository on the web. If the source code uses tabs, then it renders however wide the browser wants (typically 8 characters).

      Typing "cvsweb" into google is too much intellectual curiosity for you I guess? Color me unimpressed.

      I have added methods to core classes in Ruby, and it seemed like a good approach. I do think the way Ruby lets you add methods to individual objects is going a bit far, though.

      It is a good approach... for a scripting language that doesn't build up a massive library of components where people don't expect code to work together, has no security features, poor backward/forward compatibility, etc.

      I could have been more clear and said "successful" language rather than "better".

    132. Re:Sometimes the correct answer is the simplest by CodeBuster · · Score: 1

      I expect that even C# has regexp libraries

      System.Text.RegularExpressions

    133. Re:Sometimes the correct answer is the simplest by ahaile · · Score: 1

      s!(?:^|\w*/|\.\./|\./)[^\s,@;:]*(?<=/)([^\s,@;:]+?)(?=[\s,@;:]|$)!$1!g;

      Wouldn't ...

      s!/([^\s,@;:]*/)*!!g

      ... be a lot simpler?

      Kinda seems to me like you're proving the opposite point: if you don't understand a language -- like seems to be the case with you and regexps here -- you're gonna write really crappy code.

    134. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      No, that only shows that the sample space for perl programs is bigger.

      Download 1% of all available python programs and 1% of all available perl programs, and if there's a difference in "quality", then and only then you might have a case.

    135. Re:Sometimes the correct answer is the simplest by tkinnun0 · · Score: 1

      Which raises the question: if making invisible character visible is needed to understand a Python program, why wasn't visible characters chosen for the job in the first place?

    136. Re:Sometimes the correct answer is the simplest by famebait · · Score: 1

      I agree completely, and I do not consider map() to be one of those obfuscated or "clever" one-liners I railed against. Those hide the point and crowd you with details.

      Map is quite the opposite: if used in the normal way, it is a shining example of clarity and expresses perfectly clearly what you code is for. Even better than the for loop would. It hides the details and not the point.

      --
      sudo ergo sum
    137. Re:Sometimes the correct answer is the simplest by famebait · · Score: 1

      You've clearly never had to code for performance.

      I have, and when you need to optimize then of course you make those sacrifices. But only do it when and where it is needed, and where it actually works. Doing complex but 'probably faster' things out of habit and outside the inner loops takes time with zero payoff and makes the product more bug prone and more expensive to maintain.

      --
      sudo ergo sum
    138. Re:Sometimes the correct answer is the simplest by dna_(c)(tm)(r) · · Score: 1

      ive me an example of one modern language that *doesn't* have regexp support.

      English? No, French, definitely French!

    139. Re:Sometimes the correct answer is the simplest by famebait · · Score: 1

      Learn to read please. I did not call regex users childish. I called 'macho coders' who sneer at legible code childish.

      I can and do read and write regexes. They're useful, just like lots of other lagugages.
      A steaming pile of dense one-line-code, however, remains an evil thing, whatever language you do it in, and no matter how much you comment it.

      To correctly change a complex regex you need not only to know the syntax, but to run its whole functioning in your head. I'm sure you can do that. I'm sure I can too. But it remains a complete waste of my time if it could easily have been expressed more directly and clearly.

      Now the steps or parts can of course use regexes. I'm just saying "show your work". Don't leave it to me to "disassemble" your code, or it will be faster for me to reimplement if I need to change or debug something. Or for yourself too, if you return to the same code a year later.

      --
      sudo ergo sum
    140. Re:Sometimes the correct answer is the simplest by Just+Some+Guy · · Score: 1

      OK. It's just that I've worked with people who got irritated at my use of things like map() and Python's list comprehensions because they do a whole lot in a small amount of code. Maybe the key distinction is that you and I like intelligent code that works as documented, but dislike clever code that depends on side effects. Is that a fair summary?

      --
      Dewey, what part of this looks like authorities should be involved?
    141. Re:Sometimes the correct answer is the simplest by Medievalist · · Score: 1

      Yah, there are at least five ways to do it that don't involve creating a regex that nobody can debug without pulling up a man page...

    142. Re:Sometimes the correct answer is the simplest by GeneralTao · · Score: 1

      I can't argue with that.

      --
      --- Tao
    143. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      Regular expressions are by no means a perl-only feature.

      In fact. But their support in Perl is known to be a language feature since its early days. Perl 6 in particular has regular expression support that many other languages would envy. I understand that perl has been popular for that: awk, sed, grep tricks all wrapped in one package... any good?

      Possibly not the best example of why perl is shunned.

      Perl is losing the battle for a number of reasons.
      To make a long story short, it's more an evoluted software product rather than a designed computer language. (perl stands for "practical extraction and reporting language", how about that?)
      Just like Fortran, it is pointless to discuss about it without mentioning a perl version...

      Perl is simply not winning the marketing war.

      Perl has serious technical problems, which are often understood by programmers and sysadmins intuitively and/or vaguely, under terms like "readability", "ease of maintenance" etc.

      Final nail in the coffin:
      Perl does not have a Context Free Grammar parser, like many other languages have (C, Python, etc).
      In other words, there is no BNF definition of the syntactical structure of the language. Unfortunately, this isn't just a cosmetic problem.
      Read further on compiler/language design.

    144. Re:Sometimes the correct answer is the simplest by Fulcrum+of+Evil · · Score: 1

      That's fair. We're both latent lisp hackers.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    145. Re:Sometimes the correct answer is the simplest by arth1 · · Score: 1

      So your argument boils down to "perl is unmaintainable, but that's ok, because you can just replace code instead of maintaining it".

      Perl is perfectly maintainable. Replacing code with new code that does what you want is maintenance.
      Trying to change code to make it do other things than what it was written to do is not maintaining code, it's corrupting it.

      Perl follows the good old and working paradigm of Unix that everything is a set of small well-defined tools, and you should always be able to replace any one of the tools without breaking the whole. A well written perl program lets you change out a line that filters out "foo" with one that does the job better, without it impacting anything else.

      This is slashdot, so a car anology is probably in order:
      If my car tires wear out, I change my tires. I don't re-vulc them. It doesn't matter that the new tires are a different brand, as long as they follow the specs. And if a gasket no longer seals, I likewise change it. It's folly to try to patch it.
      Patching is for tinkerers who are desperate to save a buck, or with a historic interest in preserving the original.

      In the old days, spaghetti programming was when someone used too many "goto" statements, and the flow of the program jumped all over the place. These days, it's when someone makes too many interdependencies, and you no longer can replace a piece of code. Perl is in excellent language for avoiding those interdependencies, and allowing maintenance.

    146. Re:Sometimes the correct answer is the simplest by arth1 · · Score: 1

      But you have a problem.

      The specs and comments do not always match the code. Especially after a few dozen late-date revisions to fix bugs.

      That's even more reason to replace it with well documented code, wouldn't you say?

    147. Re:Sometimes the correct answer is the simplest by arth1 · · Score: 1

      This has to be the single most retarded thing ever to be said in the context of software development.

      When you disingeniously snip the qualifier "You have to understand how to write it.", yeah.

      If you read code like you read posts, your reading "skills" will lead you into trouble, especially with languages like perl, where qualifiers don't have to precede statements, but can follow them.

      launch_missile($target)
              if $target->ID eq 'foe';

    148. Re:Sometimes the correct answer is the simplest by fforw · · Score: 1

      Just for fun I wrote the script below with the bbb line being indented with spacetabs:

      #!/usr/bin/env python
      def kaputt():
          print "aaa"
          print "bbb"
          print "ccc"

      when I ran the thing the result was:

        File "./test.py", line 5
          print "bbb"
                    ^
      IndentationError: unindent does not match any outer indentation level

      strange that it took you 2 hours two figure that out..

      --
      while (!asleep()) sheep++
    149. Re:Sometimes the correct answer is the simplest by fforw · · Score: 1

      http://xkcd.com/353/

      I love this even more.. (especially teh title ;)

      --
      while (!asleep()) sheep++
    150. Re:Sometimes the correct answer is the simplest by Anonymous Coward · · Score: 0

      To be fair, the original Java version:

      • uses English for the numbers as opposed to using digits
      • tries to model the functionality in terms of objects rather than simply get a particular output
      • uses threading to try to provide the lyrics at a pace for a sing-a-long, from what I gather

        I don't think the original is good code or good OOD but, besides that, it's simply a different beast than the shorter version. The latter is written for the task at hand and lacks some features in presentation, while the former has those features and was intended to be written for reuse in other situations. While the OO one wasn't written well, I don't begrudge much of its length because a better-written OO one with similar features (and ability for parts to be reused) would still be closer in length to it than to the shorter one.

      If the intent of the exercise is simply to get one particular output and have no concern for possible future needs, using elaborate OOD is completely unnecessary. If the intent is to model the components involved in the song literally (e.g., bottles, the bar, drinkers, singers) and allow flexibility in those models, then certainly OOD is going to be better than something that simply outputs the text in as few lines as possible.

  12. Face it, Perl IS hard by Pecisk · · Score: 3, Insightful

    Setting aside obvious reasons why corporate hats would hate anything they don't dig (tip: it is matter of control. Yes, they want to have possibility to fire you any moment without hesitation), Perl is powerful, but really hard language. Specially when it is written in hurry to complete some task. Without any shred of doc or help it is almost impossible to maintain for thirty party.

    Also, in broader picture, it is common problem with IT everywhere - nondocumented stuff which does system critical stuff is big no no. I know, lot of people see it as job security, but it is the same variation as terrorist has job security when it has hostages.

    If you want real job security, do your job properly, and you will get rewarded. And if there will be firings, they will happen in any case.

    --
    user@ubuntubox:~$ stfu This server is going down for shutdown NOW!
    1. Re:Face it, Perl IS hard by Iftekhar25 · · Score: 1

      To say Perl is hard is a bit much. Actually... I'd say it's just plain wrong. I'd say it's really easy. In fact, most people say it's *too* easy. In fact, some of the things Perl does are just... so stupid it's a miracle nobody ever thought of them before.

      Really tell me, why does the if statement need to be at the head of a code block, and this must be adhered to even if the world comes crumbling down? In Perl it can be put at the end of a statement, e.g., do_this() if (TRUE);

      At first glance it's cumbersome, but the language is thinking like the brain thinks. I think we're just used to the *really* "hard" languages, and have trouble wrapping our heads around a language that is actually, when it comes down to it... very easy!

      Every heard of the Perl Self-Answering Questions? Too easy, man. Not too hard. Too easy.

    2. Re:Face it, Perl IS hard by mckyj57 · · Score: 1

      The problem is not that Perl is hard. In fact, at it's easy level, it is so easy that real tyros write code in it.

      It empowers tyros to do things they couldn't begin to do in most languages.

      I am author of a 12-year-old open source product written in Perl. It has contributions from hundreds of people, with substantial contributions from scores. I don't believe I would have received nearly that many had it been written in C. I might have gotten that many or more if it was in PHP, but they never could have been trusted for use because of security.

      The person who said Perl lost the marketing war is correct, but one of the biggest problems with Perl at the corporate level is technical. It is not signal-safe. That is a big problem when writing code which interacts with system libraries.

  13. Re:Perl IS /your/ the problem by Anonymous Coward · · Score: 0

    If you can't write proper code with Perl, I'm really sorry, but it's your problem.

  14. Why Corp. hate Perl? by Manip · · Score: 4, Insightful

    Hmm let me think:
    - Few Perl Developers
    - Difficult (or impossible) to maintain
    - There are better alternatives
    - Easy to write badly difficult to write well (e.g. Language doesn't lend its self to good practices)

    Perl is a dying language and frankly it is easy to see why. The real question is what does Perl do better than the competition other than being older than my Dad and having a bunch of essentially pointless libraries?

    1. Re:Why Corp. hate Perl? by pakar · · Score: 2, Funny

      - Few Perl Developers
      Disagree. Lots of people are using it to do small fixes or administrative stuff like parsing logs etc.

      - Difficult (or impossible) to maintain
      NO. It's the same as any other language, it's only hard to maintain if the code is written badly and without comments.

      - There are better alternatives
      Like what? In what other language can you write a simple log-parser that creates some graph's over usages in less than 5 minutes and only requires minimal system-resources?

      - Easy to write badly difficult to write well (e.g. Language doesn't lend its self to good practices)
      It's easy to write well but it requires someone with some degree of development-skills to do so.

      Perl is easy to learn, easy to use. BUT it's too easy to get started with and that causes lots of new developers (or sysadmins with shell-scripting experience) to try it out and that can only result in lots and lots of ugly code.

    2. Re:Why Corp. hate Perl? by ggvaidya · · Score: 5, Funny

      other than being older than my Dad

      Perl 1.0 was released in 1987, four years before Python. How old is your dad - and more to the point, how old are you?

    3. Re:Why Corp. hate Perl? by A+beautiful+mind · · Score: 1

      Except of course...

      - Perl is not dying, in fact see this presentation about how well it actually does in terms of Perl jobs vs Ruby or Python.

      - Says who? I find Perl syntactically beautiful and _consistent_. Much more so than php or ruby. Python is nice, but whitespace sensitivity is a burden some people are not willing to bear.

      - While I certainly respect personal decisions as to which tool is the best for a given job, I personally would be hard presssed to find a better language for web development. That is even without talking about CPAN - because with CPAN Perl wins with a landslide.

      - It's easy to write bad code for those who don't have the willingness to learn the language basics. Or to answer you with a quote: "If you want to shoot yourself in the foot, Perl will give you ten bullets and a laser scope, then stand by and cheer you on". This doesn't mean however that the language doesn't lend itself to good practices! There are reasonable community standards that are well known to anyone even tangentially involved with Perl. Perl let's you write code that is trully messed up, but only if the programmer writing it deliberately formulates it so. If a programmer decides it's a good idea to violate all reasonable coding standards and write code in a mess of a fashion, then that's the incompetence of the programmer. True, Perl doesn't actually FORCE you to avoid that kind of behaviour, but if you don't avoid it by yourself, then you have no idea about programming anyway. Comparing this to java, I'd rather be able to tell by glancing at a programmer's code in Perl that he's no idea what he's doing than to use java like strictness where source code looks like it's from a cookie cutter and discover that a programmer is lousy based on business code. This whole "Perl is unreadable wah wah wah" is just another tired chestnut, sorry.

      While you're at it, why not just say that Apache is dieing too, based on that logic? The fact is, if you look at the Perl job market, it's booming.

      --
      It takes a man to suffer ignorance and smile
      Be yourself no matter what they say
    4. Re:Why Corp. hate Perl? by Anonymous Coward · · Score: 0

      Perl is (so far as I know) the only language that lets you do \p{Ideographic} in a regular expression.

      This is part of the spec for Unicode, not a perl extension; it's just not an implemented property in any other languages' regular expressions.

      If you have to go through mixed Chinese and English text (the English being various trademarks) and get rid of spaces between ideographic characters and leave spaces between non-ideographic characters or an ideographic character and a non-ideographic character, you really want this, because the alternative is to start specifying many numeric codepoint ranges.

      My own experience with maintaining perl is that I can generally tell what it does just fine; the problem is figuring out why it is doing that. I don't think that's generally a function of the syntax.

    5. Re:Why Corp. hate Perl? by CheeseTroll · · Score: 3, Funny

      In Internet Time, 1987 was 84 years ago.

      --
      A post a day keeps productivity at bay.
    6. Re:Why Corp. hate Perl? by ivan256 · · Score: 1

      There are tons of perl developers.

      The ease of maintenance comes through good design, not from the language.

      There are few alternatives that even match perl's capabilities. To call any of them "better" is purely subjective.

      Many languages make it easier to write bad code than good code.

      The reason Perl does poorly is the same reason that python does poorly in the corporate space (Yes, python fans. Get over it. Business types don't take your language less seriously than perl.) No marketing. If there's no trade rag telling your out-of-touch ex-engineer manager that it's awesome, he/she isn't going to want your company's software written in it.

      It cracks me up when developers think their language holy wars have impact on business decisions about which language to use.

      And yes, I'm a bitter ex-perl developer who recently had to port a mature, well documented, high performance, easy to maintain perl application to Groovy where the syntax is more cumbersome, maintenance is complicated by a lack of stability in the syntax of the language itself (it's new, and changing), and we're bitten just as often by bugs in the interpreter as we are by our own bugs in the code. But some trade rag told our CTO that it was the next big thing, and perl is obviously old and crufty, right?

    7. Re:Why Corp. hate Perl? by jjn1056 · · Score: 2, Insightful

      People have been saying Perl's dying since 1999, almost ten years but I still get lots of recruiters calling me. Not sure what to say except:

      http://lui.arbingersys.com/

      which shows Perl ahead of all scripting languages except PHP, which has been the case for many, many years already. The numbers I see are pretty stable. Ruby had a bump last years when RoR was the new hotness, but it's back down to a more expected growth curve.

      --
      Peace, or Not?
    8. Re:Why Corp. hate Perl? by ignavus · · Score: 2, Interesting

      Perl is dying because Perl 6 is taking as long as "Duke Nukem Forever" to be released.

      There are more choices in scripting languages now than there were back when Perl 5 came out: PHP, python, Ruby, ...

      --
      I am anarch of all I survey.
    9. Re:Why Corp. hate Perl? by Anonymous Coward · · Score: 0

      Perl is dying because Perl 6 is taking as long as "Duke Nukem Forever" to be released.

      There are more choices in scripting languages now than there were back when Perl 5 came out: PHP, python, Ruby, ...

      Duke Nukem Forever is being written in Perl 6, you ignorant clod!

  15. Perl too readable by QX-Mat · · Score: 4, Interesting

    People keep telling me that Perl is less readable than other languages, but i disagree. It's only less readable when you dont know the language specific semantics used - surely everyone remembers when they saw floor((float)i + 0.5) in C for the first time? It's no different to a perl programmer who uses @array = map { s/something/better/g } @data;

    While I must admit that if you code in perl like a one-liner guru, you're not going to make particularly managable code but not coding in perl has significient RAD drawbacks. In Perl I worry about one thing: variable tainting. In C and C++ I have to worry about tainted variables, constant index-off-by-one errors, the possibility of null pointers and null reference handling, libraries and linking.

    Some Perl programmers could do with more non perl experience to make their style managable. Perl 5 oop is a joke, and perl 6 is trollbait - but these aren't reasons why programmers shouldn't apply wider programming skills as a C/Jaava programmer uses their ADT knowledge and skill between langages.

    Matt

    1. Re:Perl too readable by Bryan+Ischo · · Score: 4, Insightful

      I respectfully disagree. Which languages are easier to read and which ones are harder is of course obviously subjective. So maybe for YOU perl is easy to read. However, I myself have never, ever read or written (or written and then later read) perl code that was easy to read. There are lots and lots of very very small symbols which have very large effects on Perl code. Single characters can completely change the meaning of statements in perl. Sure that's true in many languages, but perl takes this problem to a whole new level.

      Perl will die if people in general find it to be too troublesome to write and maintain. I personally have been in that camp for years and years. This article suggests that this is a global trend, and I say, good riddance.

      C++ and perl are such different languages, that it's not really useful to compare them. They live in completely different parts of the programming language space. So it's not very useful for me to say that I find it much easier to write maintainable C++ code than perl code, even though it's true.

      One thing that really disappoints me about C++ is the direction that it's been heading for the past 5 or 6 years - "template programming". In fact it's about as bad as perl in terms of readability and maintainability, but much worse for debuggability. I can't think of any programming "language" worse than C++ template programming. I stay away from Boost and really hate what it's doing to C++.

    2. Re:Perl too readable by fishbowl · · Score: 1

      >C++ and perl are such different languages, that it's not really useful to compare them.

      Off-topic, but I say this about C and C++ also.

      And I've said it for years, maybe for decades, I can't remember. And over the years, having written much in these languages,
      even implemented parsers and compilers for each, I say it even more vociferously. I *hate* seeing the expression "C/C++", it makes me cringe, and throw up a little to see that.

      --
      -fb Everything not expressly forbidden is now mandatory.
    3. Re:Perl too readable by Anonymous Coward · · Score: 1, Funny

      I totally agree in general, but your example is bullshit.

        @array = map { s/something/better/g } @data;

      actually modifies the values in @data, and the result array contains the number of substitutions for each array item. Is that what you had in mind? ;-)

    4. Re:Perl too readable by Rakshasa+Taisab · · Score: 1

      If you want to create purely generic libraries in C++, it's hairy... But as a _USER_ of those libraries, the templates are not that bad (and actually really neat imo).

      The real problem has been bad error checking, but this is being corrected with the 'concepts' part of c++0x. (which seem likely to be released in '09) Once a template library has converted, it will catch type error's, etc, at a sane place and produce humanly readable error messages.

      --
      - These characters were randomly selected.
    5. Re:Perl too readable by Anonymous Coward · · Score: 0

      While my co-workers and me usually disagree on many things (vim vs emacs or whatever, tabs vs spaces for indentation, sed vs awk etc.), there is a common idea that Perl is a "WORN" language (Write Once, Read Never).

      The fact is that Perl has been invented by linguists and not by computer scientists, so it has the same flaws as some Latin derivative human languages like Italian: there are too many ways to express the same sentence.

      Only mythological half-poet half-programmer chimeras can express themselves fluently in Perl, while we common mortals continue speaking C, Python, bash in everyday life, because we don't like lexical ambiguities.

      Great respect for Perl programmers, but I stay with strict syntax rules.

    6. Re:Perl too readable by Simon · · Score: 1

      People keep telling me that Perl is less readable than other languages, but i disagree. It's only less readable when you dont know the language specific semantics used

      And that is the problem with Perl. The syntax and semantics in Perl are so big and cryptic that you have to work full time and deliberately study to climb the syntax and semantics learning curve. Once you climb up the curve you need to remain in constant practice to stay there. All this stuff in the base language is simply not memorable and relies too much on implicit behaviour. And to add insult to injury, the simple programming techniques like passing arguments to a function, or defining classes are not directly supported like in practically every other language.

      Every other language designer aims at keeping the core language as small and simple as practical and letting extra functionality be built up in libraries where it can be exposed using meaningful English (or whatever) names which actually aid the reader in understanding what it does. Perl tries to stuff everything into the core language and expose it using cryptic symbols.

      --

      Simon

    7. Re:Perl too readable by Anonymous Coward · · Score: 0

      Debuggability ? Even compiling template based code can be pain in the ass. Templates were invented to allow c++ compilers beat record for longest single line error message.

    8. Re:Perl too readable by ultrabot · · Score: 2, Interesting

      I can't think of any programming "language" worse than C++ template programming. I stay away from Boost and really hate what it's doing to C++.

      Actually, templates provide a sense of "duck typing" familiar from Python and the likes, but with static linkage and native code performance.

      Templates enable quite a lot of things that would look quite awkward without them, and perform terribly. Basically, you rarely need to create your own templated classes - they mostly reside on the "library" side of the application, so most of the time you are not really writing new templates, you are just instantiating them.

      I have spent a lot of my programming career programming in C++ without templates (because the platform discouraged their use) - but now, when I'm working on a project that encourages the use of templates, it's a hoot.

      Regarding the original topic - I thought everybody, not just the corporates, hate perl. Wake up and smell the python...

      --
      Save your wrists today - switch to Dvorak
    9. Re:Perl too readable by Corunet · · Score: 1

      In Perl I worry about one thing: variable tainting.

      And what's the problem using perlTaint mode? (#!/usr/bin/perl -T)

    10. Re:Perl too readable by VVelox · · Score: 2, Insightful

      You are making the common ignorant statement made by many people and are assuming that Perl is all regex.

      I've actually have written many Perl programs that make no use of regex.

      If you are ever writing stuff you don't understand later, what it means is your skills as a programmer as severely in question. That is what comments are for. In fact Perl makes documentation a breeze with POD.

    11. Re:Perl too readable by Anonymous Coward · · Score: 0

      Yes, we know what templates do, C++ just has a particularly horrible implementation, on par with the rest of the language that isn't C or rudimentary method functionality.

    12. Re:Perl too readable by ivan256 · · Score: 1

      It's so easy to write readable code in perl.... I don't understand why some developers insist on doing things in obfuscated ways.

      In some software I recently worked on, I handed off some bogs to another developer who replaced code like:

      if ($var =~ /expression/) {
                    stuff();
      }

      with

      $var =~ s/expression/stuff()/e;

      Now, I like perl, and I think it's the right tool for many jobs, but shit like that pisses me off. It's less readable. It's less efficient.... They only thing it's got going for it is that it fits on one line, but it's not readily obvious what the intent of the code is. (Is the side effect of overwriting the matched bit of string with the return value of the operation important to the function of the program?) Plus to make matters worse, it gives perl a bad rep.

    13. Re:Perl too readable by Anonymous Coward · · Score: 0

      Whether or not a program written in language X is readable to a developer not skilled in that language is utterly irrelevant.

      I don't understand Chinese, but that doesn't mean Chinese is (nessecerily) a bad or difficult to learn language, compared to say, German which I can recognise the odd word and see how the sentence structure relates to English.

      C++ is easy to read, but there are lots of little nuances and idioms that a non-C++ programmer might miss or fail to understand, even though that programmer could happily modify the code and produce something that appears to work.

      Single characters can change the meaning of a statement in just about any language. Hell, in C++ you can change the very meaning of the basic arithmatic operators. There are so many common, basic mistakes that beginner programmers make in C++, that entire books have been written on the subject.

      On balance, I find that - in a corperate/business environment - modern(ish) Perl programs are pretty well written.

      I'm a C++ programmer too, FWIW.

    14. Re:Perl too readable by Anonymous Coward · · Score: 0

      And that is the problem with Perl. The syntax and semantics in Perl are so big and cryptic that you have to work full time and deliberately study to climb the syntax and semantics learning curve.

      Sorry - but this is an absurd argument. Having to learn something makes it bad?

      Every other language designer aims at keeping the core language as small and simple as practical and letting extra functionality be built up in libraries where it can be exposed using meaningful English (or whatever) names which actually aid the reader in understanding what it does. Perl tries to stuff everything into the core language and expose it using cryptic symbols.

      This is utter rubbish. The core of Perl is very small; in fact this is one of the greatest things about the language. It is extremely modular.

      The special one-character variables are simple syntactic shortcuts, and change little facets of functionality. If you can't be bothered to learn a language, do the rest of us a favour and stop whining about the fact you can't understand it.

    15. Re:Perl too readable by Anonymous Coward · · Score: 0

      Granted. Template programming doesn't have a beautiful syntax.

      But templates have a necessary use: create flexible data structures without prior knowledge of your classes and without forcing a polimorphic inheritance tree on them. These are big barriers that templates address.

      Not to mention that templates transparently dissapear on compilation time instead of requiring dynamic castings and tests all the time. They are more type-safe too. Hell, even Java gave up and ADDED the same sintax.

      Good luck creating a generic Linked List without them.

  16. "Hate" isn't the right word. by jjgm · · Score: 5, Insightful

    The problem is, Perl is just a programming language, not a conceptual system. Arguably it is the antithesis of a conceptual system. Many teams then create their own application frameworks atop it (e.g. Mason, POE), and it's rare for these frameworks to be compatible since Perl offers so many variations in the construction of even standard programming artifacts like classes & objects.

    In addition, the level of expression (i.e. TMTOWTDI) means in practice that highly varying programming styles occur throughout large, long-lived bodies of code.

    As a result, significant Perl-based business applications tend to become hard-to-maintain hairballs of divergent style and subtly variegated concept.

    The root cause: as I started with; the absence of a standard conceptual framework for Perl means that during the early phases of a project, it's much harder to reason meaningfully about the eventual form of the system than it is with, say, Java or .NET where many of the design patterns are explicitly standardised.

    I wouldn't say that "Corporates Hate Perl". It's just the Perl as an application language doesn't suit the formal design & architecture process we're seeing increasingly as IT departments start to grow up and realise that they're not the most important people in the company.

    That doesn't disqualify Perl from being a useful tool, and it'll always have a place in data transformation, but it does mean that Perl isn't going to be one of the general-purpose application programming languages of the future.

    1. Re:"Hate" isn't the right word. by Meshugga · · Score: 1

      i wouldn't have written my post if i read yours first... it is more diplomatic too ;)

      seconded.

    2. Re:"Hate" isn't the right word. by Anonymous Coward · · Score: 0

      You hit the nail right on the head.

      In my Post on Perlmonks I point this out as well.

      I think that if there were some more support behind an end-to-end Perl development stack we would see more respect for Perl from "Corporates."

    3. Re:"Hate" isn't the right word. by Anonymous Coward · · Score: 0

      I wouldn't say that "Corporates Hate Perl". It's just the Perl as an application language doesn't suit the formal design & architecture process we're seeing increasingly as IT departments start to grow up and realise that they're not the most important people in the company.

      Corporate hates program because how many corporates know 1) how to program and 2) how to structure it minus the politics? I would say this is true of any language, C, C++, Perl, Python, Ruby on the rails or not...VB, VC, Java permutations --

      If you want to sell it to I/T corporate you need to understand the KISS rule.

    4. Re:"Hate" isn't the right word. by Foople · · Score: 1

      Perl allows the user to create multiple programs all with different conceptual systems without the complexity of using different languages. The problem, as you point out, is there is no way to enforce a single conceptual system within a program, and having the conceptual system change midway is jarring. Perhaps what perl needs is a way to specify a specific conceptual system/style/language subset for a given file/program. Corporate users would simply choose a very restrictive, but easy to maintain language subset for large projects, while allowing freer use of the language in quick one-line utility scripts.

    5. Re:"Hate" isn't the right word. by Krishnoid · · Score: 1

      In addition, the level of expression (i.e. TMTOWTDI) means in practice that highly varying programming styles occur throughout large, long-lived bodies of code. As a result, significant Perl-based business applications tend to become hard-to-maintain hairballs of divergent style and subtly variegated concept.

      Very true ... which is why Perl::Critic was created. While I suspect this isn't available for other languages, perl's flexibility in this case provides both the problem and a solution.

  17. Software or line noise? by Anonymous Coward · · Score: 1, Insightful

    Corporations hate perl because it takes too much restraint to write maintainable programs in it. You can totally write beautiful systems in perl, but face it there are simply too many ways to skin the same cat syntax-wise and "clever" programmers seem to gravitate to the syntax and language constructs which are least readable. Yes I understand you can write hard to read programs in any language, my point is that perl seems to make it easy.

    People who don't work with perl all the time don't want to open up a code base after some time and spend a pile of time researching WTF $_#&->!] means again.

    No I'm not talking about regexps, and that wasn't meant to be real perl.

  18. For goodness sake, move on. by PinkyDead · · Score: 5, Funny

    You have to migrate your badly written and hard-to-maintain Perl code into badly written and hard-to-maintain Java code as soon as possible.

    --
    Genesis 1:32 And God typed :wq!
    1. Re:For goodness sake, move on. by Anonymous Coward · · Score: 0

      You have to migrate your badly written and hard-to-maintain Perl code into badly written and hard-to-maintain Java code as soon as possible.

      The company he is talking about (the BBC) will do exactly that.

      There is a lot of people making design decisions in the BBC who don't even know the basics of good software design.

      With that kind of structure in place, getting any good software created is unlikely, no matter language is used.

    2. Re:For goodness sake, move on. by Anonymous Coward · · Score: 0

      only the usual non- static trained "programmer" makes such an idiotic statement as usual.

    3. Re:For goodness sake, move on. by syousef · · Score: 1

      You have to migrate your badly written and hard-to-maintain Perl code into badly written and hard-to-maintain Java code as soon as possible.

      That comment is priceless. I should frame it. Thank you.

      --
      These posts express my own personal views, not those of my employer
  19. This isn't just about "new and shiny" by wyldeone · · Score: 3, Insightful

    While it's possible to write readable code in any language (well, maybe not Brainfuck), and just as possible to write horrible spaghetti code in the same, Perl does not encourage clean, readable code like python or ruby (my preference.) As a result, nearly all of the perl code I've seen has been virtually indecipherable to anybody not a perl veteran. More modern scripting languages like ruby and python not only have "syntactical sugar" that allows complexities to be expressed more simply (and therefore, more readably) but in general discourage things like the perl super variables that radically decrease readability. Additionally, their object-oriented structure allows for more clear code organization, making 100,000+ line programs possible to understand (look at rails, for example; hundreds of thousands of lines of code, but readable for someone without great knowledge of the codebase).

    --
    In the beginning the universe was created. This made a lot of people very angry and is widely considered as a bad move.
    1. Re:This isn't just about "new and shiny" by etresoft · · Score: 1

      Additionally, their object-oriented structure allows for more clear code organization, making 100,000+ line programs possible to understand (look at rails, for example; hundreds of thousands of lines of code, but readable for someone without great knowledge of the codebase).

      Per has been object-oriented for how many years now? But you have one valid point. No one has ever complained that 100,000+ line Perl programs are impossible to understand.

    2. Re:This isn't just about "new and shiny" by outZider · · Score: 2, Insightful

      Python, I can agree with, but Ruby? It effectively looks the same as Perl when it's all said and done. It encourages the same use of odd characters, shortcuts, whitespace issues, and poorly managed namespaces that Perl does.

      Disclaimer: I'm a Perl developer.

      --
      - oZ
      // i am here.
    3. Re:This isn't just about "new and shiny" by otomo_1001 · · Score: 1

      Umm, ruby doesn't look like perl at all. If you think it does the programmer/you/etc... are using the old perl anachronisms that you aren't encouraged to. Stop that and use the readable versions. $_ is going to be deprecated in ruby.

      Just as an example, here is a dumb script I use to extract some podcast mp3's from rss feeds. It isn't perfect ruby, but it should highlight ruby isn't perl. Like for example a string "0123" is really a string object. It doesn't get converted into a number automagically. Ruby can, and this is only if you code it that way, look superficially "like" perl. It is nothing of the sort. Ruby just doesn't enforce whitespace rules like python. Otherwise it would appear a bit different. Rubys object system has been a lot simpler than Pythons objects growing pains in the early 2.X days.

      Also if you wanted you could use Regexp objects for your regexp matches, but things like $1 are easier. Again, this is for simplicity more so than to look like perl. Ruby retains more of perls, "There is more than one way to do it." It just tacks on, "but this way is easier than the others.". YMMV I use all 3 languages and prefer ruby myself, perl, and then python. So those are my biases.

      My stupid script just for kicks, I wrote it before gems and updated it very little. Most of it was grabbed from a tutorial for rss stuff, so it is pretty hackish. I find ruby much more readable than perl, and I also think that it encourages better style than perl does. Maybe not in the heavy handedness python does, but I prefer flexible whitespace rules at times.


      #!/usr/bin/env ruby
      require 'rubygems'
      require 'rss'
      require 'open-uri'

      rss_feed = ARGV[0].to_s || exit # die if nothing given
      match_string = ARGV[1].to_s || '.*' # match all if nothing provided
      save_to = ARGV[2].to_s || '/tmp' # save to /tmp
      rss_content = ""
      open(rss_feed) do |f|
          rss_content = f.read
      end
      rss = RSS::Parser.parse(rss_content, false)

      puts "Title: #{rss.channel.title}"
      puts "RSS URL: #{rss.channel.link}"
      puts "Total entries: #{rss.items.size}"

      rss.items.each do |item|
          if item.title.to_s =~ /#{match_string}/ then
              puts "Found link:'#{item.link}'"
              puts "Titled: #{item.title}"
              puts "Published on: #{item.date}"
              puts "Rss description: #{item.description}"
              fname = "#{save_to}/#{item.title}.rssfile"
              puts "Saving to file: #{fname}"
              uri = URI.parse(item.link)
              content = uri.open.read
              f = File.new(fname, "w+")
              f.write(content)
              f.close
          end
      end

    4. Re:This isn't just about "new and shiny" by Anonymous Coward · · Score: 0

      Ruby? More readable than Perl? It sounds like you simply never bothered to learn Perl. With my minimal Ruby knowledge, it looks like a complete mess to me. All of those things people say about Perl -- "explosion in the punctuation factory", etc. -- are a perfect description of Ruby for me.

  20. This is an insult by Skapare · · Score: 4, Funny

    This is an insult to associate us Perl-Haters with corporate types.

    --
    now we need to go OSS in diesel cars
    1. Re:This is an insult by Hal_Porter · · Score: 1

      Yeah, I hate Perl and corporate types too.

      Come to think of it, I'm not also hate people that hate Perl or corporate types. And I hate people who hate people that hate

      STACK OVERFLOW

      --
      echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
    2. Re:This is an insult by gringer · · Score: 1

      Perl is untyped*. There are no corporate types.

      * well, okay, there's scalars, arrays, etc. but the scalars aren't broken down further.

      --
      Ask me about repetitive DNA
    3. Re:This is an insult by ignavus · · Score: 1

      It's alright.

      Corporate types only hate Perl in a superficial sneering way. They don't understand what is really wrong with it, they just know that it is out of fashion.

      True Perl-Haters (TM) hate Perl with a deep visceral hatred bred of traumatic experience of its most evil features. They don't just think it is evil, They Know It Is Evil (TM).

      Corporate types are mere dilettantes. Perl-Haters are the connoisseurs.

      --
      I am anarch of all I survey.
  21. Management by Pvt_Ryan · · Score: 1

    Management are blaming Perl for the problems when really they should be blaming the management and design procedures that were in place (or, more likely, werenâ(TM)t in place) when the code was originally written.

    I think this is the key paragraph. Everyone knows that management can't blame management that would imply they were in the wrong

  22. You have to deal with reality by Chuck+Chunder · · Score: 1

    But I maintain that this isn't directly due to the code being written in Perl. Its because the Perl code has developed piecemeal over the last ten or so years in an environment where there was no design authority.

    The latter may be true but you have to realise that it probably always will be.

    You can dream of an improved development environment, you can even take steps towards one, however the simple fact is that in 99% of the situations there are real development pressures that make "piecemeal development", inadequate attention to design, poor attention to coding standards and countless other problems an inevitability.

    Once you accept that sad reality the decision to avoid Perl for something less impenetrable makes sense.

    Perl may not be the cause of the problem but it can certainly compound it.

    --
    Boffoonery - downloadable Comedy Benefit for Bletchley Park
  23. Nothing wrong with PERL by Anonymous Coward · · Score: 0

    There is absolutely _NOTHING_ wrong with perl, and compared to shell scripts it is natively cleaner.

    You can write good, and bad programs in any language, which is why academic language development, eg Worth, has been such a waste of time. Perl, in contrast, was designed by a group of exceptionally capable programmers and mostly does the right thing by default.

    Like any language, perl can be mis-used but so can C++, Java and Python. Indeed the more complicated the language, frame-work or toolkits become the more they are prone to mis-use and the more duct tape eg design patterns aka example/template solutions seem to be required to get anything done. The extream of this is where the language/framework requires so much boilerplate code that you need an IDE to generate it. Think Java J2EE.

    1. Re:Nothing wrong with PERL by holloway · · Score: 1

      There is absolutely _NOTHING_ wrong with perl, and compared to shell scripts it is natively cleaner.

      Thanks, I needed a laugh.

  24. dynamic Lang by Anonymous Coward · · Score: 0

    Any dynamic language faces this problem . They're good for glueing apps or writing quick scripts, but for enterprise applications of any significant size it's kind of a joke to have something in php or perl, ruby. For small web 2.0 or text prcessing web sites I can the benefit on the small scale, but...the dangers of dynamic lanuages when you're sharing code in an enterprise, particularly doing calculations, is just too great.

    1. Re:dynamic Lang by fishbowl · · Score: 2, Informative

      I worked in a shop that replaced a really complicated process that had been written in COBOL, with
      a really efficient, compact, regex-based, DBI-enabled perl program. I'll let you explain to them
      why that's inappropriate for their enterprise scope... :-)

      --
      -fb Everything not expressly forbidden is now mandatory.
    2. Re:dynamic Lang by Anonymous Coward · · Score: 0

      oh ok that settles it then. LOL. What was the process and had you ever even done a statically typed enterprise app before? This website is so full of comical just out of college script kiddies who like the laid back easy programming style compared to the rigorous statically typed development because they've never done it beyond small scale apps. Anyone who has trully worked with both statically and dynamic languages in a enterprise environment knows that dynamic languages certainly have their place for small scale or text processing scripts, but hardly for enterpise apps where the logic needs to be stringent. Dynamic is just too loosey goosey, static is far more satsfyingly logical.

  25. Writing bad code by Phroggy · · Score: 4, Interesting

    As many others have pointed out, you can write bad code in any language. Perl makes it very easy to write terrible code, just as Perl makes it very easy to write just about anything else. There are other languages that place obstacles between you and the bad code you're trying to write - for example, Python won't let you not indent correctly, and Java won't let you not use OOP.

    When coding large applications, it is critical that certain coding standards are followed. Everybody has to play by the rules, and do things in a standardized way. Perl doesn't impose any of these rules for you automatically. If you choose not to self-impose any rules, your code will wind up being an unmaintainable mess. But no language can save you from that - if you write terrible code in Python, it's guaranteed to be nicely indented, but that doesn't mean it'll be maintainable. And, if you want to self-impose some rules to help keep your code clean, Perl Best Practices will point you in the right direction.

    I highly recommend The Daily WTF?. Perl does NOT get a disproportionally large representation there.

    --
    $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
    $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
    1. Re:Writing bad code by evil_aar0n · · Score: 1

      Thank you for so sensibly pointing this out. Well done.
      If I had mod points...

      --
      Truth, Justice. Or the American Way.
    2. Re:Writing bad code by Anonymous Coward · · Score: 0

      Hardly scientific. As munch117 points out, WTFs in perl are a lot less newsworthy than similar mistakes in other languages, because with the other languages it seems like the perpetrator at least had to try.

      Perl is not be favored corporate-ly because it makes it far far too easy to write unmaintainable crap.

      Sure, perl has strengths, but in all the wrong places for "corporate" development. Sure, a phillips-head screwdriver can be irreplacable and extremely useful in certain tasks... but building a suspension bridge will still be done with welded joins and rivets!

    3. Re:Writing bad code by Jim+Hall · · Score: 1

      As many others have pointed out, you can write bad code in any language. Perl makes it very easy to write terrible code [...]

      I'll start this out with a disclaimer: I write and maintain some perl code, but not as part of my work.

      One thing that really annoys me about perl is that there are so many different ways to do the same thing. It makes code unnecessarily difficult to read. I believe the following statements are all the same in perl: (Assume $debug is expected to hold a value of 0 or 1.)

      1. if ($debug == 1) { print "foo\n"; }
      2. unless ($debug == 0 ) { print "foo\n"; }
      3. print "foo\n" if $debug == 1;
      4. print "foo\n" unless $debug == 0;
      5. ($debug == 1) && print "foo\n";

      The whole point with unless is that it is the same as writing a negated if statement. I think I'd rather have the negated if. But my real bane is the tail-if and tail-unless. I guess I'm old and stodgy (at age 36) but to me, a programming language is much better when the rules are more strictly enforced. Pick one of the 5 methods, not all of them. Although I guess I'm ok with #5 since it is mimicking sh scripting behavior.

    4. Re:Writing bad code by Geoff-with-a-G · · Score: 2, Insightful

      When coding large applications, it is critical that certain coding standards are followed.

      I wholeheartedly agree with your post, but this is where the point gets missed. Perl, along with MS Access and VB, is responsible for some huge, nasty, unmaintainable systems that nonetheless are entrusted with critical functions in large companies. This is not because they are bad platforms. You touch on it by saying that "Perl makes it very easy to write terrible code, just as Perl makes it very easy to write just about anything else."

      Almost every large system started out as a small system, just as almost every large company started out as a small company. When you're a 50 man company, with a single network engineer, you don't need (and can't afford) an Enterprise IP Address Management Solution, but your engineer does need a way to manage or track addresses. So he discovers, that as a non-programmer, having never even heard of most programming best practices he is able to throw together some tools with Perl/VB/Access in a couple days. These tools work 95% of the time, and make it vastly easier for him to do his job. Some important things to realize:

      1. He would never have built these tools if his only option was to set up J2EE and follow coding best practices with source control.
      2. He is better off having built these tools than not having them.
      3. Any "real" programmer will scoff at his tools and say they are horribly written amateur code, and the programmer will be correct, but irrelevant.

      With luck, the business grows, and so do these tools/systems. Features get added. Staff gets added. Scope increases. It turns into a nasty homegrown kludge monstrosity, any starts having problems. Often around the same time that "works 95% of the time" is no longer an acceptable standard. Management will start to roll their eyes and call it a "legacy system" and suggest that HPCs come in to build a proper (aka expensive) version, or purchase some sort of industry standard version of the system and adapt that. They will usually be correct.

      It's important to understand that nobody is stupid here, and none of these tools are bad. This is just a natural evolution and you'll see this story play out over and over again.

      1. Easily accessible platforms like Perl, VB, and Access enable non-programmers (whether it's a network engineer like my example, or a PM, or accountant, or security auditor, etc) to create very useful tools that improve their productivity.
      2. If those tools work, and the company prospers, it is natural for them to expand.
      3. At some point, that expansion will scale past its proper limits and become unmaintainable, especially if its admins move on, or it starts having to integrate with other systems.
      4. The right thing at this point is to replace it with a more scalable system, or at least have professional coders drastically overhaul the original system, but this does not mean the original was a bad idea or a bad system or a bad platform. It served its purpose very well.

    5. Re:Writing bad code by synthespian · · Score: 2, Insightful

      One of the tenets in Perl's design was to keep it somehow like a human language.

      Now, consider the snippets you submitted. I will argue that the variability makes it easy to remember the code. Why? Because you are basically retaining the functionality of the code. That is to say, do people remember code per se or do they remember the functionality of the code? They remember the functionality of the code.

      Now, I have no empirical data to support this - and this is one aspect of programming that I find deeply aggravating, i.e., nobody seems to research the human factor, the psychological factor. There's very little empirical data and there's just too much opinion. It fucking looks like the social sciences, sometimes.

      But if we look at some surrounding evidence, mathematical writing, we will see that there's not a single book where Mathematics itself was not described in a human language. There's no book with Theorem/Proof Theorem/Proof/Corollary, etc. ad infinitum without a written descripition of the Mathematics.

      Of course, as you mature, you move towards heavy notation. Likewise, in Perl, as you progress you move to operators, etc, to the point where sigils abstract very nicely what you want to say (contexts in Perl are important).

      To say it differently, there cannot be pure Logos.

      --
      Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
    6. Re:Writing bad code by Phroggy · · Score: 2, Informative

      Pick one of the 5 methods, not all of them. Although I guess I'm ok with #5 since it is mimicking sh scripting behavior.

      Funny, that's the first one I'd avoid.

      You're right that there are at least five different ways to do this, but it should be fairly obvious which way makes the most sense in a given situation. For starters, since it looks like $debug is going to be a boolean value, you don't have to compare it to 1 or 0 at all, so that eliminates two of your options (the ones that compare to 0). Writing a conditional that doesn't look like a conditional is probably not a great idea, so we can scratch #5. That leaves is with only two options:

      • if($debug) { print "foo\n"; }
      • print "foo\n" if $debug;

      So which of these is the best? Well, syntax #1 is designed for multi-line blocks, while syntax #2 only allows single statements. If you're only going to be using single statements this way, #2 might be best; if you're going to be putting multiple print lines in your conditional block, then it's probably best to use #1 every time, even when you use a single-line block (in which case you should probably NOT write the whole thing on one line like this example, but go ahead and put the print statement indented on the next line).

      The other consideration is, syntax #1 puts the emphasis on the condition: if we're in debug mode then stop and take a break from the normal flow of our code so we can step off to the side and print "foo" before getting back to what we were doing. Syntax #2 puts the emphasis on the print statement (which may be mixed with several other print statements), with the conditional added as an afterthought.

      Some coders will pick option #2 every time, simply because it requires typing slightly fewer characters. I've been guilty of this myself, but if the idea you're trying to express doesn't lend itself to that syntax, it's better not to use it.

      Perl is about the expression of ideas in code. What's the best way to express your ideas? There are many different ways to express an idea when talking to someone, but with practice we learn how to choose the way that will help us communicate most clearly. Perl isn't much different.

      --
      $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
      $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
    7. Re:Writing bad code by Phroggy · · Score: 1

      Of course you're right, and you've hit upon a very important point as well: if they hadn't done it in Perl (or VB or Access), they wouldn't have done it at all. At a certain point, this kind of kludge needs to be replaced... but a Perl kludge could be replaced with properly designed Perl, rather than switching to some other language. Sometimes it might be a better option, since some of the bits of the old code that actually work 100% of the time could be directly reused instead of ported. Sometimes it might not be a good option, particularly if most of the old Perl developers have since left the company and their successors are more familiar with another language.

      --
      $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
      $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
    8. Re:Writing bad code by Jim+Hall · · Score: 1

      BTW, my preference is #1

      if ($debug == 1) { print "foo\n"; }

  26. Re:Perl IS /your/ the problem by Anonymous Coward · · Score: 0

    Re:Perl IS /your/ the problem

    Perfect example of perl syntax!

  27. Re:Perl IS /your/ the problem by iron-kurton · · Score: 1

    I think his point is that Perl doesn't encourage nor enforce good coding practices.

    [asbestos hat on]
    If you take Java for instance, _everything_ from the main method to the kitchen sink is inside objects (with very few, controlled and necessary exceptions), which conform to the OO paradigm.

    Tell me, what kind of structure does perl enforce or even encourage?

    Don't get me wrong, Perl is EXCELLENT in what it can do -- quickly manipulate large amounts of data. But it wasn't designed to do much else. Perl (like PHP) is a far, far cry from a enterprise programming language, and frankly, I'd like it to stay that way.

    [asbestos hat off]

    --
    Change is inevitable, except from a vending machine -- Robert C. Gallagher
  28. Clarity and whatnot is for retards. by tjstork · · Score: 0, Flamebait

    they're called for or not, and too little in clarity, modularity and maintainability

    I've been around the block long enough to know that what this often is an excuse for corporate environments to hold better developers back to try and force a levelling of a pay scale. If you paid developers based on their ability to produce working systems, you would find that some developers produce far more than others. But.... now we have to riddle our code with wrapped access methods, ultra long symbol names, case sensitivity and standards made by morons for morons, and all of it adds -ZERO- features to the finished product. Sure, you can argue that it makes "better" code, but that "better" code has NO MORE EXTRA FEATURES. It only allows retards to work on it. And really, is that a feature?

    --
    This is my sig.
    1. Re:Clarity and whatnot is for retards. by Lonewolf666 · · Score: 4, Insightful

      Sure, you can argue that it makes "better" code, but that "better" code has NO MORE EXTRA FEATURES. It only allows retards to work on it. And really, is that a feature?

      From a manager's point of view, yes. Because it makes it easier for the company to find someone who is capable of maintaining it once the 133t haX0r has moved on to another job.

      Besides, don't underestimate the importance of clarity and modularity in architecture. Which is not the same as "coding standards" that enforce things like naming schemes for variables. The latter is rather low-level and understandable to a PHB, the former is still more of an art and not easily measurable.

      --
      C - the footgun of programming languages
    2. Re:Clarity and whatnot is for retards. by famebait · · Score: 3, Insightful

      None of the things you mention improve clarity, modularity and maintainability.
      Well possibly wrapped accessors, but only when called for.

      What i meant was avoid clever-but-stupid shit like displaying
      how much crap you can get done with a bodyless for-loop,
      deep if-trees that might save you a superflous comparison or
      two, but take all day to read correctly and correctly implement
      a really simple change in the underlying rule.

      If you do database access, data representation, transformations
      and file output, please don't do them all all over the place.
      You don't need to amake a plugin architecture, but it really
      doesn't cost much to design a simple output module API so it might
      be switched with a completely different output engine later.
      And guess what: it will make your code clearer and better even if
      you never make that second output module.

      --
      sudo ergo sum
    3. Re:Clarity and whatnot is for retards. by encoderer · · Score: 1

      Come on... you act like using a descriptive variable name is some huge overhead that gums up the works.

      And to answer your question.. a project manager has to think in terms of TCO. Most systems live long lives. Maintenance, upgrade and troubleshooting WILL happen. And if you can spend dimes now to save dollars tomorrow, it's a wise business decision to do so.

    4. Re:Clarity and whatnot is for retards. by Dragonslicer · · Score: 1

      I've been around the block long enough to know that what this often is an excuse for corporate environments to hold better developers back to try and force a levelling of a pay scale. If you paid developers based on their ability to produce working systems, you would find that some developers produce far more than others. But.... now we have to riddle our code with wrapped access methods, ultra long symbol names, case sensitivity and standards made by morons for morons, and all of it adds -ZERO- features to the finished product. Sure, you can argue that it makes "better" code, but that "better" code has NO MORE EXTRA FEATURES. It only allows retards to work on it. And really, is that a feature?

      Spoken like someone who believes that writing unmaintainable code is the best form of job security.

    5. Re:Clarity and whatnot is for retards. by danieltdp · · Score: 1

      Those standards are enforced to all developers. Those who produce far more will continue to produce far more when compared to the others...

      --
      -- dnl
    6. Re:Clarity and whatnot is for retards. by oldhack · · Score: 1

      Spoken like a true primadonna.

      --
      Fuck systemd. Fuck Redhat. Fuck Soylent, too. Wait, scratch the last one.
  29. Re:Perl IS /your/ the problem by Anonymous Coward · · Score: 0

    It appears that you are yet another Perl fanboy who refuses to acknowledge that there really is an issue with the spaghetti code that Perl coders tend to produce. These types of situations don't occur nearly as often when using PHP or Java. It may be that Perl tends to attract the types of programmers who just like to get the application working and go home, while Java tends to attract the types of programmers that care more about architecture and maintainability. From my experience, 4 out of 5 Perl coders haven't read Design Patterns while 4 out of 5 Java coders have. It should be no surprise that Perl coders (most of which don't have a CS degree) tend to write unmaintainable code with no type of architecture in mind.

  30. It's possible to write rubbish in any language by jimicus · · Score: 4, Interesting

    Or, to put it another way, correlation is not causation.

    Perl has been around long enough (and, more to the point, was pretty much the only choice if you wanted a half-decent scripting language 10 years ago) that there's a strong chance in any business that badly-designed hard to maintain systems that have been around for 10 years or more include a fair chunk of Perl.

    That's not because of Perl, that's because they were badly done in the first place. I'm willing to bet that there's just as much code which is written in Perl and does a perfectly good job but nobody really knows about it because it's been sitting in the background doing a perfectly good job for so long.

    1. Re:It's possible to write rubbish in any language by arth1 · · Score: 2, Interesting

      That's not because of Perl, that's because they were badly done in the first place. I'm willing to bet that there's just as much code which is written in Perl and does a perfectly good job but nobody really knows about it because it's been sitting in the background doing a perfectly good job for so long.

      Until someone finds out it's written in perl, and launches a project to get it ported.

      In a company I worked for, that happened. A small perl script scanned all the web server logs, removed internal accesses, and presented a list of the most common search terms, ordered by soundex (to catch and list common misspellings).
      This worked surprisingly well, providing a service that the search engine didn't. For years.

      Until someone found out it was a (hiss! spit!) perl script, and decided that it needed to be rewritten as a managed java application, supported by the search vendor.
      Of course, the result cost about as much as a small house, needed its own server, log transfers took several hours a day, and hours of manual intervention whenever (daily) a transfer failed (like if a file was larger than 2 GB or the passwords had expired), and it could not correlate results by soundex.
      This was called a success.
      The lack of functionality in the new replacement app was blamed on, I kid you not, perl, for being inherently difficult to port to java.

    2. Re:It's possible to write rubbish in any language by Carfiend · · Score: 1

      Pretty much the case where I work. Alot of stuff written in perl including a 200 line script to rename a file and to make sure its not over writing a file with the same name and massive birds nests of code that with the zero documentation and none of the original authors still in the organisation leaving me with little choice but to start from scratch. Sure I could of waded through it all but then that would of taken as long if not longer than rewriting it myself and have to think about in the future where someone new might come in and have to go over my old code. Would rather they say "Hey this is easy to understand and read" than "hey the last guy was a total arse for not writing this so its readable and leaving any documentation!"

      --
      Uh, perhaps you can help me? I'm looking for a love-potion aerosol, that I can spray on a certain Penthouse Pet, to obta
    3. Re:It's possible to write rubbish in any language by jimicus · · Score: 1

      Pretty much the case where I work. Alot of stuff written in perl including a 200 line script to rename a file and to make sure its not over writing a file with the same name and massive birds nests of code that with the zero documentation and none of the original authors still in the organisation leaving me with little choice but to start from scratch.

      Particularly as anyone with half a brain could do that in 4 lines of bash:

      if ! [ -e ${DESTFILE} ]
      then
        mv ${SOURCEFILE} ${DESTFILE}
      fi

    4. Re:It's possible to write rubbish in any language by Anonymous Coward · · Score: 0

      You mean CPAN?

    5. Re:It's possible to write rubbish in any language by tkinnun0 · · Score: 1

      The lack of functionality in the new replacement app was blamed on, I kid you not, perl, for being inherently difficult to port to java.

      Perl's purported "write once, read never" nature would make it difficult to port to anything. If they had nobody who could maintain the original perl program then a rewrite in any language would be the only option.

    6. Re:It's possible to write rubbish in any language by Anonymous Coward · · Score: 0

      Particularly as anyone with half a brain could do that in 4 lines of bash:

      Or one line.

      mv -i ${SOURCEFILE} ${DESTFILE} </dev/null

    7. Re:It's possible to write rubbish in any language by GargamelSpaceman · · Score: 1

      Learn regular expressions. If you don't know them, you suck as a programmer, no matter what your language of choice is. It's like not being able to figure out that pesky if then else thing. For pity's sake!

      --
      ...
    8. Re:It's possible to write rubbish in any language by arth1 · · Score: 1

      If they had nobody who could maintain the original perl program then a rewrite in any language would be the only option.

      Box thinking. How about hiring someone who could maintain it (if it was at all necessary to maintain it)?

      You could have a guy come in once a month to look at it and say "OK, it works", install it on new machines as needed, pay him $100k/year plus benefits for mostly sitting in a boat fishing, and it would still be far cheaper.

    9. Re:It's possible to write rubbish in any language by *BBC*PipTigger · · Score: 1

      Pretty much the case where I work. Alot of stuff written in perl including a 200 line script to rename a file and to make sure its not over writing a file with the same name and massive birds nests of code that with the zero documentation and none of the original authors still in the organisation leaving me with little choice but to start from scratch.

      Particularly as anyone with half a brain could do that in 4 lines of bash:

      if ! [ -e ${DESTFILE} ]
      then

      mv ${SOURCEFILE} ${DESTFILE}
      fi

      Sure, && that could also be:

      user@host:~$ perl -e "`mv $ENV{'SrcFile'} $ENV{'DstFile'}` unless -e $ENV{'DstFile'}"

      ... but this might run into BINMODE issues, so it'd likely be advantageous to use File::Copy "mv" instead of backticks to shell out... && I suspect this 200-line script probably handles quite a few idiosyncratic conditions that would prove themselves critical to this organization should they be obliviously "simplified" into 4 lines (or 1 line) of bash (or perl).

      Just because vocal programmers can't easily && immediately grok the finer points of lengthy old utility code, one should not blunder to the conclusion that such code is comprised of entirely arbitrary complexity which handles no special cases of concern && should therefore be supplanted by the most trivial remedy imaginable. Working code has typically earned such designation over years, for many good reasons (even though they might be obscure to cursory glance as well as thorough delving), so let's not be too quick to revolt against proven functionality.

      To speak to the larger topic, I acknowledge that perl isn't the best choice for many programming problems && domains, but every purported weakness can readily be touted as strength from a different perspective. Many ways to do things means flexibility (which usually proves more boon than bane). Oldness && legacy also mean stability && the existence of diverse levels of fluency among professional coders, as well as extensive library availability (i.e., the CPAN). Each issue seems to slant with legitimacy either way, depending on the circumstances && objectives.

      My personal experience heavily favors perl as a monumentally expressive language which exhibits not so much a "steep" learning-curve as one which climbs to stratospheric heights. Beginner perl remains elegant && intuitive... probably still simpler than newer languages finding favor. Easy things are easy to do in perl but the language shouldn't be blamed for making hard things possible in diverse ways. Those ways that prove generally better than others find favor, but the others still winnow into exceptional niches. I find most arguments against perl boil down to: "It's too powerful to be practical, since idiots can write crap too easily && experts can write incantations that only they can maintain." If such broad power is weakness to your mind, fair enough. Go use whatever language your mind expresses better. I consider power a respectable strength, which recommends consideration, practice, experimentation, extrapolation, && concerted evolution among a community of experts. Linguistic fluency is an asset since precise description of hard problems is necessarily harder to resolve with confidence because the abstract issue must be described as spoken language, then understood logically within technological terms before any potential solution can make the trip back from abstract tech solution to more concretely feasible code, back to spoken language description... which can then be compared (again abstract mentally) against any other plausible solutions proposed. Communication among people is difficult && diverse. When we increasingly need teams of coders && other corporate interests involved in tech problems && viable programming solutions, I think simple restricti

  31. How about the right tool for the job? by MaX_3nTrOpY · · Score: 5, Insightful
    "I realized at that point that there was a huge ecological niche between the C language and Unix shells. C was good for manipulating complex things - you can call it 'manipulexity.' And the shells were good at whipping up things - what I call 'whipupitude.' But there was this big blank area where neither C nor shell were good, and that's where I aimed Perl."
    -- Larry Wall, author of Perl

    I rest my case.

    --
    My signature is in the cloud.
  32. I don't get it by RichiH · · Score: 3, Insightful

    So, you are saying that someone, who is not specified, wants to move away from some program, which is not specified and written in Perl, to a solution based on a different language, which is not specified. You then speculate that this or might not be due to the grown & evolved nature of the unspecified program.

    How is this news? What do you actually want to tell us?

    Don't get me wrong, I love Perl. I simply do not understand why you would submit this to /. or why it would get approved. I am seriously confused.

  33. I hate perl too by Evildonald · · Score: 1

    I hate most programming languages with weak types, vaguely defined variables and ambiguous functions like "chomp"

    1. Re:I hate perl too by Paolone · · Score: 1

      chomp is not ambiguous. RTFM and stop crying.

    2. Re:I hate perl too by Evildonald · · Score: 1

      ambiguous: open to or having several possible meanings or interpretations

      Either you don't know what ambiguous means or you only know the word chomp to mean "Remove trailing CR/LF"... in which case I recommend RTFDictionary.

    3. Re:I hate perl too by Iftekhar25 · · Score: 1

      Variables can be vaguely defined, or they can be done nice and neatly. And chomp is very well-defined, and a damn useful function, thank you very much!

      Perl gives you the flexibility to be a slob, or to be prim and proper. It gives you a choice rather than putting you in a straight-jacket which helps prevent you from pulling your own eyes out, but you now you can't eat!

      The fact that most people out there are slobs doesn't reflect poorly on a language that is otherwise a pleasure to work with, and very intuitive.

    4. Re:I hate perl too by Hal_Porter · · Score: 4, Funny

      chomp is not ambiguous. RTFM and stop crying.

      http://perldoc.perl.org/functions/chomp.html
      This safer version of "chop" removes any trailing string that corresponds to the current value of $/ (also known as $INPUT_RECORD_SEPARATOR in the English module). It returns the total number of characters removed from all its arguments. It's often used to remove the newline from the end of an input record when you're worried that the final record may be missing its newline. When in paragraph mode ($/ = "" ), it removes all trailing newlines from the string. When in slurp mode ($/ = undef ) or fixed-length record mode ($/ is a reference to an integer or the like, see perlvar) chomp() won't remove anything. If VARIABLE is omitted, it chomps $_ . Example:

      If anything I'm crying harder after reading that.

      --
      echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
    5. Re:I hate perl too by ggvaidya · · Score: 1

      It's complicated, but not ambiguous[1]. In the real world, there's exactly two things you're going to use chomp for:

      chomp; # Chomps the default variable, $_

      and

      chomp $x; # Chomps the variable $x

      What it means to "chomp" something is affected by how you're dealing with your input, which is controlled by $/ among other strange perlvar critters.

      As it is, if you want to do strange things with your input, you should be looking at PerlIO. If you're dealing with code which uses $/ in combination with chomp, you've only got about five small paragraphs to go through on the page you linked to, in order to figure out what's going on - not too bad for a method which has stayed essentially unchanged for well over a decade.

      [1] Just realised my post doesn't address the "ambiguous" complaint at all, so:

      chomp: removes trailing record separators, returns the total number of characters removed.
      If no variable being chomped: $_ is chomped.
      If variable being chomped is list: chomps all the elements of the list.
      If variable being chomped is hash: chomps all the values of the hash, but not the keys.
      Record separator: the string being used to split up records in input. This can either be '', undef, or a reference to an integer.
      If '': chomp removes trailing newlines
      If undef or ref_integer: won't remove anything.

      The documentation page also has a note about using brackets to clarify exactly what you want chomped.

      How is any of this ambiguous? If anything, the documentation page describes in reasonably complete detail what chomp will do on any input type, under any $/ constraint. If you doubt this behavior, you can check out Perl's testing suite: I believe there's over 180,000 unit tests on the Perl interpreter and core modules, which should clarify what chomp will do under most circumstances.

      Perl's certainly complicated, but it tries very, very hard to be unambiguous.

    6. Re:I hate perl too by Paolone · · Score: 1

      The function has defined pre- and post- conditions, so it's not ambiguous. You might have issues with the function name, but then it boils down to abstraction capability (or lack thereof). By thwe way, chomp is used in the first code example in the book, and it doesn't ever leave you. Sorry, you can't claim to know Perl if you don't know what chomp does.

    7. Re:I hate perl too by Evildonald · · Score: 1

      Once again. Read the definition of ambiguous. If you can't tell what it does clearly by the function name it is ambiguous. I was using Chomp as an easily identifiable example, but I'm happy to go to the perl docs and drag out 5 more ambiguous methods.

    8. Re:I hate perl too by Hal_Porter · · Score: 1

      I don't think Perl is complicated. But it has some horrible bits of misdesign.

      E.g.

      http://perldoc.perl.org/perlvar.html

      for (1..5){
                      nasty_break();
                      print "$_ ";
              }
              sub nasty_break {
                      $_ = 5;
                      # do something with $_
              }

      You probably expect this code to print:
              1 2 3 4 5

      but instead you get:
              5 5 5 5 5

      Why? Because nasty_break() modifies $_ without localizing it first. The fix is to add local():
                      local $_ = 5;

      Ugh, so variables are not local by default. I also don't like the way it has magic globals with odd names like $_ and $\

      It all seems like the language was designed so you could do something clever in an incomprehensible way in a .sig, rather than for building large systems.

      Mind you I worked on a Perl project with some other people who came from a C background and the code was very readable. But the version of Perl we used didn't have prototypes for example, and doing C like things like structures was done with pack.

      It's good for text processing of course, but I still think it's obscurantist rather than legitimately complicated. I actually find string processing in C (or better C++ with a decent string class) far more readable than a non trivial bunch of regexps - it's more verbose of course.

      --
      echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
    9. Re:I hate perl too by Anonymous Coward · · Score: 0

      If you use strict, variables are localized by default (with "my"). $_ is a special variable, you shouldn't use it for more than a few lines, and definitely not use it across function calls.
      Most other variables with odd names ($\) are considered deprecated, and you probably shouldn't use them if you want clean code.
      There are some things you have to know to write clean perl code, but it's the same in every language.

    10. Re:I hate perl too by dossen · · Score: 1

      So you are just complaining that perl has not chosen to use veryLongAndDescriptiveFunctionNames, instead opting for short names in the style of C and the UNIX shell environment (which are two of its main and early influences).

    11. Re:I hate perl too by Evildonald · · Score: 1

      No, I'm complaining about AMBIGUOUS names. For a group of "smart people" you guys don't read very well.

      I don't need them to BeLongAndSpecifyEveryPartOfTheFuncationaly(). I want them to be descriptive and unambiguous. "Chomp" (as an example) does not tell me what it does. "CleanStream" or "TrimCRLF" or something similar is unambiguous and short.

    12. Re:I hate perl too by Haeleth · · Score: 1

      I want them to be descriptive and unambiguous. "Chomp" (as an example) does not tell me what it does.

      Do, pray, reveal unto us the name of your cherished Ideal Programming Language, because I'm having a damn hard time finding any language that is not stuffed full of functions that are "ambiguous" by your definition.

      For example, what does Java's "String.intern" have to do with music students? What does C++'s "map" have to do with cartography? What does Python's "strip" have to do with long thin flat objects?

      "CleanStream" or "TrimCRLF" or something similar is unambiguous and short.

      And both would also be wrong, since chomp() operates on strings, not streams, and what it trims is not necessarily a CRLF sequence.

      "TrimLineSeparator" is the shortest name I can come up with that counts as "unambiguous" by your curious definition, and frankly I hope you'll forgive me if I prefer "chomp". It doesn't take more than 5 seconds to look it up if you are really so inexperienced that you don't know basic terms of art like that.

    13. Re:I hate perl too by mvdwege · · Score: 1

      I fail to see the problem. $_ is defined in the scope of the for loop. Therefore it is global to all subscopes. And for the record, to use what is considered local scope in other languages, in Perl, you do not use local, but my instead.

      Mart

      --
      "I know I will be modded down for this": where's the option '-1, Asking for it'?
    14. Re:I hate perl too by Evildonald · · Score: 1

      So where is the person to jump up and defend that it doesn't have vaguely defined variables. There is a nice Score of 2 for you if you do!

    15. Re:I hate perl too by Evildonald · · Score: 1

      It's OK Boys, I'm just trolling now. I legitimately hate Perl for all the reasons I specified, but you like the stuff you like, and I'll like my stuff and we'll all be fine.

    16. Re:I hate perl too by ggvaidya · · Score: 1

      $_ (and most if not all of the other perlvar variables) are true globals, and using them for anything other than extremely local tasks is silly. Just about every bit of code which lets you do:

      foreach ($from .. $to) { print; }

      also lets you do:

      foreach my $x ($from .. $to) {print $x;}

      where $x is scoped properly an everything. Perl just likes giving you the freedom to go with whichever way makes more sense and is more readable for task at hand.

      That said, I've been bitten by the $_-is-global thing before - not in a long, long time, but I can definitely see why you dislike it. I'll agree many bits of Perl seem misdesigned - doing anything with inheritance of objects still scares me a little - but at the end of the day, the flexibility Perl gives me makes up for remembering all the little things like $| being responsible for piping, $@ being the error message from the last eval, and $! being the error message from the last failed Perl function. And those are just off the top of my head!

      Also: using pack for structures? I can see why you hate the language! I'm not a big fan of prototypes: my rule of thumb is that if a method can't be expressed as:

      my $result = GetFromSource($source);

      then I ought to use named arguments, like:

      my $connection = Connect(
          'server' => '127.0.0.1',
          'port' => '80',
          'encoding' => 'utf'); # Or whatever

      But of course, TMTOWTDI! :-P

    17. Re:I hate perl too by Anonymous Coward · · Score: 0

      Perl:

      chomp$var

      Ruby:

      var.chomp

      Python:

      var.rstrip()

      PHP:

      rtrim($var,"\n\r")

  34. Please read YOUR post by Anonymous Coward · · Score: 0

    "the spaghetti code that Perl coders tend to produce."

    that's not Perl, that's the coder. Make them write in C# and it will be spaghetti code. Does that mean C# is a terrible language?

    No.

    1. Re:Please read YOUR post by fbjon · · Score: 1
      By your standard, everyone should write in assembly since it's a great and very flexible language that doesn't impose undue restrictions on the coder. If the coder can't handle it, that's the coder's fault.

      Or maybe not. You have to make an effort to produce non-mud in Perl. That makes it a bad language, even if it's nice and powerful to use.

      --
      True confidence comes not from realising you are as good as your peers, but that your peers are as bad as you are.
    2. Re:Please read YOUR post by Abcd1234 · · Score: 1

      By your standard, everyone should write in assembly

      Sweet strawman!

      You have to make an effort to produce non-mud in Perl.

      You sure do. Just like you do in every other damn language out there.

      Honestly, the same discipline that allows you to write clean C, or clean Java, or clean Python, allows you to write clean Perl. Declare your variables upfront. Indent consistently. Comment where necessary. Don't be clever unless you have a good reason to, and in those cases, comment profusely. Break code into maintainable modules when it makes sense. Etc, etc, etc.

      These are basic, *basic* coding guidelines. If you find you need language to force that discipline on you, you're part of the problem.

    3. Re:Please read YOUR post by fbjon · · Score: 1

      It isn't necessarily that the language forces that disciple on the programmer, it's that the language forces it on the programmer's manager.

      --
      True confidence comes not from realising you are as good as your peers, but that your peers are as bad as you are.
    4. Re:Please read YOUR post by Abcd1234 · · Score: 1

      Bah, the same is true of pretty well every programming language. Take C. Do you allow this?

          if ((var = func()) != 0)

      Do you enforce this style?

          if (0 != (var = func()))

      Do you use a standard naming convention? Do you allow statics? Globals? Gotos? etc, etc, etc.

      In short, unless you have an exceedingly capable group of programmers, you need a manager who's willing to set the tone and define sufficient guidelines, regardless of the language.

    5. Re:Please read YOUR post by fbjon · · Score: 1

      Perhaps, though C is probably not the best example of language-enforced regularities.

      --
      True confidence comes not from realising you are as good as your peers, but that your peers are as bad as you are.
    6. Re:Please read YOUR post by tkinnun0 · · Score: 1

      These are basic, *basic* coding guidelines. If you find you need language to force that discipline on you, you're part of the problem.

      Yes, I'm part of the problem, so if choosing a suitable language allows me to mitigate the problem, I'd be a fool not to take advantage of it. Would you rather have your language force its discipline on you or your manager force his particular brand of discipline on you? Hint: there are more managers than languages.

    7. Re:Please read YOUR post by Abcd1234 · · Score: 1

      Would you rather have your language force its discipline on you or your manager force his particular brand of discipline on you?

      False dichotomy. *I* would rather force discipline on myself, because I believe clean, well-written code should be the ultimate goal of a true professional in the software industry. Part of that process is following established guidelines in the business I'm working in, and if there are no such guidelines, either to assist in developing them, or to do what I can to follow industry and experiential best practice to ensure my work is the best quality I can achieve.

      Now, there are those that need guidance because they are unable, or more likely, unwilling to author high quality code. In those cases, I would rather a set of guidelines force them to do the write thing because, hopefully, they will internalize those guidelines, which means their code will be of higher quality regardless of the language or toolset being used. In short, I feel that, for the long-term development of a programmer, a process of learning is better than a toolset that simply imposes a straightjacket.

  35. ...and the wisdom to know the difference. by SuperKendall · · Score: 1

    But I maintain that this isn't directly due to the code being written in Perl. Its because the Perl code has developed piecemeal over the last ten or so years in an environment where there was no design authority..

    That's fantastic. Given your assertion is 100% correct, and you cannot change the practice of companies ALWAYS developing code piecemeal over a number of years with no single consistent design authority - what variable is left to alter?

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  36. Perl is dead by Meshugga · · Score: 1

    (or rather: should be)

    Let me explain:

    First, and foremost, perl encourages via its programming culture (does the acronym TIMTOWDI strike terror in your head?) and through its design obscure programming. Thus, the risk of resulting unmaintainable code is very high.

    Second, perl is technically a hybrid of different programming paradigms. This does not only add to the complexity and the before mentioned risky "TIMTOWDI" behaviour, but it more often than not gives perl coders who need/want to work in an existing perl environment a huge headache. The colleagues do it differently, they have been, for years.

    Third, perl is highly deficient in what i would call "semantic integrity". It is like speaking a language with an unusual high percentage of phrases, lexical and grammatic exceptions.

    Fourth, perl has a huge history. A history so large and moved that it carries a lot of weight of past programming paradigms, do's and dont's, hacks and "boobytraps". No business decision can be based upon that.

    Fifth, perl is slower, bigger and consumes more memory, and does not offer bytecode by default. This, again, is not the fault of the perl maintainers, but the of the dead freight perl is still carrying for compatibility purposes and the lack of "one" way to do things.

    Sixth, perl has a weird typing concept, which encourages misuse. (Hey, no other scripting language i know uses a library-include to render typing useable...)

    Seventh, and this is nourished by my own experience, there is the phenomenon that you get much better (in terms of maintainability) perl code if you hire programmers who do not primarily program perl. This is weird, but my observation suggested, that this is because they don't tend to give in to certain sugar perl offers and use paradigms like OO more straight forward. The perl-enthusiasts I met as job applicants, who were altogether very capable programmers, were kind of proud of their obfuscated perl code. So proud that a lot of them even put it in their application (which was of course rejected prematurely).

    Perl has done great, and I mean really GREAT things for the internet, for script language evolution and for businesses.

    But it is time to let go, really.

    1. Re:Perl is dead by evil_aar0n · · Score: 1

      What's wrong with having more than one way to do something? I think it reflects that reality that, yep, there usually is more than one way to accomplish the same thing.

      You're thirsty. Your choices are milk or milk. Gee, how exciting. What if I like vodka?

      Frankly, I think that expressiveness is useful. You and I might not approach a problem the same way, and having a language confine us to one approach would make it more difficult to solve the problem: one of us would have to change our way of thinking to accommodate the language. That's not acceptable. It's like the concept of languages in general: if you don't like perl, no one's forcing you to use it. But don't take it away from me, if it helps me get my work done.

      --
      Truth, Justice. Or the American Way.
  37. "nearly all of the perl code I've seen has been vi by thoglette · · Score: 1

    nearly all of the perl code I've seen has been virtually indecipherable to anybody not a perl veteran

    Of course this is the reason that Lisp has died as a web-app tool. It requires a clue. :-)

    Add:

    • Shiny New Languages
    • Shiny New Buzzwords
    • Clueless universities teaching Java or VBasic (instead of Lisp)
    • A decade of poorly designed, poorly written, poorly tested and generally evolved code. And did I mention we outsourced it for a while a few years back?

    Yup, it's the language's fault that our boring, me-too web application sucks:-)

    Seriously, the whole Perl 6 thing has been a bigger problem: the brighest and best have been playing "Perl the Game" rather than making the language more useful. Consider XML/Xpath processing: the existing CPAN modules are "somewhat behind the cutting edge". To put it kindly! And comparisons between the web frameworks for Perl vs The Others is even less flattering.

    --
    -- Butlerian Jihad NOW!
  38. Keep in mind, Perl is *not* easy by X.25 · · Score: 1

    PHP is shiny. Perl is not.

    People like shiny things.

    (and I love Perl :)

    1. Re:Keep in mind, Perl is *not* easy by Iftekhar25 · · Score: 1

      The beauty of it really, is that Perl can be as easy or as difficult as you want it to be.

      (I love Perl too! :)

  39. Oh Brother I Hear You! by Iftekhar25 · · Score: 1

    I work at a company (right now!) that developed it's own in-house framework on Perl. It's written in Chinese for all I know, there are portions of the system the IT head tells me not to look into. It's a black box. It works, so we don't touch it, we don't look at it. We don't think about it, in case something snaps and sends the system crashing.

    I was code surfing once and came across 2-d arrays. I asked my boss, and he's like, oh, yeah, it gets even better: there are 3-d arrays in there.

    The system is currently a black box. The business poured significant amount of money back in 2001 when the system was designed, and the company's been milking the productivity it gets out of the system. As new projects come up with new features and functionalities, the system is more strained, and we do more workaround and hacks, until we forget where the system ends and the hacks begin.

    From a business standpoint, the management won't invest in a new system, Perl or otherwise, because that's additional costs for a system that *was* designed, they thought, back in 2001. They're not interested in listening to strange terms like "architecture" and "design." They hold the keys to the safe, so here we are, working on a project on a crumbling old system not designed to do anything like what we need it to do.

    Boy, oh boy, I'm sending this article to my boss. And bro... I hear you. I love Perl, what a damn beautiful language to code in. Sure, you need to set the ground rules or people will run amok or write one-way code, but it's such an absolute pleasure to work with. But the language, nor the programmers who love working with it, get much respect.

    1. Re:Oh Brother I Hear You! by evil_aar0n · · Score: 1

      If 2d, let alone 3d arrays scare you, why are you in the programming business? These are common in _lots_ of applications. That's hardly the worst you can see.

      --
      Truth, Justice. Or the American Way.
    2. Re:Oh Brother I Hear You! by Iftekhar25 · · Score: 1

      In hindsight, it may not sound as earth-shatteringly obfuscated as when I first came across it. :P And, yeah, I've used much worse than 3-d arrays. With auto-vivification, you can make nested hashes and arrays to the nth degree, or as much as you can stomach, whichever comes last. But for the code I was looking at, a multi-dimensional array seemed very unnecessary.

      I couldn't tell you exactly why, because I can hardly remember. You're just going to have to take my word for it! :)

  40. It's not about perl by Anonymous Coward · · Score: 0

    You see this process all the time in companies that have a lot of old code. Companies start associating problems related to these systems and their age with technologies underneath.

    It does not matter if it was written in perl, COBOL, common-lisp or C++ ... it has happened countles ammount of times - you slowly start relating problems of a particular application with programming language or a framework and then thinking that you can't fix the problems without changing that part without throwing out the baby with the bath water.

    If you want to keep the language alive - the most devious solution would be associating problems with some innocent but old perl libraries, or making your company switch web frameworks, so they would have something to blame for the old problems. Because making them realise that problems are induced by age of the application, might be just too difficult, and even then you would either have to prove that fixing old stuff is better than rewriting or that they should stick to perl for the rewrite. And all of these are social problems - not thecnical ones.

  41. Perl was never intended for that by aaaaaaargh! · · Score: 1

    Perl advocates nowadays might deny this, but at least in the beginning Perl was never intended to be used for anything more than providing quick scripting solutions for text processing tasks to the lazy programmer. And there is nothing wrong with that, it's better than awk. When a language becomes popular, people start using it for purposes it was never intended for, and it's only fair that the mindless corporate drones don't want to encourage that. Moreover, the average manager type can barely understand a line of Perl, but is probably convinced that he could do Python programming better than professional programmers. Then, of course, Perl will be discouraged.

    Personally, I stopped using Perl 10 years ago, so I don't mind.

    Obligatory language flame part: By the way, Python sucks, too. I mean, "duck" typing", that's just crap. Use mzscheme instead.

    1. Re:Perl was never intended for that by samjam · · Score: 1

      Perl was originally intended.... yes but Perl isn't THAT language any more, a version 0.5 need tells little about a version 5.10 language, have a look at Perl is now intended...

      Sam

    2. Re:Perl was never intended for that by smack.addict · · Score: 1

      Python is the best language on Earth to use for "pseudo-code" in low-level requirements.

  42. two words too many.... by adavies42 · · Score: 1

    Its because Perl has developed piecemeal over the last ten or so years in an environment where there was no design authority.

    There, fixed that for you.

    --
    Media that can be recorded and distributed can be recorded and distributed.
    -kfg
  43. Hate PERL? No. Hate LOSING Money? YES! by Anonymous Coward · · Score: 0

    Corporates don't hate PERL,
    I mean they never have to code it, so why do they care?

    Programmers on the other hand, may hate PERL.
    Programmers are the ones who have to deliver on corporate demand.
    Programmers will always try to use the best tools available at the time to fulfill the demand.

    IMHO corporates hate losing money more than they hate PERL,
    ..and will blame anything and everything when they do..
    ..even when they approved the budget to start coding in PERL in the first place. :-/

    My 2c Hypocrisy.

  44. C++0x by js_sebastian · · Score: 3, Interesting

    One thing that really disappoints me about C++ is the direction that it's been heading for the past 5 or 6 years - "template programming". In fact it's about as bad as perl in terms of readability and maintainability, but much worse for debuggability. I can't think of any programming "language" worse than C++ template programming. I stay away from Boost and really hate what it's doing to C++.

    I respectfully disagree. The direction C++ is heading, with C++0x, is awesome. With the next standard, error messages from compilation of templated code will become comprehensible, thanks to concepts. This will mean using complex stl classes will be as easy as using java generics. Of course, designing the STL will still be hard, but I for one do not have to do that.

    Also C++ will become viable for functional programming (which is possible but horrible nowadays) thanks to lambdas and closures.

    1. Re:C++0x by Anonymous Coward · · Score: 0

      One thing that really disappoints me about C++ is the direction that it's been heading for the past 5 or 6 years - "template programming". In fact it's about as bad as perl in terms of readability and maintainability, but much worse for debuggability. I can't think of any programming "language" worse than C++ template programming. I stay away from Boost and really hate what it's doing to C++.

      I respectfully disagree. The direction C++ is heading, with C++0x, is awesome. With the next standard, error messages from compilation of templated code will become comprehensible, thanks to concepts. This will mean using complex stl classes will be as easy as using java generics. Of course, designing the STL will still be hard, but I for one do not have to do that.

      Also C++ will become viable for functional programming (which is possible but horrible nowadays) thanks to lambdas and closures.

      I can't believe I just read "comprehensible" error messages and a mention of Java generics in the same paragraph.

      Don't get me wrong, I love Java, but Generics were a tacked on hack and if you get into doing anything sufficiently complex with them, i.e. polymorphism and wildcard behaviors your image of them being "easy" and "comprehensible" will be tarnished.

    2. Re:C++0x by js_sebastian · · Score: 1

      One thing that really disappoints me about C++ is the direction that it's been heading for the past 5 or 6 years - "template programming". In fact it's about as bad as perl in terms of readability and maintainability, but much worse for debuggability. I can't think of any programming "language" worse than C++ template programming. I stay away from Boost and really hate what it's doing to C++.

      I respectfully disagree. The direction C++ is heading, with C++0x, is awesome. With the next standard, error messages from compilation of templated code will become comprehensible, thanks to concepts. This will mean using complex stl classes will be as easy as using java generics. Of course, designing the STL will still be hard, but I for one do not have to do that.

      Also C++ will become viable for functional programming (which is possible but horrible nowadays) thanks to lambdas and closures.

      I can't believe I just read "comprehensible" error messages and a mention of Java generics in the same paragraph.

      Don't get me wrong, I love Java, but Generics were a tacked on hack and if you get into doing anything sufficiently complex with them, i.e. polymorphism and wildcard behaviors your image of them being "easy" and "comprehensible" will be tarnished.

      Admittedly, I didn't do any serious Java programming since generics were introduced, so the comparison was mostly pulled out of my a**.

  45. Library granularity by Chief+Camel+Breeder · · Score: 1

    Suppose you write in Perl or Python and you use a lot of 3rd-party libraries. My personal experience is that the modules available for Perl are at a lower, more geekful level than those for Python. In Perl one gets four or five modules off CPAN and spends a painful few days bashing them together into a solution. In Python, one more often gets a canned solution that works immediately.

    If that carries over into the corperate domain - and it's a big if - then it makes Perl look expensive. And poorly-trained developers will do better with the canned solutions than with the low-level stuff.

    Disclaimer: my experience is coding for scientists with FOSS and may not translate to the corporate domain. And I haven't written very much Python. :-/

  46. where are the geeks by e70838 · · Score: 0

    I can't believe so few \. readers can write in Perl. That's the only explanation of the comments I read.
    I use Perl everydays. For example 30 minutes ago, a user has found an error in data (a bunch of text files with strange structure) and asked me how many times this error occured and if there was a systematic way to fix it. Less than 10 minutes and 20 lines latter, I gave the report.
    There is always a natural way to express your thinking in Perl. For me, a bad Perl program means that the programmer did not have a clear mind.
    For me, the problem with Perl is that instead of forcing rigid rules on input data, process, users, like we would do with most langages, it is easier to adapt the code to handle every cases. It is so easy and nice to code in perl.
    The result is that the users are happy, but it is very difficult to migrate to another langage (except Python, Ruby, OCAML and GHC but I dot want to start a troll)

  47. Best way to edit a Perl program by Anonymous Coward · · Score: 0

    [joke]
    The best way to edit a Perl program is to delete it and start over.
    [/joke]

    Yeah, maintainability is the problem. In the early days of web (post-static only HTML pages), I wrote a large internal web site using Perl (remember those days). The problem was in maintaining it. And this was just some "Friday work" project while I did my real VHDL engineering work for the group.

    The maintainability problem was worse for the Engineering IT guys who had years of Perl and bash wrapper scripts around incompatible tools to make them interoperate. That was a thankless job. Where you were not allowed to touch anything when it worked, but when it didn't you do anything you wanted. But as soon as it worked, no touching it (even for code clean up). And, since it was all ad hoc, there was no version control. After all it wasn't software design, it was just IT work.
    But the problem was after 1 rotation of the IT team no one knew what the F' was going on. So wrapper scripts around the wrapper scripts. (This environment did produce great version of hierarchal RCS, back before CVS, SVN, etc systems).
    The Perl/bash/tcsh was impossible to read. It was all informal hacks that had become fossilized.

    So, while that environment is bad for many reasons. I see why managment may want to move to an inherrently more readable language.

  48. Perl 6 the rewrite is the problem! by Anonymous Coward · · Score: 0

    I like perl it is a cool language but the mistake of perl is the massive rewrite of perl 6 that is taking years, it is as the windows vista that took 7 years to develop?. That is the biggest mistake of perl and with the years is loosing field, lost the battle, Now new languages
    as Python and Ruby are taking over Perl.

    If I have to move to another language it will be Python it is a compact and fast language, Ruby is slow as hell, It have some of perl magic but it is not perl it is like a bad version of smalltalk.

    2c.

    1. Re:Perl 6 the rewrite is the problem! by Phroggy · · Score: 1

      Many of us are simply ignoring Perl 6, therefore it can't be the problem. Perl 5 works perfectly well.

      --
      $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
      $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
  49. duct tape? by slugstone · · Score: 1

    I thought Perl is considered duct tape if the internet. It is ugly but it works.

  50. Programming tricks by dargaud · · Score: 3, Insightful
    Exactly. In the words of one of my former bosses (while working on Perl projects):

    Whenever you think of a clever programming trick: forget it !

    --
    Non-Linux Penguins ?
  51. What's killing Perl... by pjf · · Score: 3, Informative

    ...is backwards compatibility. In general, you can take some obscure piece of code that someone wrote almost a decade ago, and it will run on your modern Perl system. Unfortunately, people then take those obscure snippets of code, and try to learn from them. They may have been the best way to do things eight years ago, but they're certainly not now.

    As such, one of the hardest problems with Perl is education of new techniques. Too many systems still use CGI.pm when they could use Catalyst. They use some home-grown system of objects, when they could be using Moose. They put up with outdated techniques when Perl::Critic would find them in a heartbeat.

    So, if everyone learnt the new techniques, we'd be fine, right? Unfortunately, it's not that simple. I teach Perl for a job, it's still an incredibly popular language here in Australia. But because that old code still works, I still need to teach people how to understand it, even if I then proceed to teach them better ways so they can avoid it. That increases cognitive workload, and there's only so much one can fit into a fresh brain during its first contact with a language.

    Perl still remains the language of choice for writing minesweeper bots.

    1. Re:What's killing Perl... by Anne+Thwacks · · Score: 1
      code that someone wrote almost a decade ago

      The problem is people who think a decade is a long time. I expect uptimes of a decade, and have no intentions of rewriting old code just cos my grandchildren have graduated. Hell, I have known it to take a decade to get the OS to support my hardware (OpenBSD on UltraSparc).

      --
      Sent from my ASR33 using ASCII
    2. Re:What's killing Perl... by tknd · · Score: 1

      Too many systems still use CGI.pm when they could use Catalyst. They use some home-grown system of objects, when they could be using Moose.

      I disagree with Catalyst. You need to install a boat load of libraries for Catalyst to work and they don't bundle the packages together. So when one package changes because the maintainer made an update to cpan and breaks something or the installation, whatever, catalyst installation fails. I'm not saying that catalyst is bad for having hundreds of dependencies, but rather that they need to have a better way of distributing the compatible package versions along with their current version.

      Also catalyst has little or no documentation on how to get the code running in a plain CGI environment. The only environments recommended are FastCGI and mod_perl. There are still legacy systems out there that haven't gotten up to mod_perl or FastCGI or can't. Therefore you're stuck with plain CGI. In that case, you're stuck with CGI.pm doing the parsing for you.

      Finally I like Moose but the author makes a point that it does add a significant amount of overhead to your application. We are stuck on old hardware therefore speed is actually precious to us. We are moving in the direction of eventually getting this system up to mod_perl and off of our current hardware platform but that is not a trivial task considering the code base and resources we're dealing with. So we attack it one step at a time with the resources we have and hope to crawl our way to the "latest" perl and cpan have to offer.

      You also have to be a little careful about module use. If the module is not well documented or does not have a significant supporting user base or support history, staying away from the module might be a good idea. The last thing you want is to start using something that is bleeding edge only to find that the next best thing comes out and all development on what you started using halts.

    3. Re:What's killing Perl... by cpghost · · Score: 1

      Yes, indeed. But killing backward compat could also easily kill a language, unless it is being done in a very careful manner (read: with gradual deprecations etc over many years). For ex., what about the dreaded Python 2.X -> 3.X transition? First of all, SWIG needs to be updated (there's a GSoC project for that) for a lot of C-based modules, then nearly all modules in PyPI and elsewhere would need attention here and there. For a long time to come, two versions of each module would need to be maintained in parallel (one for the 2.X and one for the upcoming 3.X version). If things go wrong here, and they're probably bound to go wrong, Python may well end up worse than Perl in the long run... not because of the language, but because of breaking backward compatibility.

      --
      cpghost at Cordula's Web.
    4. Re:What's killing Perl... by dcam · · Score: 1

      Close but no cigar. TMTOWTDI is killing perl.

      --
      meh
  52. Why I don't use perl by jandersen · · Score: 1

    I don't know why others don't use it, but my personal reason has little to do with whether it is a good language or not. I simply got to dislike it from the very beginning - it seemed to be somebody's personal statement about things that have nothing to do with programming.

    It's been a long time now, but as far as I remember there is a command or statement in perl called 'bless'; when I finally found some tutorial it went on about 'Christian names' of variables, or something like that - OK, so maybe the guy was religious or something, but it was a real turn-off for me. I mean, I have certain political views which I am perfectly willing to share with the world, but I don't bloody make the programs I write a forum for propaganda.

    Ah well, maybe I am way off the mark. Wouldn't be the first time either :-)

    1. Re:Why I don't use perl by evil_aar0n · · Score: 1

      I understand you a little bit, because I remember once, in particular, when I was pressed for an answer "now!" and the Camel book just seemed, at that time, to be more cutesy than informative: it's a technical book, dammit, just tell me what I need to know. In fact, I sent a note to Tom Christenson about it. It didn't change anything, really; the newer versions still maintained their flippancy. It's not as big a deal, now, because I've learned enough that I don't need to refer to the book as much, and certainly not under critical conditions like back then.

      --
      Truth, Justice. Or the American Way.
  53. Quality vs Complexity by Hairy1 · · Score: 5, Insightful

    As a software manager what i'm interested in is developing quality applications. The biggest cost in software is maintenance. If a language is difficult to read by the original author it will be impossible to maintain by anyone else.

    I would consider Python because it encourages good design and readable code. Professionally I use Java because I can easily hire people who use it, and it also encourages good design and readable code, if a tad verbose.

    Perl is very consise, but also difficult to read. It turns into a maintenance nightmare, and there are far fewer developer who know Perl.

    Python is far better; it is more consise than Java, has similar OO features, is readable. It isn't quite up to replacing Java, but has impressed me and many other Java coders.

    Oh, and I have no sympathy for coders who think they are so cool being able to code in ways nobody else understands. I would rather see a slightly slower algorithm thats clear than a fast one that is unmaintainable.

    Complex code is the enemy of quality, as is premature optimization.

    1. Re:Quality vs Complexity by pandrijeczko · · Score: 1

      If you're a software manager who doesn't code, then I don't think it's any of your business what an application is coded in.

      You're there to ensure that the resulting application meets the criteria set for it - namely stability, portability, usability & good documentation. And there to make sure the programming team meet deadlines for testing and release.

      --
      Gentoo Linux - another day, another USE flag.
    2. Re:Quality vs Complexity by GregAllen · · Score: 1

      If you're a software manager who doesn't code, then I don't think it's any of your business what an application is coded in.

      stability, portability, usability & good documentation.

      You forgot maintainability. That's a really good reason to care what language it was written in.

      --
      Please help find my missing daughter: FindSabrina.org
    3. Re:Quality vs Complexity by VVelox · · Score: 1

      If you have dificult to read Perl code it means you have a crappy and/or lazy programmer.

      Perl is very capable of being clear. Undocumented/uncommented and obfuscated can be written in any language, including Python, and it is ignorant to assume that it is some how magically a Perl only trait.

      If you are getting undocumented/uncommented and obfuscated in Perl from your developers it means you really need to have a talk with them. There is no reason for not using POD.

    4. Re:Quality vs Complexity by VVelox · · Score: 1

      Perl like practically all other languages is maintainable.

      The problem is ignorant forum trolls who have over the years brainwashed weak minded people that Perl some how needs to be unreadable and that bad code unobfuscated, undocumented, and uncommented code is impossible to write in other languages.

      This entire thread boils down to a bloody popularity contest based ignorance.

    5. Re:Quality vs Complexity by ccc31807 · · Score: 1

      I also have a mixed job, part manager and part worker bee. My job is to push data out the door in different kinds of formats. My CHIEF criteria is to use the technology that will do the job quick and right. I use a lot of different technologies, depending on the job. This includes Perl, C, Java, .NET, Office (Excel and Access), Coldfusion, Python, and I have also used Erlang and Lisp on rare occasions. More than half of my production consists of Perl. Why? It's quick and powerful, and since I don't have to maintain the scripts I don't worry about it. Writing a one-off 50 liner in Perl in an hour beats everything else out there, including Python. If I had to maintain a code base, I would probably gravitate to Java. I have a file cabinet full of hard copies of unreadable Perl scripts. Still, if your job is transforming data and almost every job requires a custom script, you can't beat Perl.

    6. Re:Quality vs Complexity by Alpha830RulZ · · Score: 1

      If you're a software manager who doesn't code, then I don't think it's any of your business what an application is coded in.

      It's absolutely the manager's business what tools his team uses. The choice of tools affects performance, integration, team composition and productivity, and ability for the application to be supported and extended economically in the future. If the manager isn't thinking about and managing towards these goals, he/she is failing at their primary job.

      --
      I was taught to respect my elders. The trouble is, it's getting harder and harder to find some.
    7. Re:Quality vs Complexity by perrin_harkins · · Score: 1

      More developers know Python than Perl? Dream on. This might be true for Java, but certainly not for Python. If you compare the number of jobs out there for Python and Perl, it becomes pretty obvious that Python still operates in a small niche by comparison.

      And I have no sympathy for coders who try to be cool by writing obscure or complex code either. Those people are BAD programmers. Perl is not the problem there.

    8. Re:Quality vs Complexity by bitMonster · · Score: 1

      Python is growing. Perl is not.
      http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html

      (There are other indexes that have a similar conclusion with different methodology if you want to argue about that one.)

    9. Re:Quality vs Complexity by Hairy1 · · Score: 1

      I'm sure you are having visions of a pointy haired boss who is technically illiterate. Sorry to disappoint you, but I'm a 17 year veteran coder who has developed my management and leadership skills because people with both technical and leadership skills are badly needed.

      The language used by a software project is a core strategic decision. That isn't to say that developers have no say in the decision, just that as manager the buck stops with you when it comes to making deadlines and ensuring quality. Just because you can hack up something quickly in Perl doesn't mean it is appropriate to be developing long term products in the same language.

      I'm sick of self important developers taking the attitude that other developers are dumb because they write code which can be easily understood. Clarity in coding is a sign of clarity of thought. Code is an expression of your ideas and concepts. It is a form of communication not only the the computer but also to those who maintain the code after you.

      To me good quality coding; that is being clear and maintainable with good unit tests; is about taking pride in your profession and your work.

      Sometimes management are clueless, but don't assume so just because they don't believe the language you find the most fun to write in is the best for the business.

    10. Re:Quality vs Complexity by perrin_harkins · · Score: 1

      TIOBE is worthless and everyone knows it. It's nothing but a count of Google hits. If you want to actually look at jobs, try these graphs from indeed.com. As you can see, both Perl and Python continue to grow, but Python has a long way to go before it's in the same ballpark for number of jobs.

  54. Or it could be that humans connect dots by Moraelin · · Score: 2, Insightful

    Or it could be that humans are smart enough to notice things and connect the dots, even if they don't fully understand the subtleties of what they're connecting. They notice that smashing two flintstones together makes sparks, and sparks can light a fire, and all of a sudden the whole tribe has fire. Even if they don't fully understand what fire is or why those stones create sparks. Or they put their finger in the candle flame once, it hurts, they don't do it again. Or maybe if they want to be really sure and scientific about it, they put their finger in it a couple more times. It hurt again, so they stop doing it. They don't wonder exactly what happened there and what nerve endings fired that signal, but they stop doing it anyway.

    In this case, the summary already tells you what you need to know: " I don't deny at all that this company (like many others) has a large amount of badly written and hard-to-maintain Perl code."

    Ah-ha. Maybe _that_ is why management is trying to steer off it? My understanding of Occam's Razor say it might just be the right explanation.

    And in the end that's what they're supposed to do. If all those many projects and departments (again, TFA spells it out), and indeed many other companies too, produced unmaintainable code in Perl, maybe it's time to try something else than Perl. It's that simple. And if you can hire 3 new kids fresh off university who are already good in Java and/or Python instead of 1 mythical uber-coder who can user Perl right, then it's even more of a no-brainer. That's the kind of thing management is supposed to do.

    You _could_ say that it's not Perl's fault, it's the humans who don't use it right. But then they said the same thing about Communism in the USSR. Let's face it, the smart way to do anything is to figure out how to use the resources you actually have, not to try to pretend they're something else. We have plenty of examples of people who tried to idealize humans as having to be anything but what they actually had, and lost. The USSR is one example. Napoleon III and the silly French notion that they should just have "elan" and overcome any odds or equipment disadvantages, is another. I'm sure that while he was capitulating at Sedan he had time to think about it.

    The same applies here. If the humans you have (H1Bers or anything else) are bad at Perl, then maybe it's time to try something else.

    And while you may laugh at "pointy-clicky" tools and trying to use cheap incompetents, well, that's the history of human civilization. That's why we built tools in the first place. So some ape who's too much of a wimp to bite a gazelle's neck off, can still hunt as well as the lions. Then so some wimp who can barely lift 20 kilos of rocks, can use ropes and inclines to move 20 ton blocks up a pyramid. Then so some half-educated merchant who can barely do maths up to 20, can use an abacus to do maths up to tens of thousands. Etc.

    There's no failure, management or otherwise, to try to use better tools. Even if it's instead of wishing for that uber-guru who can do the same job without tools, at only 10x the price. If we waited for the uber-workers who can lift 20 ton stones, we wouldn't have pyramids yet. And if in the process you enlarge the potential pool of workers a bit, well, even better. Society on the whole then can use more of them and achieve more.

    Yes, maybe you can program without "pointy-clicky" tools. And some people still can weave without mechanized looms. Guess what? The industrial revolution happened when we figured out a tool (that mechanized loom) which let masses of drooling retards weave just as well as those l33t weaving gurus did without tools. And even faster at that. And guess what? We all ended up better off for it.

    --
    A polar bear is a cartesian bear after a coordinate transform.
    1. Re:Or it could be that humans connect dots by Hognoxious · · Score: 1

      They notice that smashing two flintstones together makes sparks

      I doubt it. Flint and steel (or pyrites) might...

      And if you can hire 3 new kids fresh off university who are already good in Java and/or Python instead of 1 mythical uber-coder who can user Perl right

      That's quite a big if. Knowing the language doesn't make you able to use it in a reald world task. Most coders straight out of school are mediocre at best. Quite a few stay that way.

      There's no failure, management or otherwise, to try to use better tools.

      True, but better isn't a simple concept, there's many aspects to it; and like the relative weightings of those aspects, many of them are subjective. It isn't nearly as clear cut as your archaeological examples imply.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  55. Language Documentation and references suck.... by cheekyboy · · Score: 1

    1. look at php vs perl sample code/docs in their respective sites. Php not only looks better, but has more info, yet perl as usual is too minimalistic in both its english texts and its code samples and combination samples. Even MSDN docs are better put together.

    2. I am being picky here but even the colors chosen on those websites is so minimal it reminds me of 1996 websites. Are perl programmers so cheap they only still use 8bit desktops on 28k modems? Put some more bulk in the content.

    OT - I think personally the whole concept of IDEs should be taken to the next level, to the photoshop scale. Why do we still work with "files" and "functions". We need no 'files' concept but have classes/functions in one 'application'. The ide can hide it all even if it has to self create auto filenames or keep it in one giant .zip with one function per 'file'.

    Todays programs are more complex than 3 source files and a makefile. Why waste time managing a file structure, lets abstract it and let the IDE do it. We are past the vi days.

    --
    Liberty freedom are no1, not dicks in suits.
    1. Re:Language Documentation and references suck.... by samjam · · Score: 1

      You are being too picky, you sound like a PHB: "put more colours on the website, put more words on the website".

      You think the web sites lack colour and bulk. That scares me.

      I don't know which perl websites you look at but I find the perl doc websites I look at have plenty of information, and I've used perl and php for years.

      php has a lot of user comments on the php website because there's lots of people who keep getting it wrong. Perhaps the perl docs are just better...

      As for the OT; it says everything. We don't "waste time managing a file structure" we use a file structure to mean things. This just suggests that you don't mean anything by your file structures.

    2. Re:Language Documentation and references suck.... by tkinnun0 · · Score: 1

      Todays programs are more complex than 3 source files and a makefile. Why waste time managing a file structure, lets abstract it and let the IDE do it. We are past the vi days.

      Java and Eclipse from year 2005 called and said they have what you want.

  56. overpriced and overhyped by tjstork · · Score: 1

    Besides, don't underestimate the importance of clarity and modularity in architecture

    I've seen so many systems that were expensive to build because they offered so many degrees of freedom for future expansion, that they stayed expensive to maintain because of all of those degrees of freedom. Conversely, the badly designed terrible little programs that aren't all broken out seem to be the ones that really succeed and it makes me wonder if today's software, is, in fact, over-engineered. There's all of these layers and these layers -never- really deliver the economic benefit to which they were supposed to deliver.

    --
    This is my sig.
    1. Re:overpriced and overhyped by Lonewolf666 · · Score: 3, Interesting

      Sometimes it is a matter of not being able to deliver due to lack of architecture. Read, the side effects in the non-architectured spaghetti code finally reached the point of overwhelming the programmers.

      If you managed to avoid this situation with sufficient foresight, it is not always obvious. After all, maybe a simpler system would have done the job too?
      Besides, the point of not being able to deliver due to lack of architecture usually comes later in the lifecycle, and the first versions may be quite successful. So in some cases, the badly designed terrible little programs win by being first and becoming the "industry standard".

      Now the obligatory dig at Microsoft...
      As far as I can tell from the user perspective, Windows seems to fall in this category. For the second time:
      -First time, Windows 9x was quite successful for a while but ended in disgrace with Windows Millennium. Fortunately for Microsoft, they had developed the much more solid Windows NT line in parallel, on which they then built Windows 2000 and XP.
      -Now, it seems Microsoft has managed to overextend its architecture again with Vista. This time I don't see a better product line in the background that could take over. Let's see what happens over the next five years ;-)

      --
      C - the footgun of programming languages
    2. Re:overpriced and overhyped by durdur · · Score: 1

      Certainly you can over-engineer.

      But modularity and de-coupling are key to building large scale maintainable systems. Language features like strong typing,
      compile-time checking, exception handling, help too.

      I think the real problem with Perl and its kin are that they're great for single-purpose scripts that just get the job done, but over time the system grows and pretty soon you've got tens of thousands of line of script code and it's a monster.

      There are better languages for big systems like that. But yours is in Perl, so you're stuck. That's why they call it "legacy".

    3. Re:overpriced and overhyped by tjstork · · Score: 1

      See, I don't think MS overextended Vista architecture at all. I think Vista is more like, they reworked a bunch of core stuff but didn't put enough into the user world to make people want to go buy it retail. With that said, I have Vista SP1 on a PC and I think its way better than XP ever was or even could be. It's still no Ubuntu Linux, but then again, you can't blame them for trying!

      --
      This is my sig.
  57. Re:Perl IS /your/ the problem by Anonymous Coward · · Score: 1, Insightful

    It appears that you are yet another Java/PHP fanboy who refuses to acknowledge that there really is an issue with the spaghetti code that Java/PHP coders tend to produce. These types of situations don't occur nearly as often when using Perl. It may be that Java/PHP tends to attract the types of programmers who just like to get the application working and go home, while Perl tends to attract the types of programmers that care more about architecture and maintainability. From my experience, 4 out of 5 Java coders haven't read Design Patterns (err..m.. as if Design patterns are some magic :) .. another design pattern obsessed guy! :) ) while 5 out of 5 Perl coders have. It should be no surprise that Java coders (most of which don't understand CS even if they have a CS degree) tend to write unmaintainable code with no type of architecture in mind.

    Hmm ... I guess it's fixed now! :)

  58. Used for the wrong things by Ptur · · Score: 1

    I only recently started a rant on the SlimDevices forums regarding the fact that they wrote their complete media streaming code in Perl. Sure it's very portable, but because it sucks up 150MB and more when run, it also make is *less* portable as you require heaps of memory to run it, so embedded devices are out.

    Somebody ought to hang the people who try to write whole applications in it. Each tool has its uses.

  59. Awk: clean, C-like language by Rick+Richardson · · Score: 1

    Awk: clean, C-like language, with NO dollar-signs or semicolons on the end.

    Awk is comparable to JavaScript.

    And no OO, either!

  60. How Perl was sold??? by mcalwell · · Score: 1

    I've always understood that Perl has never been sold as a technology to build complete systems with (although it can be done), but as a multi-purpose toolkit with the emphasis on systems administration and systems integration. It's unsurprising if code has developed on an ad-hoc basis.

  61. Hmm.. by OneSmartFellow · · Score: 1

    ... a large amount of badly written and hard-to-maintain Perl code. But I maintain that this isn't directly due to the code being written in Perl

    And I maintain that it is precisely because it was written in Perl, which by its very nature encourages the writing of unreadable (and therefore hard to maintain) code, that you find your code badly written and hard to maintain.

    Serious developers only use Perl as a last resort (like when BASH, sed, and AWK aren't available).

    Twiddle fingers who masterbate over their Perl code are really only interested in ensuring they're unreplaceable.

    P.S. I also agree with the sentiments of another poster who comments upon the failure of Larry Wall to control his evangelical urges. I don't go around peppering my code with satanic verse, or Zionistic clap-trap, and I don't really want to be asaulted by it in other peoples code either.

  62. Why the python tag? by PhilHibbs · · Score: 2, Informative

    The article talks about PHP and Java as the alternatives that these companies are talking about, not python. Why is this tagged as "python" when it has nothing to do with the article? Why not tag it "c" or "ruby" "cobol"? Smells of fanboy to me, and that isn't a good smell.

    1. Re:Why the python tag? by discord5 · · Score: 2, Interesting

      Smells of fanboy to me, and that isn't a good smell.

      Most of the comments here smell like fanboyism, both from the perl camp and the other camps. I like the way articles like this always get 500+ comments in no time eventually ending in language du jour-camp claiming to have a better language with awesome syntax, language of old-camp claiming they can rapidly do things (it's called experience, btw), language-of-non-related-camp chiming in on having better OO-support, and language-of-years-of-training-in-acronyms-camp loudly proclaiming to be dominating the market in acronym.

      Language wars aren't productive. I spent a year in an office with two guys that loved flaming eachother over their favourite language. 3 years later both of them have chosen other languages to go all zaelot about, and I'm so incredibly happy not to have to listen to it all day long.

      But for completeness, I used to use perl a lot in my previous job, mostly for CGIs and quickly hacking together something I'd rather not do in bash. These days I spend a lot of time in java and C++, with every now and then a dash of python. I like to think that each programming language comes with its own mindset, idioms (and idiots) and each has their own advantages and disadvantages. I still use perl for small personal projects or quickly parsing a 200MB textfile and formatting it to another kind of textfile, simply because I can use it to things quickly or because it only needs to be done once.

      Perl may have the elegant look of an infuriated elephant ramming a jeep (depending on the sloppiness of the programmer), but it's helped me do things on so many occasions in a matter of minutes that would take a lot longer in another language that I occasionally grab back to it. I still prefer it over bash for something more complicated than piping a couple of programs, and that will probably not change until it's no longer included in the operating system I will be using then.

      As for all the regex hate on slashdot... I don't really get that. They're incredibly handy for parsing text quickly, but like with all things: if you take it too far you're just asking for trouble. I actually saw someone hack together an XML parser in 3 very complicated regexes, while thinking "That's impressive, but probably a very bad idea". A few days later I saw him throw a hissyfit over XML namespaces and thought "That was a bad idea".

    2. Re:Why the python tag? by Anonymous Coward · · Score: 0

      Why is this tagged as "python"

      Because someone thought that tag was relevant. Python is certainly being discussed, as many people feel it is a good replacement for Perl.

      Why not tag it "c" or "ruby" "cobol"?

      It has already been tagged with "ruby". This makes sense as many people feel Ruby is a good replacement for Perl. Few people feel that C or COBOL are good replacements for Perl, and unsurprisingly those tags are not on the article.

      Smells of fanboy to me, and that isn't a good smell.

      Python is often touted as a good replacement for Perl. It has similar or greater levels of power, a large library of useful modules (perhaps not as large as the awesome CPAN), and most feel it is much more readable. Thus it is relevant to a discussion of replacing Perl.

      Why do you care so much?

    3. Re:Why the python tag? by bill_mcgonigle · · Score: 1

      Why is this tagged as "python" when it has nothing to do with the article?

      Um, yeah, you have to take a blood oath to evangelize python as part of the user agreement. Same as Ubuntu, Starbucks, and turbo diesels.

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
  63. Pearls, Seas, Shells? by cheekyboy · · Score: 1

    I hear a common ocean theme there.

    Perhaps he should have stuck to more C standards when creating that oyster.

    Why in hell didnt he copy at least Cs array declaration of , int var[];

    Was he that short on harddisk space that he thought two chars of [] were more cryptic/space using than a @.

    Sure [] is more cryptic, but more people knew what it meant, so why reinvent a definition. Even pascal was ok.

    A cmd line interpreted javascript, could be well useful as perl or more so.

    Is there a cmd line js 'vm' ? Technically perl is a vm.

    --
    Liberty freedom are no1, not dicks in suits.
    1. Re:Pearls, Seas, Shells? by marcosdumay · · Score: 1

      "Why in hell didnt he copy at least Cs array declaration of , int var[];"

      Because he copied the sh array declaration.

  64. P* approach vs Java by yaslash · · Score: 1

    Perl is an amazing language. It allowed me to design applications without mastering their models. Perl is the language of choice for the explorers. I'm going to buy a Java-based environment for my company. Which includes a *lot* of lines written in... Python. Java is often presented as the kernel language but is finally only an extremely expensive glue in numerous pro applications. To programmers, seriously : please code in Python or other productive languages. We are in 2008. Look at web2py, rails etc. The Javanese begins to tire the managers. Relieve us, you got the tools. Moreover who said that Java was fun ?

    1. Re:P* approach vs Java by VVelox · · Score: 1

      You make it sound like Perl is not a productive language. Use POD and be amazed.

  65. Well, my take on this by hey! · · Score: 1

    I've never seen any other language in which so much good is done by so much bad code.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  66. Re:Perl IS /your/ the problem by Anonymous Coward · · Score: 0

    Design patterns are horribly mis- and over-used by Java coders. In practice, they add verbosity and obfuscation of intent with any increase in clarity or elegance.

    Which is probably why Java coders love them, because these are the same effects most of the language's 'features' have (shoehorning every problem into an object solution, if/switch statements considered bad, etc).

  67. Speaking of VB by crossconnects · · Score: 1

    speaking of VB, I was talking with a guy the other day who had to repair a point of sale system in a deli written in VB with Access on the back end. When he disconnected a router temporarily, the whole system crashed! It was out through the lunch rush. Every cash register had to be rebooted one at a time.

    --
    no big sig
  68. Perl is expensive by smack.addict · · Score: 1

    I love all of this bashing business for not using Perl as if somehow not using a technology that some geeks think is cool matters to business.

    What matters to business is the cost of maintaining a system, and Perl software is generally way too complex to maintain. And that means costly.

    The combined with the fact that companies are moving away from maintaing custom software at all, it is not surprising Perl is on the downswing.

    1. Re:Perl is expensive by VVelox · · Score: 1

      You are making the common ignorant assumption about Perl based some past idiot's bad code.

      If your code is undocumented, uncommented, and hard to read it is obfuscated it means it is bad code. Saying this reflects on the interpreter/compiler is nothing but laziness as the real blame lies with the punk that wrote the mess.

      Regardless of if you have tabs or brackets, code written in a way that is not maintanable is bad code.

    2. Re:Perl is expensive by tb()ne · · Score: 1

      You are making the common ignorant assumption about Perl based some past idiot's bad code.

      And you are making the ignorant assumption that everyone's criticism of Perl is based on a common ignorant assumption. Many of the people criticizing it actually have experience with the language.

      If your code is undocumented, uncommented, and hard to read it is obfuscated it means it is bad code. Saying this reflects on the interpreter/compiler is nothing but laziness as the real blame lies with the punk that wrote the mess.

      Thay may often be the case. But there are also a lot of people that find their own Perl code to be hard to maintain, as opposed to code they wrote in other languages. If they are just bad programmers, why wouldn't they have the same problem with the other languages they use?

      The reality is that different languages encourage programming with different paradigms, styles, and habits. Part of that is due to the language itself and part is often due to the language's history and user-community. I suspect with Perl it is a little of each. But your theories (here and in other posts) that the criticisms of Perl code maintainability are simply due to programmer ignorance/skill or management conspiracies aren't compelling.

    3. Re:Perl is expensive by smack.addict · · Score: 1

      No, I am making an educated judgment based on many years dealing different programming languages and a solid understanding of the programming paradigm on which Perl is based.

      Perl is based on the idea that there are many ways to express the same programming concept. That is a useful philosophy in support of UNIX sys admins that quickly need to hack together scripts to perform various thankless tasks. Funnily enough, that's why Perl was created in the first place.

      However, that is a terrible philosophy for supporting enterprise-level business applications. You see, the problem with have multiple ways to express things means that only experts will fully understand all ways to express things, thus making even well written code difficult for non-experts to maintain unless the chosen programming paradigm matches their thinking. Worse, this philosophy actively encourages poor programming habits.

      I have always said that you have to be an expert Python programmer to write hard to maintain Python code; you have to be an expert Perl programmer to easy to maintain Perl code.

      And that makes all the difference in the world.

  69. description caught from external consultants? by petes_PoV · · Score: 1
    My distinct impression of dealing with "consultancy" firms and 3rd party software suppliers is that they frequently disparage langauges when they have an ulterior motive.

    This can be one or more of the following:

    - They don't have anyone with those skills

    - They want you to pay them to learn a different language, for their own reasons

    - being free, they can't add on huge charges for compilers/tools

    - the competition is hot on that language

    - it would be too easy (if they get paid by the day

    - they are reflecting the biases of your decision maker - in the hope of getting some work

    None of these mean any particular language is bad, just that they have political reasons for bad-mouthing it. Now, if you want a true legacy language try basic and all it's MS "visual" variants"

    --
    politicians are like babies' nappies: they should both be changed regularly and for the same reasons
  70. Time for the "Perl is dying" troll? by ariels · · Score: 0, Flamebait

    Please place all "Perl is dying" trolls below this note.

    --
    2 dashes and a space, or just 2 dashes?
  71. OMG, language holywars again? by TheDarkMaster · · Score: 1

    Into simple words: Any code needs to be easy readable by anyone on team (not just the super-duper "the chosen one" coding guru of ). For example, yours maybe hate BASIC, but anyone can understand what a BASIC-written code does.

    P.S: I really hate regular expressions. Works? Yes, but how to explain what a hell one crazy regular expression line does on your code?

    --
    Religion: The greatest weapon of mass destruction of all time
    1. Re:OMG, language holywars again? by alien_life_form · · Score: 1

      P.S: I really hate regular expressions. Works? Yes, but how to explain what a hell one crazy regular expression line does on your code?

      Ever tried comments? You really should.

    2. Re:OMG, language holywars again? by TheDarkMaster · · Score: 1

      Comments is not enougth for this kind of code (epic background music on)... Needs a lot of "kung-fu", pacience and aspirines to put how the damn code works.

      --
      Religion: The greatest weapon of mass destruction of all time
    3. Re:OMG, language holywars again? by geminidomino · · Score: 1

      P.S: I really hate regular expressions. Works? Yes, but how to explain what a hell one crazy regular expression line does on your code?

      A Ten line comment, of course! :)

      (Disclaimer: I code in Perl.)

    4. Re:OMG, language holywars again? by DragonWriter · · Score: 1

      Into simple words: Any code needs to be easy readable by anyone on team (not just the super-duper "the chosen one" coding guru of ). For example, yours maybe hate BASIC, but anyone can understand what a BASIC-written code does.

      The biggest problem with BASIC is that that is (as people complain of for Perl) mostly true for very small programs and untrue for larger programs in the language, when compared to other programming languages.

  72. PERL by setrops · · Score: 1

    The difficulty with perl is it's not a main language such as JAVA or C. It's most often used for scripts and task automation. Where it previously reigned in web application development, Java, PHP and ASP has taken over those spot.

    In my environment perl coders are as rare as JCL and Assembly coders.

    someone need to write a killer perl application. When you look at some scripts it looks like someone tried to win the obfuscation contests and failed.

  73. Perl in bioinformatics by ewanb · · Score: 2, Interesting

    As someone who has both written and read _alot_ of perl, in particular in Bioperl and Ensembl, in bioinformatics I have a rather love/hate relationship with Perl.

    I love: the low learning curve for people coming from biology, with alot of forgiving behaviour (in particular I think the auto-creation of datastructures as you use notation to fill in complex anonymous - think pointer based - structures). This is probably the critical one which means we can hire a much broader group of people with a much better understanding of biology and for them to be productive far earlier

    I love: the large and robust libraries accessing nearly every sort of database, web-app and other things you need

    I love: the consistency of behaviour between systems (don't get me started on Java or porting C++ code between compilers/library systems. Ugh! unbelievable pain as one starts using those languages and move between high end systems. Its C for the fast stuff and Perl for anything else for portability in my book).

    I love/hate: The (huge) amount of robust existing Perl code that we have in Ensembl and that works day in, day out on multiple outings

    I hate: The lack of clean objects. Why, oh why, oh why?

    I hate: The inability to switch on strong typing and bigger checking optionally in libraries - I know you can do more these days, but it is still clunky.

    I hate: switching the word "continue" (in C) to "next" (it gets me every time)

    I hate: having to always brace if statements

    I hate: operators designed for one-liners that gets in the way of good readable code - grep and map in complex lines are pet hate of mine.

    I hate: the tortorous cross-language capabilities - compare python's jython and other C-level compilers. Soooo much better.

    Interestingly I coded in python for about 6 months in the late 90s - very early on python - and lots python appeals to me. But then Perl came along, and lots of bioinformaticians were using it, and systems people were installing it by default on systems...

    Roll on Parrot. I want Parrot to be able to run
    Perl5 syntax code, Perl6 and Python/Java syntax
    all together, with easy ways to load in C level or compiled down libraries. That's what Perl needs to save it.

    1. Re:Perl in bioinformatics by VVelox · · Score: 1

      Wooho! I think one of the first intelligent things about Perl I have read so far for this thread.

      I don't agree with you on the objects though. I personally love the way they work under Perl. /me hates tabs being mistaken as a good substitute for easy to read brackets.

    2. Re:Perl in bioinformatics by handreach · · Score: 1

      Interesting to see your post here, Ewan. First, I want to thank you for your great contributions to the bioinformatics field, especially your role in the Bioperl project. But secondly, exactly for the same reason, I have to blame you for my current trap in the Perl world nowadays because outside of this narrow bioinformatics field most of the highly paid IT jobs are in Java or C#. Before my last job in Celera, which was 8 years ago, I was a C++/Java programmer and I really didn't like the non-OOP style of the old Perl. But because of the nice OOP structure of BioPerl, I got hooked by it, and currently I spent less time on Java and C++/C# because I have already had a much larger code base in Perl/BioPerl. It's all your fault :)

    3. Re:Perl in bioinformatics by rubycodez · · Score: 1

      I hate the stagnation caused by the Perl 6 "development process", Larry trying to put everything and anything from all other languages. we're thus stuck with Perl 5.x as the only real perl and that is indeed old legacy code. Perl 6 is just an over-complicat rube goldberg contraption.

  74. Perl is a Mutant by Joe_NoOne · · Score: 1

    My problem with Perl is it started out as a replacement for AWK, and became an ungainly monster. As a sysadmin sometimes I find useful utilities that use Perl but then I can spend a LONG time trying to find and [attempt to] compile all the associated libraries (and the depenencies of the associated libraries, etc...). MY GOD, ALL THE STINK'N LIBRARIES...

    And yes, let's not forget all the obfuscated perl code contests (although there are also obfuscated C contests as well).

    I liked perl at first, but it morphed from a scripting language to a programming language and didn't do it all that well. It's a good example of scope creep.

  75. it's not perl... by SuperDre · · Score: 0

    It isn't directly linked to perl only, you can mess up and write hard to maintain code in ANY language. The points he brings up are valid points for a lot of projects that have been maintained over a long period, mostly it starts out as a proper designed project (for that point of time), but later because of a lot of wanted 'features' and with the 'pressure' of having it ready yesterday it has gone stray.. I see it in a lot of projects, and mostly I have to say that it isn't really a bad thing (yeah for some it's a horror), but with current events/managers the software has to be ready by yesterday if you want to stay ahead of your competition.. The advantage ofcourse is that after a while the system has about everything you'll ever need, and especially these days, by that time there's already a new fab/programming system, so you can port(/redesign) it for that new platofrm.. At this moment .NET is the fab (yes I say fab, because everything you ever want to do can still be done perfectly in say Visual studio 6), and we all know that .NET has already had some incarnations...

  76. better choice by kallisti5 · · Score: 1

    When i'm a development manager for a huge spiffy company, my employees will have a choice: Perl or Intercal Take your pick.

  77. Mod parent up by famebait · · Score: 1

    I'm almost sorry I participated in this thread; that is one beauty of a post.

    Good to see someone couple design pattens and languages too. Many really frequently used patterns are IMO really just symptoms of a weaknesses in the language. In fact many of the famous ones were born as emulations of features in smalltalk, but that is a different discussion...

    The meme of 'syntactic sugar' has done untold damage to the progress and productivity of computer languages, but it seems at least parts of the world are now slowly coming to its senses. The entire point of a programming language is to express the logic in a fashion that is readable and understandable by both people and the machine, goddammit!

    --
    sudo ergo sum
  78. They hate us for our freedom by Anonymous Coward · · Score: 0

    Corporates hate perl for the same reason why terrorists hate America: It's free!

    God bless America! God bless Perl!

  79. Not as stupid as it sounds by melonman · · Score: 1

    Business users, of course, don't want nasty old, broken Perl code. They want the shiny new technologies.

    But Larry Wall also says that Perl 5 is old, and, in places, nasty, and there are some aspects that I'd describe as broken.

    Take UTF handling, for example - check out the chapter in the camel book for how simple it isn't. Only this week I fixed an encoding issue by adding 'use bytes' to get UTF8 to render correctly - that is not the sign of mature unicode support. For one project, I taught myself tcl/tk from scratch simply because I knew the unicode would work, where getting unicode to work consistently with perl/tk has Holy Grail status.

    Worse, perl 5 is due to be replaced by perl 6, but who knows when if ever perl 6 will ship in a production-ready form. In the meantime, it would be madness to rework perl 5 code in a more elegant version of perl 5.

    If Larry Wall either shipped perl 6 or said "only joking", perl would become a serious long-term strategy again.

    --
    Virtually serving coffee
    1. Re:Not as stupid as it sounds by Anonymous Coward · · Score: 0

      > Take UTF handling, for example - check out the chapter in the camel book for how simple it isn't

      Yes, because all the other scripting languages have no UTF problems whatsoever...

  80. New book: Python for UNIX/Linux System Admin. by walterbyrd · · Score: 1

    New O'Reily book: "Python for Unix and Linux System Administration" should be out September 2, 2008.

    http://www.amazon.com/Python-Unix-Linux-System-Administration/dp/0596515820/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1219235379&sr=8-1

    Just thought I'd mention it.

  81. Le Idiots by unity100 · · Score: 1

    perl is the language of choice for server scripting on linux.

    its not only gonna be here for a looooong time, it will be almost mandatory if any company chooses to do anything with linux webservers.

    "managers always want the shiny new technologies" - yes, because they dont know any better.

    1. Re:Le Idiots by EvilTwinSkippy · · Score: 1

      In our shop everything is either Bash or Tcl, dude.

      Even the webservers.

      --
      "Learning is not compulsory... neither is survival."
      --Dr.W.Edwards Deming
  82. Easy... by Danathar · · Score: 1

    Anything over a 100 lines (and much under) can be incredibly hard to read for non-authors of the code. Especially if depreciated stuff is being used.

    It's probably why a LOT of people and biz are going to python instead. Reading it does not make your eyes hurt.

  83. oh for petes sake by Anonymous Coward · · Score: 0

    according to your logic, cheesy layout, animated gifs and smileys dominate the web, but I would hardly want to do a big enterprise project using that technology.

  84. Should languages morph beyond their intended use? by walterbyrd · · Score: 1

    I am surprised there is not an object-oriented extension to the bash shell.

    It seems to me that languages often start out with a simple purpose, but as time goes on, the developers of the language try to make that language "all things to all people."

    I don't think perl was originally intended to be an object-oriented application language. I think it was designed as more of a UNIX shell on steroids.

    I wonder if tacked on object-oriented is a good idea in any language?

    Today, you can do sysadmin stuff with php at the cli, but is it a good idea?

  85. Enfant Terrible? by Organic+Brain+Damage · · Score: 1

    Only sissies code in Perl. Real men write only in machine code. If you need more than 10 buttons on your keyboard, you're not doing it properly.

    Seriously, Perl is not the most readable computer language on the planet. Maybe it's better than ... oh well, I can't think of a less readable language at the moment, but I'm sure one exists.

    I love these religous debates on the merits of this or that programming language, O/S, code editor. They're all so much fun.

    1. Re:Enfant Terrible? by Philip+Shaw · · Score: 1
      --
      "A fanatic is one who can't change his mind and won't change the subject."- Winston Churchill
  86. Perl is too open-ended by Evro · · Score: 1

    I am a Perl fan and have written and maintained plenty of Perl in my day, but I find it to be too "free form" for large scale projects (those with more than say 3 developers, with new people joining the project frequently). This isn't a problem with Perl per se, or even actually a problem per se, but it makes it difficult to maintain consistency as the different styles of coding can conflict.

    --
    rooooar
  87. yes it's legacy stuff by jilles · · Score: 1

    Perl had a brief period where it was relatively popular in the mid nineties before php came along and later things like ruby on rails happened. Basically it filled a void between the moment cgi scripting started to get supported on web servers and the moment the first web development oriented tools and languages started to appear (servlets 1997, asp a bit earlier, etc.)

    After that, it has remained relatively impopular/obscure language with few/no obvious advantages over other languages and quite a bit of problems. Awkward syntax (yes it's an opinion but one shared by a lot of people who don't use perl), messy language semantics and unimpressive interpreter performance don't help of course. In all fairness, most scripting languages suffer from the last two problems.

    So, I don't think it would make sense to pick it as a language for a new web application project unless you happen to have legacy perl code to integrate. That makes it a legacy language.

    --

    Jilles
    1. Re:yes it's legacy stuff by amorsen · · Score: 1

      So, I don't think it would make sense to pick it as a language for a new web application project unless you happen to have legacy perl code to integrate. That makes it a legacy language

      Not everything is a web application.

      --
      Finally! A year of moderation! Ready for 2019?
    2. Re:yes it's legacy stuff by jilles · · Score: 1

      True, perl continues to be somewhat popular as one of the many unix scripting languages but hardly the most fashionable one. Lets just say it's not an obvious pick in that domain anymore either. Python seems to have pretty much displaced it there. But it would be a stretch to call it a legacy language there.

      Anyway, the reason I singled out web applications is because that is pretty much the largest application domain for scripting these days and much of the development effort around scripting languages seems to be focused on that. Aside from web apps and unix scripting, perl has not been used for much else.

      --

      Jilles
  88. You are correct sir by Anonymous Coward · · Score: 0

    Perl has no mainstream, normal, people yelling and screaming for it. There's just the older, gruffer programmers and, more likely, sysadmins. Remember how you thought about the 'awk' people 15 years ago? "We have seen the enemy and he is us."

    "Newer" is always better to executives. Python, PHP, and even Ruby are new, hot, better - er. I have to admit, I'd rather create something new in ruby than perl. Obviously, forget asp, flash, silver-something or other.

    The job market sucks people towards newer technologies. Would you want a new job writing perl or ruby code? Which do you think is more likely to help with your next position in 2 years?

    PHP and Python have millions of web sites running. Perl just has a few well known sites (amazon, /., sabre) - although those few probably handle more transactions than all the php and python sites of the world combined.

    The Ruby On Rails guys seem to have the right mix of technology, tools, KISS, training, and front men, if you ask me. The system is the power. Eventually, RoR will scale better and support huge transaction rates within smaller memory footprints, but not yet. The smallest memory I've gotten a Rails/Gem server working will under is 256MB - virtual hosting costs will be higher due to that memory requirement. When I need to upgrade my gems, I have to increase the memory for that VM to 512MB or it gets stuck.

    So, is anyone willing to hire an old perl guy to work on RoR projects? I can learn quickly and I have an interest in the technology. Only $100/hr. -- that's the kicker. I figure some H1-B visa holder will get that job instead of me for $30/hr - I have 20 years of experience writing bulletproof code, not a fresh Associates Degree from India.

    1. Re:You are correct sir by Anonymous+Brave+Guy · · Score: 2, Interesting

      Perl has no mainstream, normal, people yelling and screaming for it. There's just the older, gruffer programmers and, more likely, sysadmins.

      Yeah, the same sorts of idiots who still use UNIX, Emacs, C and Usenet (with that whole snipping and bottom-posting weirdness). Some of them probably even grok Lisp and wasted their time learning prehistoric nonsense like assembly language. Don't even get them started on documentation, or designing code before writing it; if you even mention unit tests, they'll just mumble something about understanding how code works before changing it. What have people like that ever done for the world, anyway?

      You know, one day it would be really funny if these dinosaurs decided to take a sabbatical for a couple of months, all at the same time, and let the younger generation and their high-tech advances run the show for a while. Then management would see how much more effective you can be with a 3D GUI in your OS, a visual IDE, web application frameworks and wikis!

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    2. Re:You are correct sir by GeneralTao · · Score: 1

      YES!!!!!!

      Well done Sir, well done.

      --
      --- Tao
    3. Re:You are correct sir by smittyoneeach · · Score: 1

      So, is anyone willing to hire an old perl guy to work on RoR projects?

      Ah, but can you're having one of dose excerrent Hindi-tinged accents, sir?

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    4. Re:You are correct sir by Anonymous Coward · · Score: 0

      Yes, God forbid, you actually understand the world of computers. You Perl/Java/Ruby/Python morons wouldn't understand how to really program without your hand being held all the time. "What do you mean C doesn't have a library for that? I can't write that myself, I'm a Java weeny."

    5. Re:You are correct sir by Anonymous Coward · · Score: 0

      > You know, one day it would be really funny if these dinosaurs decided
      > to take a sabbatical for a couple of months, all at the same time, and
      > let the younger generation and their high-tech advances run the show for
      > a while. Then management would see how much more effective you can be
      > with a 3D GUI in your OS, a visual IDE, web application frameworks and wikis!

      It's been tried.. and result was Vista.

  89. Dev's growing up... by Uzik2 · · Score: 1

    You're way cool shiny new L33t uber toy is yesterday's news? Sorry man, you got old.

    Development Language choice is almost NEVER for rational reasons. Those few choices that are rational do it for financial reasons.
    Financially speaking there's no good reason to have chosen perl in the first place. It doesn't do anything other
    tools don't do and you have to pay for the learning curve or get locked in to those developers that know it.
    Either way it costs your business money.

    Get over it and learn what people want to pay you to program in. Or fade away. Your choice

    --
    -- Programming with boost is like building a house with lego. It's a cool but I wouldn't want to live in it
  90. Corporate Types by swsuehr · · Score: 1

    I learned long ago not to listen to corporate types if I wanted insight into something technical. It's not Perl that's the problem, it's the corporate types who make decisions with incomplete information and without the qualifications, experience, and knowledge to make informed decisions. They're in over their heads and look for any way to make a decision that makes them look smarter and gives them more influence, while hiding the fact that they haven't a clue.

    I've seen many cases where one influential corporate type who is viewed by other, higher, corporate types as having a clue, will be the one who plants the bug that $language is legacy, inefficient, or otherwise bad. Usually that's not because that person knows his or her stuff, but rather because said person doesn't know anything about $language and wants to promote something he or she knows.

    I've been involved in projects to replace perfectly maintainable code on well-maintained servers that's been running for many, many years with code that runs on somewhat more closed systems and will inevitably need to be upgraded in a never-ending cycle whenever the system vendor changes their paradigm and architecture. All because one corporate type had undue influence and the people higher in the chain, who won't be around for the next 10 years, want to show they're doing something and justifying their multi-million dollar IT budgets.

    As others have pointed out, I too have seen plenty of unmaintainable code in every language. It's not the language that's at fault, and I might even argue that sometimes it's not even the individual programmer's fault but rather the fault of someone or some process that called for the program to be written in 3 hours just so that a project manager could hit their deliverable date. In the corporate world, my experience is that bad code comes more from bad processes than it does from bad programmers.

  91. Yes, use PHP, I've never seen poorly written PHP by croftj · · Score: 1

    yep, that does sound like the solution to the problem Re-write the code in PHP or Java. They can't be written poorly due to their supperior design. NOT!

    Sheesh... Perl a good language, I like it. I dread writting another web page in it myself.

    Php is no better. It is just the cat gutted from the other direction.

    Java is maybe, if it wasn't such a anal language.

      I've been playing with WT (http://www.webtoolkit.eu/wt) which is C++ based. With it I get to write almost entirely in C++, it generates the Javascript, HTML and CSS. I need to only know a little HTLM, CSS and Javascript (if any) to make a nice AJAX page.

    --
    -- Many men would appreciate a woman's mind more if they could fondle it
  92. function9 by Anonymous Coward · · Score: 0

    I am so done with all scripting languages. The old advantages of Perl - regex and quick development no longer hold true. Every major language has regex and any decent ide allows for quick development turn around. If it is worth doing it is worth compiling.

  93. There's more than one way to do it... by Eskarel · · Score: 1
    That's pretty much exactly what causes it.

    Pretty much any language can be obfuscated, pretty much any program can be badly written. However it's harder to write really obfuscated code in some languages.

    It's very easy for people who don't know much Perl to write really complicated code, doing the same thing in a more structured language(php, c, java) is much harder.

    You can create some pretty awful code, but making code which is really difficult to understand involves either a really large program or a really skilled programmer.

  94. Welcome to the "Lotus Notes Predicament" by Anonymous Coward · · Score: 0

    "Hey, wait! Business people now think our language/tool is old and crappy because developers who only know the 'new and shiny language/tool' (or just need to sell some of it to make their quota) have gotten the business users to call our language 'old and crappy'. Our language/tool is not old or crappy. Why do business users think they know better?"

    Welcome to the club! This has been happening to Lotus Notes for years and it has been caused by many many developers, some of which hang out on this site.

    Lotus Notes is not email, it is a development environment and one that is still unequaled today for the combination of rapid development, reliability, functionality, cost, standards support and security. The problem is it is so easy to use that it gets used like a toy and badly coded/architected solutions get produced and, thus, its reputation gets tarnished not by the product, but by the developers who do no think they need to be professional. Sound familiar?

    However, I have heard from absolutely non-technical people that Lotus Notes is 'old and crappy'. Gee, I wonder where they got that idea from? (Hint: Take a good look at the posts that will follow mine.)

  95. If only it were true... by argent · · Score: 1

    In my opinion Perl is still too often listed on Monster and other job sites. It's an ugly, messy language designed by a linguist with an unfortunate idea that the fact that you call something a "programming language" means it should work like a human language.

    Unfortunately the popular alternatives are not a whole lot better. But it's probably best if I stopped now, lest I be here all day.

  96. The Real Reason by jalefkowit · · Score: 2, Insightful

    ... is Perl6.

    "Corporates" hate investing in technology that appears to be on the verge of being made obsolete. Obsolescence means rewrites, and rewrites cost money. They would prefer to wait for the new version and just build with that.

    Usually this isn't a problem since the wait between announcement of a new version and release is a couple years at most. But Perl6 has been threatening to obsolete Perl 5 for nearly a decade now, without actually ever materializing. That's scary for "corporates" because they can't plan their Perl6 migration. All they know is that at some undefined point in the future, they're going to have to do it, or move to another language altogether -- and in the meantime, every line of Perl they pay for is just adding to the potential future liability.

    I know we'll hear from Perlistas that Perl6 is awesome, and for all I know it may turn out that way. But for years now all it has done is inject uncertainty into the case for using Perl, and uncertainty is something "corporates" try to minimize, for good reasons.

    1. Re:The Real Reason by chromatic · · Score: 1

      [Perl 6] has been threatening to obsolete Perl 5 for nearly a decade now, without actually ever materializing.

      We released a new version of Rakudo (Perl 6 on Parrot) only yesterday, just as we do on the third Tuesday of every month.

  97. Also : Perl Medic and Perl Testing by oneiros27 · · Score: 1

    If you're giving the situation of trying to deal with older code, I'd also recommend Perl Medic: Transforming Legacy Code by Peter J. Scott. It has advice for dealing with existing code of questionable quality, rather than the case of writing good code from the beginning. (in the case of dealing with existing code, I'd actually recommend it before Higher Order Perl and possibly Perl Best Practices -- I've never read the other two you mentioned, so can't gauge their relative usefulness).

    Another book that might be useful is Perl Testing: A Developer's Notebook by Ian Langworth and chromatic, so that you can write better test suites to determine what you're breaking as you update the code.

    --
    Build it, and they will come^Hplain.
  98. No one's mentioned this old ESR article yet? by sgtrock · · Score: 2, Informative

    He describes quite succinctly why he moved away from Perl back around 2000:

    ...Writing these programs left me progressively less satisfied with Perl. Larger project size seemed to magnify some of Perl's annoyances into serious, continuing problems. The syntax that had seemed merely eccentric at a hundred lines began to seem like a nigh-impenetrable hedge of thorns at a thousand. "More than one way to do it" lent flavor and expressiveness at a small scale, but made it significantly harder to maintain consistent style across a wider code base. And many of the features that were later patched into Perl to address the complexity-control needs of bigger programs (objects, lexical scoping, "use strict", etc.) had a fragile, jerry-rigged feel about them.

    These problems combined to make large volumes of Perl code seem unreasonably difficult to read and grasp as a whole after only a few days' absence. Also, I found I was spending more and more time wrestling with artifacts of the language rather than my application problems. And, most damning of all, the resulting code was ugly--this matters. Ugly programs are like ugly suspension bridges: they're much more liable to collapse than pretty ones, because the way humans (especially engineer-humans) perceive beauty is intimately related to our ability to process and understand complexity. A language that makes it hard to write elegant code makes it hard to write good code.

    With a baseline of two dozen languages under my belt, I could detect all the telltale signs of a language design that had been pushed to the edge of its functional envelope. By mid-1997, I was thinking "there has to be a better way" and began casting about for a more elegant scripting language.

    The rest of the essay can be found here.

    1. Re:No one's mentioned this old ESR article yet? by mvdwege · · Score: 1

      Ah, ESR. The man who spends so much time on writing config file parsers that he forgets such subtle things as, well, the actual problem his application is trying to solve. Or basic security best practices. Seriously, have you forgotten the debacle that was his attempt to rewrite the kernel config system? Or the many security flaws in fetchmail? Or the various ways fetchmail could unexpectedly mangle your mail? Or the backscatter issue that still isn't solved?

      ESR is a pontificating blowhard, who has managed to write a few mediocre utilities, and built a reputation on his own proclamations of genius. Not a man I'd take programming advice from.

      Mart

      --
      "I know I will be modded down for this": where's the option '-1, Asking for it'?
  99. Easier to blame a language by olddotter · · Score: 1

    Its easier to blame the language that it is to hold people accountable for writing good code. There are two reasons for this:

    1) Business types don't seem to know there is a difference between good code or bad code.

    2) It would cost more to hire people to write good code. Better to switch to new language every 5 to 10 years and blame the old one for problems that could be solved with better hiring practices and code development over sight.

  100. Mandatory joke by Anonymous Coward · · Score: 0

    Perl -- The write-only language

  101. hard to read just means poorly designed or written by petes_PoV · · Score: 1
    Any language can produce source that's difficult to follow - if the author is not experienced (and I don't just mean capable of producing working product, when I say experienced).

    If that's really your main problem, then it's very simply solved: just get a formatting tool, there are plenty out there - some are even quite good. However, all they'll do is give you pretty-printable files. The underlying structure of the code and the writer's thought process can still be messy and no language will solve that problem.

    --
    politicians are like babies' nappies: they should both be changed regularly and for the same reasons
  102. You can write bad code in anything by Giant+Electronic+Bra · · Score: 1

    And if you put bad coders on a project, or even if you give reasonably good coders insufficient support and have a poor process, you will likely get bad code as a result. It matters not if the code is written in Perl, Python, PHP, Ruby, or whatever your language de jour happens to be.

    Perl is a perfectly good programming language. Personally I've written/been lead developer for several multi-hundred-thousand line perl web apps. Our code was perfectly clean and intelligible and quite maintainable.

    CPAN is also a great resource, and frankly I haven't seen where any of the other dynamic scripting languages has anything similar that provides the breadth and depth of library functionality.

    Some may say perl is 'dead', but it is sure alive and well in this neck of the woods and doing just fine, and nobody around here sees any pressing need to replace it with anything else. I can't think of a single language feature perl lacks or any other issue that would make me want to switch in particular. My feeling is it is a crying shame the scripting language community has balkanized itself so much, and a real crying shame we got that turkey javascript foisted on us. Far better would it have been if Netscape had just embedded perl instead of believing they could (and failing to) do better.

    --
    "Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
  103. Perl for Test Automation + Sys Admin Jobs by Anonymous Coward · · Score: 0

    As a manager, if he opts to get the IT systems developed in Perl, he is one of the stupidest guy. Perl is best suited for in-house test Automation [Microsoft Visual Studio Compilers Use this Env] + Many Other Vendors in the Industry where I have worked.

    Other than that I have seen only Sys Admins using it. It is not true any more that mason or Perl is being used @ Amazon as they have more of C++ and Java code for their core operations.

  104. I hope you're not doing that manually? by Medievalist · · Score: 2, Informative

    I use gawk (Gnu Awk) for that job. It's the best tool I've found for rapidly re-writing hundreds of source code files on a running production system.

    Arnold Robbins: "AWK is a language similar to PERL, only considerably more elegant."
    Larry Wall, from audience: "Hey!"

    find \corp\perl -type f -name \*.pl -exec fixbug.awk {} \;

    Better be sure you know what you're doing before you press the button, though! I recommend building a cloned test environment.

  105. Nah, bad software engineering is the problem by Giant+Electronic+Bra · · Score: 1

    If you blame your lousy code on the language, then you don't understand software engineering.

    There are just as many crappy programs written in PHP, Python, etc as there are in perl, and you can make just as big a mess in any of them, trust me, I've seen it all in 25 years in this business.

    Perl is actually a very elegantly designed language. Any decent team of programmers should have no more trouble designing and building a solution using perl than they would in any other scripting language.

    The funniest thing about the perl bashing is that practically every concept now in vogue existed in perl LONG before it was adopted elsewhere.

    CPAN, built in unit test and install harnesses, standardized embedded documentation. Show me a repository of libraries that is overall as consistently and well documented as CPAN, or anything near as comprehensive. Every other language out there has imitated perl and its related facilities.

    Personally I have nothing against other scripting languages, but IMHO it is just redundancy. They aren't any better than their grandpappy The Camel!

    --
    "Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
  106. No two Perl writers use the same langauge. by readin · · Score: 1

    You can write good code in pretty much any language, and you can write bad code in pretty much any language. Perl makes it hard to write good code and easy to write bad code.

    Worse, Perl has so many syntactical features and shortcuts that aside from the experts, no two people know the same Perl language. People know enough of a subset of Perl to write what they need to, but when they have to read other people's code the syntax is tough to decipher. In a simpler language like Java were the tricks are in the libraries rather than the syntax. This makes some behaviors less elegant to program, but the new person can easily look up the class or function name. Syntax can be much harder to look up, particularly when it is one of the "assumed" values like $_ which you can't look up because it doesn't even appear!

    Perl is a great tool for short scripts, particularly if the script will be thrown away after use. It's not a good choice for a large project. If you get the right mix of people, you could make the project succeed with Perl - that's true of most languages - but that doesn't make it a good choice in general.

    --
    I often don't like the choices people make, but I like the fact that people make choices. That's why I'm a conservative.
  107. Peril by Wyck · · Score: 1

    Oh "Perl"! We thought you said "peril" so we opted out, just to be safe.

  108. Perl is good for processing text by Dan667 · · Score: 1

    Interesting to see Perl comparisons to C# or other languages that I would not consider to be replacements. I have always thought about software languages like tools in the toolbox and perl has always been a good language for processing text. If people are trying to use it for cad or who knows what else I have no sympathy for them. I have seen poorly written programs in every language and perl's text processing power puts it on par with doing stupid things in ANSI c pointers if you don't know what you are doing. You are never going to have power and idiot proof coding in the same language without sacrificing speed, leaky abstractions (look that up) or something else.

  109. They don't hate PERL... by Haralampi · · Score: 1

    I don't think they hate Perl. And business people don't really care what technology was used to create the apps they are using. Companies just prefer to stay away from it for a number of reasons:

    1) Perl is a write-only-language! Granted, it is powerful. You can build complex constructs in an elegant (to the sophisticated mind) and concise way, that's true. However it's powerful syntax is also its demise. It is extremely ugly and difficult to read, therefore it is very hard to support. Only the original developer (provided he/she is a real guru) can support a large system written in Perl. And we all know that the original developer is never there when you need him ;-)

    2) There has been a significant shift over the last 20 years from UNIX-based development to Windows-based development. In search of productivity people started to use tool-based dev environments, visual IDEs, etc. Perl is associated with UNIX and it is perceived as something from the past by the new generation of IT people (that came out in the 90s and later).

    3) Because of (1) and (2) not many people nowadays bother to learn Perl. It is hard to find people with ANY Perl knowledge, and real experts are even harder to find. So if you are a business man, and you have to make a decision on the tech platform for your next big project, would you choose Perl knowing that it will be extremely difficult to find workers with the appropriate skill set? I think not.

  110. Spot the syntax error in the above by rnturn · · Score: 1

    (I don't think it matters whether you're conversant in Perl, C, or whatever.)
    :-D

    --
    CUR ALLOC 20195.....5804M
    1. Re:Spot the syntax error in the above by Spatial · · Score: 1

      I know... I forgot to post in plaintext mode, so the less-than sign got removed as HTML. I forgot the semicolon at the end of the statement too. :( Fail.

  111. Golden Hammers by Martin+Spamer · · Score: 1

    The problem is not PERL but the 'legacy' attitude that PERL was a Golden Hammer capable of solving every problem for the company, now the company has a new Golden Hammer and it will suffer with the same problem again in the future, probably well before it's replace all that PERL.

    However that same 'legacy' attitude shows clearly in the blogger's mind as much as the original company; which is why he is upset that his hammer is getting tarnished.

    The real legacy issue here is the language wars, dogma and rhetoric and the 'legacy' attitude that there is one tool for all jobs.

  112. Perl is dead by wardk · · Score: 1

    Of course Perl isn't dead.

    so what if some bozo in a suit calls something "legacy"

    "legacy" is simply any application that's in pure maintenance mode. hell, in some cases, legacy is simply a reference to an application that's no longer sporting that new code smell. Legacy is also simply a term to disparage, based on nothing other than the speakers opinions.

    Lets see management CHANGE that code. that costs money. and working legacy code is much cheaper than writing a new system.

    At my company, a VERY large one with an IT shop of thousands....the Python dudes won a culture war against the Perl dudes (and VB dumbasses, Korn dudes and others) and mandated that no more new Perl would be written, as Python was the new Grail. Lets see, that was about 5 years ago, and that same group begrudgingly had to approve Komodo purchases to "do perl" about 3 months ago.

    yeah, they whined, they stonewalled, they demanded, but in the end, we just kept writing in Perl. with full management support.

    because when the rubber hits the road, most front line IT managers are not complete idiots, and when presented with a whopping estimate to do essentially "busy work", even the most determined IT suit will capitulate to reason.

    They may as well dictate the friggin' Weather as mandate all code in X be rewritten in Y (especially when X works perfectly fine)

  113. Re: use strict by rnturn · · Score: 1

    Hear hear!

    I used to rarely use "use strict" when I first began writing Perl years ago. Then, as I got to where the scripts got larger and used for more complex tasks, "use strict" got to be a habit. Nowadays I have a standard Perl skeleton that includes the shebang line, a header that I fill in describing what the script is used for (along with the RCS log, etc.), and "use strict". I might skip that directive for a quick-n-dirty script that I don't expect to use for more than a one-off task but it's funny how those scripts tend to get kept and reused. Once that happens, a "use strict" get inserted and I clean up the errors before doing anything else with it.

    Writing obfuscated Perl (or any programming language for that matter) is a choice, not a requirement. If the code isn't easy to understand, I think it reflects more on the programmer than the language s/he used.

    --
    CUR ALLOC 20195.....5804M
  114. SW Dev new HR: it's a turf thing. by JayGuerette · · Score: 1

    Post dot-com-boom, companies wanted IT people to wear more hats: "We can get the same work done with fewer people! Wanted: Senior Oracle DBA; must know VBScript and Cisco VPN concentrators."

    It mostly worked. The people running the infrastructure, who had intimate knowledge of the technology, were able to deliver applications & services that not only worked, but worked well. No committees & no politics; things just got done.

    Code was written by people who understood the fundamentals of what needed to happen. Not by I-have-this-friend contractors, or my-friends-son-needs-a-job software developers, but by smart & deeply technical people.

    These people weren't software developers. They wrote code using the tools at hand. By necessity: free tools. The code was developed in production. The phrase "But it worked on my desktop!" was never heard.

    I'm not defending the practice, or suggesting that it's better. These people are writing code that someone else should have written, or to replace code that should have written vastly better. If you haven't done it; you've been sorely tempted.

    Development can't use the tools the "hackers" used. They don't even want to discuss it; they're on their way to a meeting to try out some new buzzwords. They have budgets to justify and friends & relative to employ.

    When my company needed an ISAPI to support a new architecture, I wrote it in C, in 2 days, and it's been running flawlessly for 4 years on 600+ servers. Now there's a need for another, similar, ISAPI, but this time we're going to do it "properly". Development has been working on it for 3 months, mumbles a lot about ".NET", and uses the phrase "But it worked on my desktop!" even more.

  115. Perl Sucks by Anonymous Coward · · Score: 0

    "Its because the Perl code has developed piecemeal over the last ten or so years in an environment where there was no design authority"

    Who cares why? Perl sucks. Most newer coders aren't learning it because it's a PITA all around. From setting it up cgi-binish, to no nice frameworks. Every time I have to deal with something in perl it's jacked up - every time, every single time.

    I wish it would go away, there are so many better options in this day and age.

    Perl _led_ way to some great things, but now it's time for it to just go away. There is little gain, and lots of headache to the language these days.

    Learn Ruby or Python and come along into the 21st century.

    1. Re:Perl Sucks by mr_mischief · · Score: 1

      Have you ever heard of Moose, Catalyst, Jifty, CGI::Application, TemplateToolkit, DBIx::Class, Class::DBI, or Rose::DB?

  116. MOD UP by $RANDOMLUSER · · Score: 2, Interesting

    The parent post is genius.
    He only forgot the part about how when the bridge is halfway built, they come back and say:

    "We need the bridge to be at a different location on the river (enen though we didn't specify one in the first place)."
    OR
    "We see you're building a suspension bridge - we need it to be an arch bridge."

    "Oh, and by the way, your materials budget and deadline haven't changed."

    --
    No folly is more costly than the folly of intolerant idealism. - Winston Churchill
    1. Re:MOD UP by -+r · · Score: 1

      and also forgotten;

      'that is metric, right ?' (hello, nasa...)

      --
      - r
  117. actually, by toby · · Score: 1

    Edsger W. Dijkstra nailed it long ago with his assertion that a line of code is a liability, not an asset. (paraphrased from the original essay)

    Gates has also been quoted as saying, "There's only really one metric to me for future software development, which is - do you write less code to get the same thing done?"

    This is probably the only thing Gates and I will ever agree upon.

    --
    you had me at #!
  118. It's spelled however you want. by Medievalist · · Score: 1

    It's Occam's razor for Pete's sake

    William of Ockham (1287-1347) lived well before the standardization of spelling, although he did indeed hie from the town of Ockham.

    "Entia non sunt multiplicanda sine necessitate."

    1. Re:It's spelled however you want. by heffrey · · Score: 1

      Yeah, it turns out I'm a complete dork and didn't check my facts before posting my smarty pants comment. Mea culpa.

      Anyway, I think Occam is the more common spelling but Ockham is certainly in common use too.

      That will teach me.

  119. --parent; --parent; by toby · · Score: 1

    Fact that there is to much f*cked up perl code, shows that it is an inferior language.

    How did this garbage ever get modded up.

    --
    you had me at #!
  120. State of Denial by Bob+Uhl · · Score: 1

    I don't deny at all that this company (like many others) has a large amount of badly written and hard to maintain Perl code. But I maintain that this isn't directly due to the code being written in Perl.

    That's simply being in a state of denial. Yes, it is possible to right relatively maintainable and legible code in Perl--but that's relative to other Perl code. And yes, the best Perl will be better than the worst PHP or Java (but that's mostly because PHP is like Perl, and Java is in many respects worse).

    The worst Perl is worse than the worst of any other language with the possible exception of APL. That's fairly undeniable; anyone who has seen one of the four-line RSA engine .sigs knows what I mean. TMTOWTDI looks like a great idea until one realises that it often means that one man's idiomata are unrecognisable to another. The assumed values mean that data can be operated on without even being mentioned.

    Middle-grade Perl is not bad, but it is simply not as clean and legible as, say, Python, Lisp, Ruby or in some cases perhaps Java (although modern Java is trying very hard to be uglier than Perl).

    Perl was a great language when we were all used to awk and ksh. There's really no non-legacy (and I include the wonderful CPAN under that heading) reason to use it nowadays though.

    I think Ruby has some of Perl's problems, but it seems to be in other ways pretty decent. Right now my favourite scripting/web language is Python and my favourite language in general is Lisp.

    1. Re:State of Denial by melonman · · Score: 1

      Middle-grade Perl is not bad, but it is simply not as clean and legible as, say, Python, Lisp, Ruby or in some cases perhaps Java (although modern Java is trying very hard to be uglier than Perl).

      I moved to perl having written a lot of Lisp, and I can't say that reduced legibility has ever been my concern. Lisp can be totally opaque, especially when you end up with 30 closing parentheses for a relatively short function. And I worked with a guy who wrote Fortran in Lisp, which is considerably worse to read than Fortran in Fortran. For most applications, code that generates and modifies code is the ultimate obfuscation, and, historically, that's at the very heart of Lisp's lambda expressions.

      Perl was a great language when we were all used to awk and ksh. There's really no non-legacy (and I include the wonderful CPAN under that heading) reason to use it nowadays though.

      Some of the reasons include

      • It's still blindingly fast - as fast or faster than non-optimised C in some cases and much faster than other scripting languages in many cases
      • CPAN - there's a tested library to do pretty much anything relating to sys admin and/or websites, plus a simple way to install and update them.
      • Superlative support from Apache - cf the enduring mess that is suEXEC for PHP
      • Backwards compatibility - not a legacy issue when you look at the way every subversion of PHP breaks compatibility with code that in some cases is only months old.

      For a current project I tried hard to talk myself back into Lisp, but gave up when I failed to find support for namespaced XML (yes yes, XML is an ugly s-expression, but try telling that to the software I need to interface with), any sane way to plug it into a production web server, or any agreement on which version of Lisp we should all be running this week. I loved the Lisp machine I programmed for a year, but it's the past - far more so than perl.

      --
      Virtually serving coffee
    2. Re:State of Denial by man_ls · · Score: 1

      I've been in the field and on this site for a long time, and I haven't the slightest idea what "TMTOWTDI" represents. That's one hell of an abbreviation.

    3. Re:State of Denial by Anonymous Coward · · Score: 0

      There Is More Than One Way To Do It.

  121. Problem's been misidentified by 93+Escort+Wagon · · Score: 1

    I suspect these truly are legacy systems, and the real issue is the programmers. There are a lot of sysadmin types that know perl inside and out, but don't understand how to make a user-friendly web interface (I work with a couple of these folks).

    Perl can be used to make visually snazzy, up-to-date web systems just as well as any other language - you just have to understand the web end as well as you understand perl.

    --
    #DeleteChrome
  122. Perl OO is perfectly good by Giant+Electronic+Bra · · Score: 1

    In fact it is quite an elegant implementation which can provide practically any imaginable OO feature anyone could ever want.

    bless($self,$package);

    The ENTIRETY of perl OO syntax and it manages to encompass all the hoohaa that requires a bizillion tons of features in other languages.

    The beauty of perl OO is you are NOT put into a straightjacket by it, and things like reflection, introspection, AOP, etc are just plain dirt simple. Just check out Conway's book if you doubt.

    Beyond that there are simply things you can do with OO perl you would be hard pressed at best to do in other scripting languages. I'll take perl's implementation of OO any time. It rocks.

    --
    "Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
    1. Re:Perl OO is perfectly good by oliderid · · Score: 1

      The beauty of perl OO is you are NOT put into a straightjacket by it

      Well I agree, flexibility is the perl best asset... I'm sure that it is beautiful...Well thought and all. But I learnt Java, C#, PHP intensively, Python to some extents and the great things about these languages is that I don't start from scratch. I know what a class is, what an interface, what abstract means, etc. You see very basic things.They all use approximatly the same syntax for any OO related feature.

      With Perl? This is a totally different syntax, a different concept with a totally different technical slang (bless...I needed hours to understand it the first time I saw it...and days to understand how to create a singleton). I'm sure that OO PHP5 is less powerful than OO Perl, but learning it is so natural, you don't even need a book if you have already programmed in objects.

    2. Re:Perl OO is perfectly good by Giant+Electronic+Bra · · Score: 1

      Hmmm. Well, it seemed perfectly straightforward to me when I picked it up. I mean making a singleton in perl is the same as any other OO language, in the package your constructor just returns a reference to a static instance, or creates one if it doesn't exist yet. I don't know how it works in say Python, but I am guessing it is pretty much the same. It certainly isn't different from say Java, save for the lack of threading issues...

      Speaking for myself I'm not convinced that bless() is all that cryptic. Certainly doesn't seem moreso to me than various features of other languages. Personally I find PHP's OO capabilities to be pretty limited compared to perl's. Maybe it takes a small investment of time to fully understand them at first, but it hardly seems excessive to me, and given that other things become much easier later on because of it one could counter argue that in the long run it is simpler and can improve code maintainability.

      --
      "Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
  123. Tcl! by sergiol · · Score: 1

    Tcl! Tcl! Tcl!

  124. Re:Should languages morph beyond their intended us by alien_life_form · · Score: 1

    I wonder if tacked on object-oriented is a good idea in any language?

    Like Javascript, you mean?

    Today, you can do sysadmin stuff with php at the cli, but is it a good idea?

    Not really.

  125. Is Corporates a real word? by Anonymous Coward · · Score: 0

    Is Corporates a real word?

  126. Luckily we use something else by Anonymous Coward · · Score: 0

    I'm primarily a Java developer for a large Corp and wouldn't you know it that after 5 years and some 200 + developers touching the code it is...... hard to maintain and a big_ball_of_mud.

    Perhaps the mentality of the developers at the time of the project creation are to be considered? Perl typically is used as the excellent Swiss Army Knife that it is to do scripting and then wouldn't you know it the app gets more and more requirements. So the original developer didn't know, didn't care about, didn't need to know about good programming principles to get the job done and then people bitch in retrospect.

    Chances are the original design fit the need for what the business was willing to pay for and provide requirements for at the time.

  127. The Problem isn't Perl by I_redwolf · · Score: 1

    The problem isn't really Perl. The problem is that Perl was used to create applications that aren't maintainable. That combined with the fact that Perl allows any programmer to do anything and you end up with a confused mess. This is not to say I haven't seen some decently coded Perl applications, but they are few and far between. That goes for most any language but even more so with Perl as people have consistently tried to do things in Perl it wasn't meant for.

    You end up with codebases that try for OO in syntax alone, poorly and wildly differing formatted code, race conditions, etc etc. Part of this is design but the bigger issue is that Perl wasn't designed originally for that space.

    Unless you have a team dedicated explicitly to X version of Perl with X modules and classes and that have a strong structure and background in best programming practices. Any Perl application will turn into a nightmare; more quickly than any other language.

    All of the above combined with the fact that web frameworks in general are non existent for Perl. As it was used literally as glue language (a space between Shell and C), and if you needed a framework; you built your own, which is usually a mistake because you NEED strong OO in a web framework. After going through that exercise it's obvious why all of the strongly based OO languages picked up frameworks much faster than Perl.

  128. It's Management by g0bshiTe · · Score: 1

    They have to have it explained in costs.

    You have to defend why the use of the existing Perl code, is cheaper to maintain, then rewriting everything in the new language of the month.

    --
    I am Bennett Haselton! I am Bennett Haselton!
  129. Actual Perl code is very stable by GNUPublicLicense · · Score: 1

    Indeed its code is such a macro hell, and so complex and so huge that "almost" nobody dares to clean its code base. But if there is a bug, BOOM!
    C and only C for GNU/Linux or die

  130. Blame the coders, not the language by jjohn · · Score: 2, Insightful

    You can infer from the low UID of my account that I've seen one or two of these "perl sucks" kinds of articles. There's a flamewar. There's mention of python or ruby or C or java. There's the old saw "perl is too complex", "perl doesn't have an IDE", "perl is line noise". But it takes awhile before someone just calls it right: there's a lot of bad perl code because there's a lot of bad perl programmers.

    That's not a knock on Perl.

    Perl is powerful enough that even crappy programmers can do useful work. That's saying something positive about the design of Perl. That Perl allows bad code also says something positive about the design: it's not a fascist regime.

    Now, if you need your language design to prevent the creation of unmanageable code, you'll be looking for the language for a very long time.

    So next time we start this thread about Perl being bad, let's just skip to lambasting the crappy coders and leave Perl out of it please.

    1. Re:Blame the coders, not the language by geekoid · · Score: 1

      Except the language lends it's self to being able to write crap code.

      "Perl is powerful enough that even crappy programmers can do useful work. "
      That's true with VB, C++, .Net, JAVA.Not really an arguement in favor or against. .Net and Java make it more difficult to write In Perl you can ust write hard to read obscure Code. In Jave amd .Net you ahve to work at it.

      I'm not talking about bad logic here, I am talking about readability and maintainability.

      Bad logic, too much indirection, obscure class/ function names is a problem as well.

      --
      The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
  131. Any language can be made a nightmare. by suck_burners_rice · · Score: 1

    Your corporate bosses need to be educated about the maintainability of Perl code versus other languages. So show them the winner of one year's obfuscated C code contest and tell them this language is the latest rage in the software community. Then show them an equally short snippet of Perl code that is written for visual attractiveness and ease of maintenance and explain that this is Perl. It doesn't take a great genius, or even a programmer, to see than clean Perl code is more maintainable than obfuscated C code. Clearly, the Perl is better because it is more readable and maintainable than some obfuscated C code. Once they agree, show them the winner of the obfuscated Perl contest. Then explain once again that the language is not related in any way to how good or bad the code is. It has everything to do with the programmer and nothing to do with the language. So if the latest rage is language X, you can turn that into a nightmare, too.

    O'Reilly is selling zillions of Perl programming books. Every bookstore with one shelf of computer books has something about Perl. Obviously, it's not a long-lost forgotten language.

    --
    McCain/Palin '08. Now THAT's hope and change!
  132. Python FTW by Anonymous Coward · · Score: 0

    Somebody needs to say it short and simple: Python, for the win!

  133. Of course not by munch117 · · Score: 1

    I highly recommend The Daily WTF?. Perl does NOT get a disproportionally large representation there.

    An incomprehensible Perl program is a "dog bites man" story.

  134. Re:Why not Python? (and other cliches) by Anonymous Coward · · Score: 0

    What's the matter, bored with arguing why emacs is better than vi or vice versa? See August 1999 on python-list's archives for your exact question. If only you folks could have waited one more year, this could have been a commemoration of the 10 year anniversary. Actually, if you do go look up that thread, read this one instead, it's not nearly so stupid, just the opposite: Tom Christiansen compares Perl and Python

  135. Perl is still loved by some corporations by talexb · · Score: 1

    I'm fortunate enough to work somewhere that is still very happy with Perl. Yes, there are reams of very old, very poor quality Perl code, as described by the Fine Article, but there are also a few nuggets of newer, shinier Perl, and we've added two really good Perl developers to staff recently.

    It's amusing that the excuses not use Perl go from "There are no developers" to "It's old technology" -- Perl developers may be hard to find, but in this market (Toronto) it appears it's because they're valuable. And old technology doesn't mean 'out of date' -- to my mind, it means 'seasoned' or 'proven'.

    Perl is still a viable development tool -- the community and the language are alive and healthy, whether or not the suits like it. And you can write bad, out-dated code in any language, including Perl. Sometimes the suits and the HR department don't get that.

  136. This is not even news by Anonymous Coward · · Score: 0

    Perl has been notorious for being hard to maintain since its creation. The thousands of cute syntax features, which any given developer might know about 50, are the cause of this problem.

    If you want to use a junky weakly typed language, where you can write the same block of code ten million ways... use PHP. Do not be surprised when that is thrown in the junk pile also.

    Spend some extra 50 hours of your life learning an enterprise oriented language such as java, M$ .NET if you are concerned about job security.

  137. Visual cues by fyngyrz · · Score: 3, Interesting

    I think if I show someone perl code, and then show them python code, they're going to feel a lot more comfortable with python. Perl's $, %, and @ variable prefixes, file i/o weirdness (print $_) and other way-too-shorthands are seriously intimidating and foreign looking as compared to python. Python's regular, sensible indentation makes an impression of regularity and comprehensibility as well. Python's just a cleaner technology by nature. You can make Perl look pretty good, but you have to work at it.

    I know I'm a lot more comfortable with Python, and I wrote in Perl for many years. Basically until I discovered Python, then that was the end of Perl for me. :)

    Just a thought.

    --
    I've fallen off your lawn, and I can't get up.
    1. Re:Visual cues by fyngyrz · · Score: 1

      Arghh sorry, I misedited that and can't fix it now. For python file i/o, I meant to show "$| = 1" to flush. My cutting got ahead of my pasting, or something.

      --
      I've fallen off your lawn, and I can't get up.
    2. Re:Visual cues by Wowlapalooza · · Score: 0

      Python has an indentation regime built into the language syntax, Perl does not. If your only differentiator is "Python looks cleaner", then feel free to enforce strict indentation standards in your development environment. That doesn't seem like a sufficient reason to pick one language over the other.

    3. Re:Visual cues by Anonymous Coward · · Score: 0

      With Python, how do you tell, without searching through the code what something called 'foo' is? Is it a dict/list/tuple what? At least with Perl you have a funny character to help you a bit.

      With Perl you can also bounce between braces to get start and end of blocks. With Python thats optional, meaning a degree of freedom which allows for More Than One Way To Do It...

      Also with perltidy and a decent editor, you are always one keystroke away from code with 'regular, sensible indentation', no need to 'work at it'.

      Just another thought.

  138. There are four kinds of developers: by eagee · · Score: 1

    I think there are four kinds of developers: *Ones that are good at design *Ones that are good at implementation *Ones that are good at both *And college kids (no offense college kids). I think the trouble comes in when corporations don't consider the consequences of matching work to skill set, or putting too much responsibility in the hands of the inexperienced. IMHO with all of it's issues, bad Perl code is really just a symptom of bad management.

  139. Cultural, not technological by Killer+Eye · · Score: 1

    It's dangerous for managers to cling to buzzwords, and assume that making the buzzwords go away will fix things.

    Reaching this point with Perl speaks of a development culture that will recreate the same problem in a few years with [insert cool new language here]. They didn't understand (or perhaps didn't listen to those telling them) that code maintenance and understanding are even more important than having the code written in the first place.

    It is possibly to write maintainable Perl; they aren't doing it, and that is the "legacy" they need to get rid of.

    --
    "Microsoft killed my company, I hold a personal grudge. I don't use Microsoft products and neither should you."-JWZ
  140. stop this crap by e70838 · · Score: 0

    Nobody is obliged to write obsfucated perl code.
    When comparing "normal" perl code to normal C++ or Ada or Java code, the perl code is more concise.
    As a result, one line of perl take more time to write or to read.
    But the real thing is that the equivalent perl code takes far less time to write even if it takes the same time to read.

    It is so easy to code in perl that people do a lot of error checking that are omited in other languages. I have always less bugs in my perl programs than in programs in C/C++ (in Ada, most of the bugs are found during compilation).

    The benefits of perl are mainly time and bugs. You can't attack Perl on these.

    In perl we use often regexp. Most of them are simple regexp. Some are complicated and are difficult to read (not to write).
    Add a comment to explain the regexp and stop complaining.
    The program using regexp is generally a lot more robust than the algorithm we would use in another language without regexp.
    Fewer bugs, better error checking, less code to maintain.

    The only drawback is can imagine is that perl requires to have good bases in computer science and is old-fashioned.
    I would love to use a new language in the hype that would be as effective, but it remains to be invented.

  141. The real problem by dockwej · · Score: 1

    "Its because the Perl code has developed piecemeal over the last ten or so years in an environment where there was no design authority. Many of these systems date back to this company's first steps onto the Internet and were made by separate departments who had no interaction with each other."

    This is the problem, not Perl. Unless this is fixed, whatever shiny new technology you use now will be in the same state as the perl code ten years from now.

  142. I like perl by SCHecklerX · · Score: 1

    I can stay away from it for a year, and immediately write in it without having to look at a reference.

    I use bash every day, and for anything requiring a logic operator or comparison, I have to look for an example.

    I have several scripts that depend on another guy's (poorly implemented) 'database'. He has a bunch of bash scripts to parse it. We are going to move to a real database. I wrote a module for the (current) method. On the new system, I'll change one module, and all of my stuff will continue to work. Bash guy not so lucky. Not to mention parsing that stuff is a lot easier with a lot less overhead in perl vs. a crapload of calls to cat | grep | cut.

  143. very ironic by krystar · · Score: 1

    here I am reading this article in a classroom... in a class "Introduction to Perl Programming" ..... how ironic.

  144. Good by geekoid · · Score: 1

    PERL lends it's self to bad code practice.

    Unreadable piles of crap is not good for business.
    I've written my share of Perl, but sometime I think I am the only person who writes it in a way that anyone can read it. Leaning matchstick issues are bad.

    Perl is good, I like it. I've just seen too many people trying to use it in the most obscure way possible.

    --
    The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
  145. Same problem as C by t'mbert · · Score: 1

    The same kind of arguments were made in support of C: that hard-to-maintain spaghetti code is not the language's fault, it's the developer's. But the bottom line is this: if the language fails to enforce some basic good coding practices, then the code won't be easy to maintain. It's difficult, if not impossible, to find and hire the kind of talent across your organization that can keep the code maintainable and readable. It's just as hard to review all the code to ensure it meets your development standards, and train junior engineers on how to do it properly. Therefore, just having Perl or C code to maintain means you are almost guaranteed to have harder-to-maintain code, that has to be worked by more-senior developers. Those very developers are who you need plugged into new projects that require senior developers and out-of-the-box thinking. If they are tied up cleaning up the spaghetti that other engineers produce, you lose productivity across your organization, and your senior guys want to quit.

    Java, .NET and other shiny new languages help in significant ways in making software products easier to develop and maintain. So Even though I can code nice C code, and I can handle pointer arithmetic and memory allocation well, doesn't mean I can find all the resources I need to ensure that same level of development in all my products.

  146. Not only corporations hate Perl. by porky_pig_jr · · Score: 1

    Anything serious, production-kind software should *not* be written in Perl. Perl was never designed as a production quality languages. It went through rather radical change of syntax several times. It allows to accomplish the same task with gazillion different ways, no doubt members of Church of St. Larry Wall rejoice, but those who are to maintain the obfuscated and obsoleted Perl code do not. I had that experience maintaining set of tools written in Perl for First-Tier Internet provider.

    My revenge: I re-wrote large chunks of code using *my* idioms and then completely bailed out from the project, and subsequently from the company. Let someone else maintain my code and cry.

  147. Perl Stagnated (aka Duke Nukem Perl 6 Forever) by Argon · · Score: 2, Interesting

    I think Perl blew it by the inordinate amount of time Perl 6 is taking. I am surprised nobody mentions this. Pythona and Ruby on the other hand have good roadmaps (especially Python). They make releases like clockwork, they're always in the news about new frameworks and some cool stuff. Perl usually is in the news for the wrong reasons, mainly about why Perl 6 is so delayed. Perl has simply lost mindshare. Oh, I know Perl has not really stagnated. Perl 5.x series has been making steady progress but that only appeals to people who're already using Perl. For newer people taking up a scripting language, Perl seems like it's past it's prime. Besides, let's admit it - the language is arcane; especially the OO stuff in Perl 5. I even find OO interfaces in perl modules unintuitive. If someone likes Perl and wants something more "clean", modern and shiny, I'd recommend Ruby though I personally prefer Python.

    Don't mistake me. I was (and still am) a big fan of Perl - mainly Perl 4 though. It's one of the most powerful languages that I've used. Even today, I usually start writing something in shell (because I am throwing together a bunch of programs to get my job done). Then I hit the limitations in shell and usually port the program to perl. That said, I have mostly switched to Python, especially when I am starting to write something from scratch.

    1. Re:Perl Stagnated (aka Duke Nukem Perl 6 Forever) by chromatic · · Score: 1

      [Python and Ruby] make releases like clockwork...

      Rakudo (Perl 6 on Parrot) is part of the monthly Parrot release cycle. We've released a new stable version of Rakudo with Parrot every month since November 2006 -- including a new version yesterday.

  148. perl encourages bad programming by Anonymous Coward · · Score: 0

    The problem is that perl encourages bad programming because of it's language constructs, as well as it's low barrier to payback.

    I've worked with perl for years, and I despise it. The people whose systems I've had to maintain are despicable, and they do stuff like:

    $a[$a]

    which confounded me at first. It's because they used two variables, each named "a", however, one was a hash and one was a scalar. This is because perl has two separate namespaces between hashes and scalars which to me as a programmer is unfathomable.

    Most perl programmers are sysadmins or lesser-talented programmers, that don't know anything about engineering code. The problem with perl is that the barrier to actually seeing results is very low, which could be a good thing, but it encourages people who can't really program to program.

  149. It might be helpful to point some of it out by msimm · · Score: 1

    Up until recently I'd had a similar opinion. Then I started work on a new project and began noticing all these interesting technologies.

    Some exciting technology is being developed using Java. Check the trove.

    --
    Quack, quack.
  150. A simple rewrite... by OSgod · · Score: 1

    Anti-Globalism recommends a posting up at O'Reilly's ONLamp on reasons that some companies are turning away from COBOL.
    "[In one company] [m]anagement have started to refer to COBOL-based systems as 'legacy' and to generally disparage it. This attitude has seeped through to non-technical business users who have started to worry if developers mention a system that is written in COBOL. Business users, of course, don't want nasty old, broken COBOL code. They want the shiny new technologies. I don't deny at all that this company (like many others) has a large amount of badly written and hard-to-maintain COBOL code. But I maintain that this isn't directly due to the code being written in COBOL. Its because the COBOL code has developed piecemeal over the last ten or so years in an environment where there was no design authority.. Many of these systems date back to this company's first steps onto the Internet and were made by separate departments who had no interaction with each other. Its not really a surprise that the systems don't interact well and a lot of the code is hard to maintain."

  151. Re:Perl IS /your/ the problem by Haeleth · · Score: 1

    These types of situations don't occur nearly as often when using PHP

    +5, Funny

  152. Its really a hiring problem by Anonymous Coward · · Score: 0

    I work for a company where there is a lot of Perl. The issue we keep seeing is that all the newly minted, out of school 'programmers' only know Java and are afraid to work on Perl because they've been led to believe that there is no future in it. On top of that, their Java background tends reduce their exposure to many important programming concepts (which makes them less hireable)

    Meanwhile, from the corporate managers' point of view, there are lot more Java programmers out there and they are cheap worker bees. Good Perl programmers are becoming increasingly rare end expensive. The truly talented ones don't need to look for work.

    All of that makes Java people easier to find and afford.

    1. Re:Its really a hiring problem by Anonymous Coward · · Score: 0

      >>On top of that, their Java background tends reduce their exposure to many important programming concepts (which makes them less hireable) Idiot. This is laughably comical. Kind of like Perl has real OO. Perl is for hacking system admins and text processors not real programmers who are exposed to real programming concepts with static languages like Java, C++ etc. Comical.

  153. No, it's not perl code that is unmaintainable by GargamelSpaceman · · Score: 1

    Businesses should make their decisions based on technical reasons in order to be the most efficient machine and provide the most, most efficiently ( with least cost ) to their customers while charging their customers what the market will bear. But that is totally not what happens unless the software IS the business. Even then it doesn't always happen.

    So software produced by businesses is crappy, badly designed, hard to maintain, and gets moreso the longer the piece of software exists. Eventually, it becomes so inflexible and expensive to maintain that it makes sense to replace it. Switching languages makes it easier to justify replacing the software rather than incrementally changing it. The real reason the software is being replaced is that it is crap, but trash-talking the language it was written in is a good way to sell the idea of replacement with something that will be worse, probably sooner rather than later.

    --
    ...
  154. Cowboy Perl, Rise of Scripting and Fear of Brevity by pileated · · Score: 2, Insightful

    I'm primarily a Perl programmer, though I do some Java and Ruby.

    Someone mentioned Damian Conway's book 'Perl Best Practices' and all I can say is that if Perl had had that book 10 years ago it would have a better reputation than it does now. In my 15 or so years of experience with Perl I think that its worst problem is the Cowboy Coders, who often mistake obfuscation for genius. It sure seems like the early days of Perl were also the days of Cowboy Coders. Books like 'Perl Best Practices' try to salvage the best of Perl from the worst practices of the Cowboy Coders.

    On the other hand I have no sympathy with those who don't like what Perl looks like. I may be fearful of sharp knives too. But if they get the job done better than a blunt one then the thing to do is learn how to use them. Perl's brevity can lead to difficult to read and maintain code but it also makes it very powerful. Much can be done in a small space. Using Perl, along with the guidelines of Damian Conway, I think anyone can write very good, powerful, legible and maintainable code. It is not a bad language.

    However there are times when trying to hold in my mind exactly what some 4-5 level deep dereferencing variable in Perl really refers to that I prefer the more verbose but easier understood style of Java. Perl is full of shortcuts. They are very powerful, but sometimes do require a lot of concentration before their meaning can be understood. For someone who uses Perl everyday the shortcuts probably make perfect sense. For everyone else it can take a long amount of staring before any of it makes sense. Does this make it bad? I don't think so. It's just that it's not as immediately comprehensible as some languages. On the other hand imagine a Perl programmer faced with the verbiage of Java. The same type of blank look sometimes comes over my face when I switch from Perl to Java: I think, my God, there's a lot of verbiage here. Why does it have to be so big. Why do I need to declare the type of the variable not once but TWICE? What could be worse than that?

    The one thing I can say about Java is that rarely do I run across a surprise because something is in a scalar rather than a list context. Java is pretty straightforward. Perl has a lot of things, like context, that aren't straightforward.

    Finally I have to wonder about Groovy, Ruby and other popular scripting languages. Why in the world does Java need Groovy (about which I confess I know little)? From what I can see some people are seeing the virtues of scripting languages, especially dynamically typed languages. So it looks like Java users are a bit jealous of the ease of scripting languages of Perl, even with all of their possible problems.

    To me it's understandable: a scripting language can be great for getting something done quickly. It's just that if very good coding practices aren't followed the code can either have hidden bugs and/or be difficult to maintain.

    To conclude I think that the very presence of languages like Groovy show that there is always a demand for scripting languages. Perl is among the best. It's just got an awfully dirty history and a lot of bad habits that may need to be overcome to make it as popular as it should be.

  155. It's hard to maintain because Perl is. by blair1q · · Score: 2, Insightful

    Perl is just plain hard to maintain.

    Very few people know how not to use all the things that obfuscate a perl program.

    Even good perl programmers have trouble understanding perl code written by other good perl programmers who use different idiomatic constructs.

    And not many people are learning Perl as deeply as they did when it was newer, which makes it even worse as a maintenance problem, and a drag on developing your entry-level maintainers into good programmers.

  156. Regular expressions make things easier. by GargamelSpaceman · · Score: 1

    And perl 6 is supposed to use Parsing Expression Grammars which are even cooler. If you think translating a regular expression into hand-coded crap that is probably wrong then you're an idiot. That's why people use things like yacc/bison for writing parsers. That kind of coding is hella tedious and hella error-prone without useful abstractions like regexes. And all the other languages have regexes now because they are a very useful tool including ( insert your favorite ). Sorry, but when parsing something I'm gonna use them whatever language is foisted on me. And you can use some simple rules to paste regexes together in ways that make sense. You can translate ( mostly ) the entire URI rfc for instance into regular expressions using the bnf. There's only one funny ambiguity that requires a special rule. The regex is frikken huge, but the small parts it's built of are easily understandable. Try doing that without a tool like regexes in a way that is *CORRECT* and *COMPLETE* allowing you to parse out all the bits in the rfc and you will fail. Remeber with regexes you can paste them together build them up with (?:) my $parta = '(?:..)'; my $partb = '(?:...)'; my $whole = '(?:' . $parta . '|' . $partb . ')';

    --
    ...
    1. Re:Regular expressions make things easier. by famebait · · Score: 1

      Sounds to me like you're really supporting my point.

      I don't hate regexes.
      I just hate big fricking unreadable wads of noise that I have to spend time to dechipher
      just because the author was to lazy to explain what's going on.
      In any language. Including regex.

      Split it up like you suggest, naming the variables for their role, and I'm all sold. It communicates the point, and it makes altering the rule much easier and less risky.

      And this approach is much much better than adding text comments to the still-monolithic regex.

      --
      sudo ergo sum
  157. Shortcomings of Perl by Anonymous Coward · · Score: 0

    Perl has several problems compared to other development environments. First, Perl has weak data types. Second, Perl is not so easily scalable than Java. Third, Perl-code is hard to maintain, because of its history. Fourth, modern programming concepts, like OO, components, packages etc. have been added at a later date with several shortcomings compared to modern languages.

    Strong data types are important in today software development, because it allows to find errors at compile and even write time compared to run time. Run time errors are more complicated to find, reproduce and fix than compile time errors. Also run time errors might not occur for month, but then corrupt your database and crash the system. This can be really costly.

    The second argument, is about scalability. While for EJB and other such component based systems, there exist working (which means stable) replication and distribution systems, which allow adding nodes at run time (or at least with zero system down time), Perl does not have comparable environments.

    Another scalability problem is based in the used coding styles. While Java (but you can use C# as well) enforces certain programming principles and support transparent use of RMI (RPC), Perl lacks this ability. Java code therefore easy to read, even though you have to read a lot of syntactic sugar. But thanks to modern development tools, the talkative nature of Java can be dealt with using programming environments, which can create most of the class, method and package bodies. This is not elegant. No. But it is effective.

    The next point is maintainability. Perl has a well
    earned reputation as write only language. Contest where people wrote "squarish programs" (who can write the smallest program in form of a rectangle, which does something useful?) helped building this reputation. However, today other features of a language are more important. And therefore Perl becomes obsolete in major business applications. This does not mean that there is not a place for Perl-programs. But in these modern SOA and BPEL-based software systems, using Grid- and Cloud-computing (sorry for the little buzzword collection) Perl is not the right choice.

  158. Succinct code by Baldrson · · Score: 1
    The problem with Perl isn't with succinct code -- its with a lack of intelligible documentation and intelligent coders.

    If you look at the way technical academic papers are written, there are mathematical expressions that those outside the discipline don't understand. The text surrounding the mathematical expressions is there to make the intent of the math transparent. But no one in their right mind would try to get technical academic papers to use formalisms that weren't succinct just because it would make the math more "readable". On the contrary -- it is the job of the reader to learn the new formalisms with the assumption that the author introduces them only when necessary (profitable in more succinctly describing the model of the world expressed).

    Yes, bad scholars will behave the way bad coders behave and create new symbols and/or new constructs rather than reusing existing -- well established and widely understood -- ones. This is frequently due to a lack of intelligence (leading to ignorance of prior symbols).

    The goal of coders should be first to come up with the right formalisms -- the most succinct "math" if you will. If necessary, they should relate this form to previously accepted optimal forms -- and make a damn good argument for the new forms where introduced. They should then make their succinct formalisms intelligible by surrounding them with explanatory prose, the way an academic paper explains its succinct formalisms -- and provides cites to the relevant prior works.

    There was some move in this direction with something called "literate programming".

    Most Perl constructs that frustrate readers are no more onerous nor less useful than highly used formalisms in academic papers that make expressing things in a rigorously precise, and ultimately more intelligible, manner practical. The annoyances attributable to the Perl4 -> Perl5 transition are relatively minor compared to the unintelligible things that appear in the code of most programmers in any language.

  159. It's the PEOPLE not the language by Tablizer · · Score: 1

    Glitzy clicky interfaces do not a good product make, but a platform where _some_ thought has been given to workflow really is something we should start to expect in this day and age.

    Amen! The importance of GOOD organization, thinking, planning, conventions, etc. are by far a bigger issue than specific language or tool. The difference between say Perl and Python are not near enough to override the difference between thoughtful coding and hack-a-crap coding.

    Good coders like to see their clean and thoughtful designs pay off in adaptability, features, and productivity. Bad coders hop from fad to fad to get bigger bucks and padded resumes.

  160. Perl is hated because it begets a putrid mess! by itsybitsy · · Score: 2, Interesting

    Have you actually seen the Perl syntax? It's a horrifying mess designed for people who like twisted grammar puzzles and cryptic codes (and cyptics like RMS who think that recursive acronyms are cool). To express anything clearly in Perl requires a frontal lobotomy and a C-section at the same time (yeah, even if you're male).

    It's such a freakish language that it's got syntax for syntax rather than a very clear simple syntactic idea like LISP or Smalltalk or Self or, fuck, even C is easier to comprehend than Perl.

    There's an article over here that covers some points why Perl sucks the big one and doesn't even suck well at it! When a language sucks at least I want a good blow job!
    http://smalltalk.org/articles/article_20040914_a1.html

    Basically Perl sucks because you need this to figure it out:
    http://www.ozonehouse.com/mark/blog/code/PeriodicTable.pdf

    Professional systems people want their systems to be clear and as easy to grasp as possible, Perl provides the opposite. We ONLY use it when the existing system is using it, and then we only do maintenance bug fixes (lots of those) and do not under any circumstances add new features to programs written in it!

    The above are a few reasons that Perl is ostracized from the corporate space and should be excised from your brain.

    If you want to hack your way through life, fine, be cryptic and use Perl. If you want excellent systems that perform and get results use a language that helps in that regard: Smalltalk, Lisp, C. Avoid Java, C++. Heck use Assembly Language before Perl!

    1. Re:Perl is hated because it begets a putrid mess! by GNUPublicLicense · · Score: 1
    2. Re:Perl is hated because it begets a putrid mess! by itsybitsy · · Score: 1

      Nice ugly code chunk you linked to...

      Suckless by DESIGN!!!

      Actually using DESIGN rather than hacking for change makes a huge difference. This is the difference that corporate types want (most of the time).

      Anyone can be a hacker. Not everyone can *design* software systems.

    3. Re:Perl is hated because it begets a putrid mess! by GNUPublicLicense · · Score: 1
      Basics of software engineering:
      1. You take a set of functionalities and you modelize a system to do so
      2. Then comes a new functionality which really does not fit your model
      3. You need to significantly redesign you system or perform a quick and dirty hack
      4. In the corporate world, most of the time the dirty hack wins over the clean redesign because of money and time...
      5. You end up with a ugly system very hard to maintain, whatever the language/framework you chose

      Conclusion: you keep your entire software stack minimal and try hard to avoid the quick and dirty hack = maximal control
      :)

    4. Re:Perl is hated because it begets a putrid mess! by itsybitsy · · Score: 1

      It's the "keeping it minimal" part that the cryptic perl nonsense syntax gets in the way with. If you spend all your time deciphering the perl syntax you have no time for anything else. Sure some are excellent at perl but it's just soooo darn cryptic with sooo many syntaxes many of which just do the same thing redundantly.

      I prefer a clean and simple MINIMAL syntax that enables you do get everything done with easy.

      Choose your tools wisely as they will come back and bite you.

    5. Re:Perl is hated because it begets a putrid mess! by chromatic · · Score: 1

      I prefer a clean and simple MINIMAL syntax that enables you do get everything done with easy.

      Prove that a minimal syntax lets you get everything done more easily.

    6. Re:Perl is hated because it begets a putrid mess! by itsybitsy · · Score: 1

      Junk that always looks like this crap

      &%*$)#$^%()##!%&T_)^%_!_#!@%&-0

      verses awesomeness like this:

      1 to: 100 do: [:index |
      Transcript show: index printString; cr
      ].

      Obviously the beauty of simplicity (but not simplistic) is in the eye of the beholder. Hey if you want cryptic crap that's up to you, just don't expect those of us who like clarity to like your cryptic crap.

      Languages like Perl are syntax heavy. That is a FACT. Rather than sanely putting the function points into the library new function points are added by adding special syntax over and over again. I'd rather learn additional objects in a library that all use the same simple syntax than have to learn yet another cryptic special case syntax.

      C++ is another example of a language that keeps adding syntax, C++0x is going to be a mess with their new syntaxes. Of course it seems reasonable to them to add new keywords and syntax since they don't want to mess with the old syntax and it's meanings, so to avoid confusion they add new syntax. At least though they are learning and have stated that anything that CAN be added via a library will be. Finally some sanity.

      The problem with special syntaxes is that they are special, as in, you know, a special needs syntax. In other words, special syntaxes are retarded imho.

      In looking at the Smalltalk language a new variant has found ways to eliminate syntax and are doing so for my language. Rather than adding new syntax they are reusing the same existing syntax so that it has multiple meanings with the old meaning being the default and the new meanings being accessed via the library! As a result a *number* (two or three) of syntax elements are removed since they become redundant and ONLY *one* new syntax is added for accessing any meta data in the virtual machine level; something that couldn't be done without. Otherwise all the new features use existing syntax elements or objects in the library (new or existing objects). This is sane. The one new syntax enables the new variant to go where few languages have gone before, allowing all meta information to be accessed as full first class object citizens in the world of objects. This continues, and richly deepens, Smalltalk's tradition of everything being an object. It makes this new variant more Smalltalk than Smalltalk! Making a language more pure with the net outcome of less syntax is the direction to move in. It also, along with some new virtual machine techniques, makes possible very fast native code compilers that meet or exceed the speed of C.

      As for proof which you ask for, "easy" is subjective and might vary for each person, thus I've likely lost the argument before I started typing one word. It really depends on how open you are to reasonable arguments and other points of view, or if you are stuck in the one point of view that you have. I prefer multiple points of view myself, which is known as multi-perspective thinking.

      First off, technically if the language is turning complete then it can in theory perform any computation as any other language. However, that doesn't make every language desirable or practical to use.

      Here is the proof of "ease" you asked for.

      (1) By having special syntaxes a language like Perl takes much longer to learn.

      (2) It's easier to make mistakes that you can't solve if you don't know all the syntax forms.

      (3) The Perl Chart of the Elements is proof enough that perl is overly complex: http://smalltalk.org/articles/article_20040914_a1.html.

      (4) A simple syntax at least means that you'll be able to read and comprehend programs in their entirety, while with Perl or C++ or other heavy syntax languages you're stuck wondering what the mess means and scrambling for google or a set of good books on the language (if there are any).

      (5) Complex syntax is a serious problem for compiler writers as they are confronted with the complexities

    7. Re:Perl is hated because it begets a putrid mess! by chromatic · · Score: 1

      Junk that always looks like this crap...

      Strawman much? How do you expect anyone to take your argument seriously when you can't represent my position with a modicum of accuracy or respect? Why bother wasting your time typing the rest of your post, when you lead off with "Nyah nyah, boo boo! You're a dumb dumb!"

      Let's take one other example chosen at random:

      The Perl Chart of the Elements is proof enough that perl is overly complex...

      First, that chart is four years old. Second, you're taking it out of context if you don't compare it to syntax charts for other languages (and not Lisp, unless you include Lisp's special quoting forms). Third, and this flows from the first objection, Larry has simplified the syntax based on feedback from implementors (including his own grammar parser).

      While your premise that simple syntax is always better than "complex" syntax (whatever that means) may be valid, your argument here is worthless.

    8. Re:Perl is hated because it begets a putrid mess! by itsybitsy · · Score: 1

      I used plenty of accuracy and respect. I didn't call you names or anything like that. I even quoted Perl people who are unhappy with Perl.

      I never called you a dumb dumb, I don't know you well enough to call you that.

      The chart likely got worse in the last four years. I have compared the Perl chart against other syntaxes, take Smalltalk for example which is way simpler than Perl's, C++, Java's, Python's, etc.... Coke and Pepsi prove that languages can be very simple indeed and be complete and expandable and comprehensible and powerful and simple to use!

      The arguments are good ones, it's just that you are committed to your narrow point of view about Perl and won't admit; you don't want to hear (N) arguments against your precious Perl's complexity. As I said, if you can handle the complexity of Perl all the more power to you; I can't and won't unless forced to due to economic necessity (if the contract calls for it in other words I'll do it and I'll do it well whilst gnashing my teeth). So you can discard the arguments with your ignorance as you wish to but they are still valid and quite to the point.

      Languages with straight forward syntaxes that are easy ARE NOT for everyone. There are people who like complex languages like APL and PERL. It gives them a certain satisfaction of being able to "CODE" cryptic programs that others can't do. They are for people who like recursive acronyms; the uber geeks who never get dates and still wear pocket protectors even if you can't see them doing so, or those who like slide rules. If that's you then fine. It's not me. While I can do any cryptic nonsense anyone needs for any paying jobs I don't enjoy it even when successful. I find myself gnashing my teeth since I KNOW how it can be done easier with a simpler syntax.

      One reason that languages that rely on syntax to solve problems is that they tend to get more complex as newer problems are identified that push the envelope and call on more "options" which is where new syntax gets added. Rather than simply flushing out the library with these newer fully fleshed out options that cover all the scenarios languages like Perl and APL add new syntax to solve it.

      The growth of syntax in regular expressions is also an example of a complex little language getting out of hand. The nasty gnarly putrid line of regular expressions required by the Apache configuration engine to handle URL rewriting is another example of complexity gone mad while not covering all the features needed to solve the problem.

      The powerful attraction of syntax comes from the languages that syntax lets you define: you can do a heck of a lot with it, thus people think that a new syntax is always the answer rather than saying hey maybe add in the appropriate syntax for a library of modules or objects so that we can add an infinite amount of new functionality via the library or by simply adding methods/functions to an existing object or creating a new object. No need for a new revision of the language to be sent to everyone.

      Syntax is a powerful drug for language designers. In choosing a powerful yet simple syntax like Smalltalk the designer of ZokuScript, heavily influenced by Smalltalk and other languages, takes the point of view that if a feature can be implemented using the library of objects then that is where it should live. This lead to the reduction of syntax overall with one one new substantial addition that provides ZokuScript with meta reflective capabilities required for any mobius self mirroring language - all objects in the virtual machineless system are first class objects including those of the underlying virtual machineless system. All with just one adjustment to the syntax while leaving all the syntax elements the same. Simplicity is retained and actually attained to a higher level since now even message sends can be first class objects using the existing syntax! A meta syntax using the same syntax! A true mobius syntax. Essential for a system - as in lisp - where the distinction between data and program is blur

    9. Re:Perl is hated because it begets a putrid mess! by chromatic · · Score: 1

      Languages with straight forward syntaxes that are easy ARE NOT for everyone. There are people who like complex languages like APL and PERL. It gives them a certain satisfaction of being able to "CODE" cryptic programs that others can't do. They are for people who like recursive acronyms; the uber geeks who never get dates and still wear pocket protectors even if you can't see them doing so, or those who like slide rules. If that's you then fine.

      ...

      Now that is a respectful posting as my others have been.

      Are you sure "respectful" is the correct word there?

      Also:

      The chart likely got worse in the last four years.

      "Likely" means "I didn't bother to look." You'd rather wave your hands and rant and rave than find out? That's worse than lazy. That's deliberate and malicious ignorance.

    10. Re:Perl is hated because it begets a putrid mess! by itsybitsy · · Score: 1

      Yes, I didn't bother to look since it's well known that they added TONS of junk to Perl in those four years and given their pattern of expanding syntax all the time it's reasonable to assume that it's much worse.

      Are you saying it got no worse? Were is your counter evidence?

    11. Re:Perl is hated because it begets a putrid mess! by itsybitsy · · Score: 1

      Yes, considering that this is an online forum those comments are quite respectful. No one in person has ever complained about that one bit when I've said it in person or in groups. Only online when people can't take valid criticisms.

      "If that's you then fine." caps off the respect by telling you that if you are the uber geek who likes Perl that that is fine with me and all the more power to you. Just don't expect me to like your cryptic language.

      The paragraph that you quoted perfectly paints a picture of the typical perl geek that I've meet. Sure, there are variants, but one thing is constant, a love of crypticisms which is fine, love Perl all you want, it's just not me or the corporate types who want clarity and readability.

    12. Re:Perl is hated because it begets a putrid mess! by chromatic · · Score: 1

      [Where] is your counter evidence?

      There's nothing to counter. When you provide actual evidence (if it's so "well known", you shouldn't be having this much trouble citing actual facts, such as the number of unique operators or precedence levels or grammatical categories in Perl 6 from 2004 and in Perl 6 in 2008 -- the design documents are available in a public Subversion repository, so the source material is absolutely trivial to find in excruciating detail), then there might be something to counter.

      Onus probandi is, as usual, on the original claimant.

      Feel free to have the last word in this discussion, however.

    13. Re:Perl is hated because it begets a putrid mess! by GNUPublicLicense · · Score: 1

      Guys, That was not the "minimal" I was talking about: I was talking about a minimal software stack. It depends where your threshold is. As for myself, C is the one. Namely my software stack is : Linux kernel + GNU C toolchain + C libs and that's it.

  161. No, arguing for automated testing. by tjstork · · Score: 1

    Spoken like someone who believes that writing unmaintainable code is the best form of job security

    No, I'm arguing that the practice of layering code in particular, and data hiding in general, makes code more expensive to maintain. If you want to have a good program code, rather than try and write a bazillion layers, write as simple as possible and then have lots of code to test it. Given the same overall number of lines of code, your approach gets you a system that looks good on paper, but is completely unproven, but I'll have a completely automated testing regime to go with mine. Which is better?

    --
    This is my sig.
  162. Ruby is not much better by mangu · · Score: 1

    I still use Perl for quick-and-dirty stuff, small scripts that I will use once and then throw away. Often it's a one-liner, like "cat out.txt | perl -ne 'if (/\s{3}(\w+)\s/){print $1}'", or something like that. But for a really clear to understand and maintain software, I think Python is *much* better than Ruby.

    Ruby fans hate me for this, but I sometimes say that Ruby is Perl++. Or, in other words, "it's the syntax, stupid". Although I don't really like the forced indentation in Python (what if someone else used tab characters, for instance?), I think Python has the best syntax of any language when it comes to readability. Oh, sure, people can still write 600 line functions in Python, but they are easy to read lines.

    Ruby, OTOH, doesn't have a coherent syntax. Code blocks sometimes are declared between curly braces, but in other cases they have a generic "end" statement (does anybody here remember Fortran?). And too many of those funny characters you get when you press shift plus a number key. And many other details, each one not so important by itself, but in the end it all adds up into code that's significantly harder to read than Python code.

    1. Re:Ruby is not much better by metamatic · · Score: 1

      Funny, I'd say the exact opposite. Python_s _explosion of __underscores is much more annoying than the occasional @ found in Ruby, and knowing that a block has ended with "end" is much easier than visually matching indentation levels.

      --
      GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    2. Re:Ruby is not much better by Wdomburg · · Score: 1

      Eh, two options for code blocks (do-end and braces) is hardly damning. And some of us consider Ruby's sane use of sigils to be an advantage. :) How does $global_var, @@class_var, @instance_var, local_var make for unreadable code? Or did you have other funny characters in mind?

  163. I don't use a GUI frequently ..... by jotaeleemeese · · Score: 1

    .. and yet hate the abomination that perl is.

    --
    IANAL but write like a drunk one.
  164. Perl Critic by Jac_no_k · · Score: 1

    One way to mitigate all the nuttiness that lazy developers put into Perl is to take the suggestions from a script called 'perlcritic' on the -harsh setting.

    Doc for Perl::Critic

    On our team, we have developers that are hackers to college interns. This stops the hackers from writing illegible punctuation explosion code and stops interns from making common mistakes.

  165. Programmers hate Perl too by Anonymous Coward · · Score: 0

    You got it wrong, it's not only corporates that hate perl. A lot of programmers hate it too. Duh.

  166. Lame Perl apologistics by Anonymous Coward · · Score: 0

    What a bunch of hokey reasoning. There is no special or sinister reason "Corporates hate perl".

    The programming world just needs to move from Perl as soon as possible so that more programmers can keep their hair.

  167. Re:Fuckham's Razor tells me.... by Anonymous Coward · · Score: 0

    I recommend pearl beads in my asscunt. Huge ones. Like >3 inch a piece!
    Shove them all up until i have to vomit from the pressure, and then rip them out, nearly ripping me apart.
    That would be fine.

  168. Whose regexp support? by Krishnoid · · Score: 1

    Your regexp example isn't awfully good - any language that has regexp support will have lines like that. These days, PHP has regexp support (possibly always has), C has regexp support, C++ has it, Java has it, and I expect that even C# has regexp libraries.

    That's quite true. And in many cases, regexp support comes from this regexp library.

  169. PERL IS THE REASON by LostMyBeaver · · Score: 1

    Perl is UNIX's Visual Basic. Give a money a perl interpretter and they'll manage to make some cryptic script that gets the job done, but would never be useful to another scripter.

    While perl might actually not suck in itself, the overwhelming perl user base often does. I strongly believe that the same goes for PHP.

    1. Re:PERL IS THE REASON by furry_marmot · · Score: 1

      I think you're right, but the reasons have nothing to do with Perl. When the web first got popular in the early 90's, there were no frameworks to develop applications in. You could write a CGI application in Perl, Tcl, C, or something else, but it was hard. With a variety of libraries, culminaiting in CGI.pm, a LOT of people suddenly had a tool with which to create CGI apps quickly and relatively cleanly.

      But IT management (in my experience) typically viewed the web with suspicion because a) they didn't understand it, and that meant b) it could be a threat because typical IT directors and VP's are constantly trying to justify bringing in some huge backend system to unite the web with business databases, email, process management, etc, to the tune of millions of dollars.

      As a result of management's foot-dragging and distancing themselves from the web, a lot of early web applications were skunkwork projects that became official after their usefulness was seen by said management. But they typically were not overseen by anyone who might enforce best practices, and so you were entirely at the mercy of the coding skills (or lack thereof) of the developer.

      Perl came along at just the right time to make a lot of barely competent "coders" successful. Had Python or Java or anything else found that niche first, we'd be having this exact same discussion, but with another language being the "legacy".

  170. Size and complexity of the whole software stack by GNUPublicLicense · · Score: 1

    Hello?
    Most of you missed to real point: all those languages and frameworks are huge and most of the time insanely complex pieces of software. And that's really bad (just have a look at perl code, openjdk code or mono code). We are talking about millions of complex line of code, most of the time requiring the complexity of an optimizing C++ compiler... that's sick...
    The most reasonable option is to take into account the whole software stack and reduce to the maximum its size and complexity. Then I stick to C and only C and keep in mind all the time maintainability. As far as I'm concern the upper threshold of complexity and size is (linux+optimizing C toolchain). Then I build everything on top of this software stack and no more.

  171. Apparently there are two types of Slashdot Posters by bratwiz · · Score: 1

    Judging from the various animosities expressed in the postings on this topic, it seems apparent there are two types of Slashdot posters on this topic:

    (A) Those that actually DO program in Perl

    (B) and those that don't

  172. OO "fixed" in Perl 6 by metamatic · · Score: 1

    Whether OO is being fixed in Perl 6 is very much a matter of opinion. It's certainly being changed, but it was reading the planned directions for Perl 6 OO that made me learn Ruby. method doit (::?CLASS $self: $a, $b, $c) { ... } and $locator = -> $root, $x, $y { $root.[$x]{$y}[3] } ? No thanks.

    Sure, you can adopt best practices and write readable Perl code. The problem is, eventually you have to use someone else's Perl code. My experience is that I'm much more likely to be able to understand someone's Java or Ruby code than anything on CPAN. That holds true even for bad Java code that throws up a zillion warnings in Eclipse/PMD.

    --
    GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    1. Re:OO "fixed" in Perl 6 by baest · · Score: 1

      I personly prefer:
      method doit ($a, $b, $c) { ... }
      to
      method doit (::?CLASS $self: $a, $b, $c) { ... }

      But of course the other suits your "argument" better. But I don't see a problem with being explicit if you must for some reason and being able to e.g. change $self into $this.

      My experience is that I'm much more likely to be able to understand someone's Java or Ruby code than anything on CPAN. That holds true even for bad Java code that throws up a zillion warnings in Eclipse/PMD.

      CPAN is like Java library implementation. How often do you read that? Secondly my opinion is the reverse, Java is so verbose that I have to read 2-4 times more code in Java than in Perl, which is harder to remember. Also somebody who doesn't know to write Perl, usually writes as in shell and that is pretty simple. I prefer flexibility over simplicity, therefore Perl to Java.

  173. Re:Cowboy Perl, Rise of Scripting and Fear of Brev by pileated · · Score: 1

    Replying to myself: there is of course a good reason for declaring the type of a Java variable twice. I wasn't thinking when I wrote that. Still it does make Java seem very complicated compared to the straightforward 'x="anythinganytime"' of Perl.

  174. Full of bull by Anonymous Coward · · Score: 0

    "Business users, of course, donâ(TM)t want nasty old, broken Perl code. They want the shiny new technologies."

    Java and PHP aren't "shiny new technologies", duh...

    "Itâ(TM)s because the Perl code has developed piecemeal over the last ten or so years in an environment where there was no design authority which encouraged developers to think beyond getting their immediate task done."

    Duh... remember Larry Wall and his stated philosophy wrt Perl?!?

    "Many organisations are in the same situation, with large amounts of unwieldy Perl code..."

    Errr... yes. Exactly why you would want to staty away from Perl as much as possible.

    "can rewrite our systems to take account of everything that weâ(TM)ve learned in the last ten years..."

    Yep in a better language than Perl...

  175. you guys keep thinking it's a technical issue by doom · · Score: 1

    Okay the trouble here is that you guys keep thinking this is a technical issue, but it just isn't

    First of all, it's debatable whether "corporate" types in general "hate perl" -- no doubt some of them do, but you can also find many companies with successful perl-based businesses who aren't going to switch to the language-of-the-month just to keep up with the Joneses.

    If there's been a shift away from perl (and I have my doubts there really has been), it's almost solely because a lot of people who like to pose as uber-geeks have been talking trash about it, and the reason they've been talking trash about it is almost solely because they feel insulted by Larry Wall. Over the years Larry Wall hasn't been shy about explaining his design philosophy, which is essentially that computer science nerds have an irrational addiction to ideas like "mathematical elegance", when computer languages are tools for human beings to use -- so he looked to linguistics for inspiration.

    Now, if you want proof that this is essentially just talking-trash and not anything like a reasoned debate, consider the situation with PHP. Until recently it didn't even have namespaces. By any objective standard, you would expect a CS geek to regard PHP as a piece of garbage compared to perl -- and yet, the uber-geek hit squad is rather silent on the subject, no?

    On the plus side: I find it somewhat encouraging that if you look at the actual market penetration of things like Ruby on Rails, essentially no one is using it, despite years of intense hype from many quarters -- it could be that the suits are finally making technical decisions based on something besides nerd-chatter.

  176. Oh great: he likes language plug-ins by doom · · Score: 1

    We already have a means to achieve this separation for client-side code today: browser plug-ins. Of course, most Web developers will tell you that plug-ins are a Bad Thing. Every time you force the user to download and install a plug-in, says the popular wisdom, you throw a roadblock in front of your code. But is that really true?

    Well, yes, it really is true. And further, plug-ins are apparently a severe pain to implement in a cross-platform way -- I use AMD64 boxes myself, and there's still no native flash plug-in, for example. And if firefox extensions are any guide, we can also look forward to plug-ins breaking when you do browser upgrades.

    Further, the entire premise (what the web needs is more languages!) is fundamentally flawed, because it obsesses about the technical characteristics of languages, and ignores the social aspects -- as you get more languages in play, you sub-divide the community of developers and complicate the sharing of techniques and so on.

    1. Re:Oh great: he likes language plug-ins by doom · · Score: 1

      Oops. Replied in the wrong discussion. Sorry about that.

  177. s/perl/scapegoat/ig by IchBinEinPenguin · · Score: 1

    Much easier to daemonise communists^Wterrorists^Wforeigners^Wperl than to admit a management failure that allowed business critical systems to get into such a poor state.

  178. Thank you by LostMyBeaver · · Score: 1

    I am genuinely greatful to you for replying for providing me with the first well written response to one of my Slashdot posting. After a long time of posting on this site, the frustration of receiving unjustified flames has driven me to write most of my postings in a model that invites flames.

    Your response has provided me with at least a little faith in the direction that there are in fact rational people participating on this site.

    While I also avoided the web early on, seeing it as little more than glorified desktop publishing, I can see parallels in my experiences to nearly everything you said.

    With every popular platform of development there will always be some language or tool which appeals to the general masses whom will utilize the "simplest" and cheapest technology to accomplish their goals. After all, for the most part, many of these people desire to get their projects up and running, they themselves don't actually know the difference between clean and sloppy coding styles.

    Now that I think of it, during my lifetime, there was an obvious trend towards BASIC derivatives (GWBASIC, QuickBasic, Visual Basic) until recently when languages like Perl, PHP, server side JavaScript, and C derivatives took over.

    Being a chronic C++/Assember coder through and through I will say that since the beginning of the web, I have classically insisted on the use of interpretted languages (or environments such as virtual machines) for web based applications since I have long believed that even superb C++ programmers could not possibly reliably produce compiled code securely. A quality interpretted language will throw exceptions when memory boundaries are violated where compiled languages require the developer to provide that functionality explicitly.

    Well off I go to work on my current project, which today requires me to track memory leaks and to perform bounds checking on a code base of 1.2 million lines across 400 modules written by 20 in-house developers and 100 open source guys. Sometimes I really like interpretted languages.

    1. Re:Thank you by furry_marmot · · Score: 1

      Sorry for the late reply. I got involved with work and life and haven't been to Slashdot in a couple of weeks.

      First off, you're welcome. But I think it's a little more organic than you make it out to be. It's not always about people choosing the simplest or cheapest solution, and for untrained ad hoc coders, coding style is an alien concept. That's not to put them down, though. Let me share a little more of what I referred to, since I was one of those inexperienced coders, once upon a time.

      I was a Psych major in school and came to computers from the side. Back in the 80's, I had taken a Pascal course in college, and later on taught myself AppleBASIC on an Apple IIe. When that was too slow for what I wanted, I learned Assembly. A few years later I was working in a company that made PC software and someone gave me a copy of QuickBASIC, which compiled to EXE for DOS. I learned a variety of BASIC variants, including the many types of macro languages in Lotus and Microsoft products, as well as writing applications in dBase III. I also learned C, but since I wasn't a developer and was mostly writing tools for my own productivity, I often fell back on QB because the coding and debugging cycles were much shorter.

      Eventually I found myself working in the Desktop IT department (the company was growing from a "startup" to a rather large company, and transfers were frequent) and was tapped to install Lotus Notes for the Prod Dev dept. Having also written product manuals and help files, I was fascinated by the notion of hypertext. My first "hypertext document" was a Windows help file, combining various departmental info, the company phone list, and a map of the facilities. The director of the Application IT department (that managed the Oracle apps) saw this and got me transferred to help create our first intranet. This was when the web was just going mainstream and some people were really trying to exploit it, while others thought it was just a toy.

      I built a lot of discussion boards, phone directory searches, and departmental templates with my rudimentary HTML and Perl knowledge. Professional coders would have built a better product, but management didn't want the pros to take time away from their fancy retail products or their expensive Oracle applications, and no one yet saw the value of contracting a professional coder, so it was me and a couple of friends or nothing at all. Eventually I became quite a solid coder, and I continued to push for management to own some of the systems I had written that they were now relying on.

      Well, you know it: it wasn't until after I left that they started to rewrite the intranet. Some would (and did) say that those early efforts were crap and they clearly had to be replaced. I would say that the company got a lot of value out of those early crap efforts, and it made it easier for them to design the cohesive back-end that they eventually went on to build. But here is ultimately the crux of the discussion. Management never owns anything until they need to. Then they come in with a "Calm down, the experts are here now with ALL the answers" attitude that belies the fact that they were forced to respond to something like the original coder leaving.

      I've heard plenty of crap hurled at Perl, but when all is said and done, I've seen and worked on plenty of web apps written in ASP, Cold Fusion, PHP, Oracle Apps, or Perl/CGI. Each was replaced by another at some point, and each time the villain was always made out to be the tool and not the tool user. The real cost/benefit analysis would examine utilizing all that working code as part of a rewrite, versus starting from scratch. Sometimes they will consider it. Usually not.

      C'est normal. C'est la vie.

      Cheers!

  179. Compare Ruby and JAVA, not RoR and JAVA by Anonymous Coward · · Score: 0

    >RoR in a week that would've taken 4 weeks in Java.
    Well NO SHIZ SHERLOCK
    Try comparing RoR and Trails or Ruby and JAVA, not RoR and JAVA

  180. Russian not readable by Anonymous Coward · · Score: 0

    [to me]
     
    I have never studied Russian. Others who have studied Russian, but only briefly, will surely agree that Russian is not readable. [to them]
     
        All reasonable, intelligent people will find vacuous the argument that "Russian is not readable" when spewed from those not literate in Russian. Why is it, then, that in discussions of computer programming languages, the very same argument is so widely considered valid?