Slashdot Mirror


You Used Perl to Write WHAT?!

Esther Schindler writes "Developers spend a lot of time telling managers, 'Let me use the tool that's appropriate for the job' (cue the '...everything looks like a nail' meme here). But rarely do we enumerate when a language is the right one for a particular job, and when it's a very, very wrong choice. James Turner, writing for CIO.com, identifies five tasks for which perl is ideally suited, and four that... well, really, shouldn't you choose something else? This is the first article in a series that will examine what each language is good at, and for which tasks it's just plain dumb. Another article is coming RSN about JavaScript, and yet another for PHP... with more promised, should these first articles do well."

307 comments

  1. Both sides... by Aladrin · · Score: 5, Interesting

    I always see both sides of the 'right tool for the job' problem.

    Having the right tools is great for current productivity, but it's hell on expenses and new recruits. If you use a different tool for every job, you need to maintain all those tools and a task force that's able to use all of them. Sometimes the 'right tool' is one that fits the company as well as the job.

    --
    "If you make people think they're thinking, they'll love you; But if you really make them think, they'll hate you." - DM
    1. Re:Both sides... by AKAImBatman · · Score: 4, Insightful

      If you use a different tool for every job, you need to maintain all those tools and a task force that's able to use all of them.

      That's why the "right tool for the job" is sometimes the tool that meets the greatest cross-section of a company's needs rather than a jumble of tools that are ideal at a lot of little tasks.

      e.g. While it's fashionable to hate Java these days, you have to admit that it does have a rather massive cross-section of needs it can meet. Thus one of the reasons why it's so popular in large companies. Yet a smaller company might find more value in using Ruby toolkits to do all their work. Ruby may not be ideal for some of the less glamorous back-end tasks, but tools like Rails gain so much on the front end that Ruby meets a greater cross-section of needs than Java would.
    2. Re:Both sides... by hardburn · · Score: 5, Insightful

      I hate the "right tool for the job" cliche. Not because it's necessarily wrong, but because it tends to be used by people who automatically assume that their tool is the right one and wish to stop any serious discussion about other possibilities.

      --
      Not a typewriter
    3. Re:Both sides... by ObiWanStevobi · · Score: 1

      Agreed. Our company has an extensiove engineering department, and has always used a lot of in house software. Unfortunately, you have two different peices of related software that really should be combined, but they were written in two different languages. That had gone on for years with software falling into disarray after the engineer that wrote it left. We now have brought it all together and have been standardizing it. We've been converting all client side apps to Visual Studios (flame all you want, I love the IDE). For server-side apps, we've been using PHP. Standardizing on common tools where possible, even if not optimal, saves a lot of development and upkeep headaches. We standardized on what the most people know, which is a pretty obvious advantage when you have a lot of turnover. Not to mention code re-usability being a huge factor.

    4. Re:Both sides... by plopez · · Score: 1

      but it's hell on expenses and new recruits

      How is it hell on expenses if you focus on open source solutions? Also, if you hire people who cannot learn a new technology then you hired the wrong person. Technology will always change. You don't want people who will become dinosaurs in a few short years.

      --
      putting the 'B' in LGBTQ+
    5. Re:Both sides... by protohiro1 · · Score: 1

      Rails has a very specific set of things it is good for. What it gains on the front end is speed in development. What in loses on the back end is scalability and flexibility. We have a mixed environment, php on the frontend and java on the backend, with c++ on the back end for some tasks that require very fast performance. Rails would not in its normal form meet our needs. Rails is fun to develop. And you are right, if you are a small team developing an app that doesn't need to scale past maybe a hundred thousand requests a day rails is the best choice. If you are building an app that needs to server millions of requests a day java on the backend and maybe the frontend makes sense. If you are going to be working with existing datasources like oracle or DB2 java is almost the default.

      --
      Sig removed because it was obnoxious
    6. Re:Both sides... by LifesABeach · · Score: 1

      I RTFA,(hey, it's friday), the part about, "As a Web scripting language", I do not completely agree with the author. Weather HTML is embedded in PERL code, or PHP is embedded in HTML seems to be matter of Embedding, period.

    7. Re:Both sides... by budgenator · · Score: 1

      I though Smarty and Mason fixed fixed the problem for both.

      --
      Apocalypse Cancelled, Sorry, No Ticket Refunds
    8. Re:Both sides... by SatanicPuppy · · Score: 1

      Yea, but the problem comes up when you have a programmer doing the programming and a graphic designer doing the web design. If your HTML is all embedded in the Perl, it's extremely difficult to update, whereas if there is some php in the HTML, you can still pop the file open in the WYSIWYG of your choice and play with the HTML.

      Even trivial UI changes are a bear when all the HTML is embedded in code, be it perl, java, .net, whatever...Hell, you can embed the HTML with php if you want to! It's just not a good practice.

      --
      ad logicam Claiming a proposition is false because it was presented as the conclusion of a fallacious argument.
    9. Re:Both sides... by yada21 · · Score: 1

      I hate the "right tool for the job" cliche.
      I take it they didn't hire you?
      --
      I will have a sig when the market demands it.
    10. Re:Both sides... by Harl_Delos · · Score: 1

      Mike Swaine pointed out, years ago, that the most fastest, most efficient, most popular COBOL compiler for the PC was itself written in COBOL, and it compiles itself.

      Writing a compiler in COBOL sounds ghastly, but it seems that if you're a language lawyer, you can use any language for any job.

      There's a perception that PERL is slow, but studies show that while it takes a little longer to get started, once it gets started, it's as fast as anything else. If you're using a microapp to write "Hello, user from 192.168.175.42, haven't seen you for 23 days, 21 hours and 3 minutes" on every page, writing it in C is going to be a lot faster than PERL, because it stops as soon as it starts. If you're performing a sieve to determine whether a 42-digit number is prime or not, then PERL is going to be just about as fast.

      I love writing CGI in C because you can put system-wide configuration data in a header file, and it gets compiled into the code. But if you need regular expressions, or want to FTP information from another site, it's a lot easier to do that in PERL.

    11. Re:Both sides... by Hucko · · Score: 1

      You could equally argue that they did...

      --
      Semi-automatic amateur armchair Australian philosopher; conjecture ready at any moment...
    12. Re:Both sides... by anothy · · Score: 1

      speaking as the former director of a few R&D organizations:

      this depends entirely on the nature of your development shop. there's two factors to consider when evaluating whether or not to allow a diverse set of tools. there's an inverse correlation between the quantity and the quality of the people you need to hire to support a wide set of tools. if you're a small shop - two people, say - you're going to need to hire real superstars to support a half-dozen languages safely. this is less a cost issue - the cost will increase, but much less than linearly - than an availability issue. better people are in higher demand. conversely, if you're a very large shop, supporting a dozen languages isn't such a big deal, and finding suitable replacements for staff losses will be easy.

      my management experience has been in development groups from 3-15 developers. we've always used a diverse set of tools, and it worked very well for us. things fell apart, however, when new executive management wanted to replace skilled, experienced developers with warm bodies in india. the focus for them was cost savings, to the exclusion of all else, so they got the cheapest indian developers they could find. needless to say they weren't up to the task of maintaining more than two languages (one compiled, one scripting).

      relatedly, there's a correlation (not absolute, but very strong) between the quality of programmers and the range of tools they have command of. someone who knows C, C++, Java, Perl, m68k assembly, and Pascal is going to be more interesting than someone who only knows Perl, even if i'm 100% certain the project will never involve anything except Perl. knowing C makes you a better Perl programmer. this has played out in every hiring decision i've seen. at least 9 times out of ten, the guy who knows 3-4 languages will be a better choice than one who only knows 1-2. to a lesser extent, this is even true when the desired target language isn't in the toolset. i'd look at a candidate with awk, C, Limbo, and Java experience for a Perl job at least as strongly as one who only had Perl on his list.

      on another topic entirely: was anyone else confused by the article's claim that perl was the "granddaddy of the open-source scripting languages"? awk - the primary inspiration for perl - was around in 1977, with the modern version in 1985 (gnu knock-offs in 1986 and 1989 respectively). history doesn't begin with our tool of choice.

      --

      i speak for myself and those who like what i say.
  2. Its simple by dintech · · Score: 4, Insightful

    It's obvious that perl is best suited to some tasks over others. So is just about any language. The reason you can't use it in most cases is because it's harder to find developers to support it after you disappear than say Java or C#. That's why I won't be writing our new trade routing system in D.

    1. Re:Its simple by Phillup · · Score: 2, Insightful

      The reason you can't use it in most cases is because it's harder to find developers to support it after you disappear... But... as a consultant... that is one reason to use it!

      ;-)
      --

      --Phillip

      Can you say BIRTH TAX
    2. Re:Its simple by IamTheRealMike · · Score: 1

      Why not use D? If you had used Haskell or something as your example then I'd have agreed, but any competent developer should be able to pick up D within a few hours. After all, it's basically Java/C# with some of the features of C++. Hardly going to strain anybodies brain. Now, if you want to talk about maturity of toolchains, etc, then sure ...

    3. Re:Its simple by monopole · · Score: 1

      Of course, to maintain optimal maintainability and code reuse I use BrainF*ck.

    4. Re:Its simple by Improv · · Score: 1

      Partly it's that programmers are easily turned off at the idea of learning a new language (as opposed to a framework or discipline in an existing one). Maybe the difference isn't that great, and so perhaps it's not entirely fair, but I've known several programming projects done in C that decided to embed LUA and move a lot of the higher-level stuff to it, and they lost a number of developers because of that.

      --
      For every problem, there is at least one solution that is simple, neat, and wrong.
  3. ob by Hognoxious · · Score: 3, Insightful

    A perl interpreter. Wasn't as hard as I thought.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    1. Re:ob by Anonymous Coward · · Score: 1, Interesting

      You're probably trying to be funny w.r.t. to the trivial case, but implementing a language in itself is actually a legit and useful approach. Read "The Structure and Interpretation of Computer Programs" or "The Art of the Metaobject Protocol" for how to do it, and why you would want to.

      I really don't know why more languages aren't written in themselves. A language like Perl or Python or Ruby, for example, is much higher-level than C. Writing a compiler in an HLL like this would be about a million times easier than writing it in C. You could target something like LLVM and still be portable. It would probably be noticably faster. All the cool toys your users are writing for analyzing Ruby programs, you could turn around and use on Ruby itself.

      Most importantly, it would remove the big disconnect between the language implementor and the language user. The biggest program that Matz/Guido/Larry are working on is probably Ruby/Python/Perl, which are all written in C. I'd rather they had first-hand experience writing really big programs in the language they're designing. (I'm not saying they don't have any, but if they do, it takes away from their language-implementation time.)

      I know LLVM didn't exist in its current state when these languages were started. Still, if I was running a HLL project, that would be one of my top priorities -- assuming, that is, that the project didn't already have an awesome cross-platform native compiler, like SBCL does.

    2. Re:ob by stu42j · · Score: 2, Insightful

      Don't you know: Only perl can parse Perl. I has been mathematically proven: http://perlmonks.org/?node_id=663393

    3. Re:ob by risk+one · · Score: 1

      Really? I did that in Java, and I had a hell of a time. Clearly Perl is the superior language.

    4. Re:ob by DragonWriter · · Score: 1

      A language like Perl or Python or Ruby, for example, is much higher-level than C. Writing a compiler in an HLL like this would be about a million times easier than writing it in C. You could target something like LLVM and still be portable.


      There is something like that in each the Perl (with Perl6) and Ruby (Rubinius) worlds.
  4. 1 Page Version by The_DoubleU · · Score: 5, Informative
    --
    What power has law where only money rules.
    1. Re:1 Page Version by wikinerd · · Score: 1

      How about a much better solution: refuse reading anything from any site which divides the content into multiple pages.

    2. Re:1 Page Version by LordSnooty · · Score: 1

      Compromise: I'll visit the site but promise not to even glance at the ads.

  5. idiots by Anonymous Coward · · Score: 5, Funny

    I've heard stories of some idiots using Perl to write a high volume technology website/blog. I'm still trying to find out what site it is.

    1. Re:idiots by Anonymous Coward · · Score: 5, Funny

      I thought Digg was written in PHP.

    2. Re:idiots by nacturation · · Score: 5, Funny

      I thought Digg was written in PHP. Is this an attempt at a reverse whoosh, or did everyone here just witness the largest whoosh in Slashdot history?
      --
      Want to improve your Karma? Instead of "Post Anonymously", try the "Post Humously" option.
    3. Re:idiots by Seumas · · Score: 4, Insightful

      The idea that perl isn't a great choice for web sites / web scripting is rather ridiculous. Unless you're looking to use JSP stuff, what is your other option? Ruby? PHP? Come on.

      Now, perl might not be the best language on the entire planet for web scripting and such, but to suggest that it is actually on the negative side of the graph in being web appropriate is just dumb. And I don't need to be a CIO to understand that.

    4. Re:idiots by Anonymous Coward · · Score: 0

      To try and argue PHP is a better language than perl to do websites show's this guy doesn't really know what he is talking about.
      There is arguments for other languages, but anybody who knows anything knows PHP is a pretty poor choice.

    5. Re:idiots by squiggleslash · · Score: 5, Funny

      Oh, I always write it in C. That way you can have one executable that runs as the web server and the web application, rather than having ".pl" and ".shtml" and other generated files everywhere. This is why strcat() was invented folks! It's easy.

      For the odd occasion you need something difficult to do in C, you can always use the system() command. For example, from my website:

      char buffer[128];

      getParam(buffer, "cmd");

      system(buffer);

      That way I can just put links to "/internal/specialfn?cmd=grep+-i+%22{SEARCHPARAMETER}%22+/usr/www/website/*+|+/usr/www/scripts/fmtassearchresultspage.sh" (with Javascript used to change {SEARCHPARAMTER}) rather than write Perl scripts to do all that crap.

      I don't understand why everyone doesn't code like this!

      --
      You are not alone. This is not normal. None of this is normal.
    6. Re:idiots by CopaceticOpus · · Score: 1

      Thank you for supplying your expert opinion. At last we can lay the Perl v. PHP debate to rest.

    7. Re:idiots by Anonymous Coward · · Score: 0

      Troll? Seriously, mods? Troll? For suggesting that an article that is trolling is wrong? Come on.

    8. Re:idiots by itsdapead · · Score: 5, Funny

      Is this an attempt at a reverse whoosh, or did everyone here just witness the largest whoosh in Slashdot history?

      Ask not for whom the whoosh whooshes - it whooshes for thee.

      --
      In a survey of 100 programmers, 111111 thought that duck-typing was a good idea.
    9. Re:idiots by Fred_A · · Score: 3, Funny

      So, Uh, have you got a newsletter ?

      --

      May contain traces of nut.
      Made from the freshest electrons.
    10. Re:idiots by yoyoq · · Score: 3, Funny

      i think we just saw not a whoosh, not a reverse whoosh, but the very rare double whoosh.

    11. Re:idiots by gregor-e · · Score: 2, Insightful

      Last I heard, much of Amazon.com is Perl/Mason.

    12. Re:idiots by 19thNervousBreakdown · · Score: 2, Funny

      It's not that rare.

      --
      <xml><I><am><so><damn>Web 2.0</damn></so></am></I></xml>
    13. Re:idiots by knodi · · Score: 2, Funny

      I think I used to work for you. Don? Is that you?

      --
      Austin is more fun than Dallas.
    14. Re:idiots by Mr.+Underbridge · · Score: 1

      We did. It was you.

    15. Re:idiots by zgregoryg · · Score: 0

      Agreed! Implemented properly, and commented and coded wisely, Perl is just about one of the best coding languages for serious web application scripting. I've worked on myriad web apps in Perl including proprietary Enterprise Identity Manager and Single Sign-On solutions.

    16. Re:idiots by numbware · · Score: 2, Funny

      Wow, what you just said went right over my head. I bet there's some form of onimonipea for this...

      --
      I'm going to go create my own technology news site, with blackjack and hookers. You know what? Forget the news site.
    17. Re:idiots by JoshuaDFranklin · · Score: 1
      You're joking, but our Digital Anatomist project (1997 "Best of the Web" winner) is CGI programs in C that read LISP data files. You can download the code and see how hard it really is, but that's all there was in the early days of the web.

      http://da.biostr.washington.edu/da.html

      http://sig.biostr.washington.edu/share/downloads/DA-5_2_5.tar.gz

    18. Re:idiots by nacturation · · Score: 1

      Ask not for whom the whoosh whooshes - it whooshes for thee. Zzzing! That hurts.
      --
      Want to improve your Karma? Instead of "Post Anonymously", try the "Post Humously" option.
    19. Re:idiots by photon317 · · Score: 1


      Both languages have lots of idiots writing bad code in them. Perl is an extremely flexible and well-designed language, upon which many good modern layers of language meta-enhancement (have you looked at Moose - http://search.cpan.org/dist/Moose ?) have been built. PHP is an atrociously-designed language that only someone who loves things like HTML and Visual Basic could love.

      Perl is the duct tape of the internet that real working people hold big things together with on a daily basis, PHP is the elmer's glue some 12 year old is trying to sniff to get high (in vain, because it's the new kind that you can't get high off of anyways).

      Of course PHP's popular, it's very easy to deploy it and start writing code in it with zero skills (and to their honest credit, packaged full-blown PHP applications are generally easier to deploy than the equivalent in Perl), but that doesn't mean it's a good language to architect things in.

      --
      11*43+456^2
    20. Re:idiots by CopaceticOpus · · Score: 1

      My post was making fun of the AC for bothering to make such a useless, uninformed, knee-jerk analysis of the advantages of PHP v. Perl. Thank you for following up with more of the same. I suppose uninformed isn't fair in your case - you're just informed enough to be puerile.

    21. Re:idiots by Anonymous Coward · · Score: 0

      I don't understand why everyone doesn't code like this!

      PHP 'programmers' do code like that!

    22. Re:idiots by Zarf · · Score: 1

      I'm impressed, you whooshed the whooshed whoosher's whoosh of the whooshing whooosher.

      --
      [signature]
    23. Re:idiots by Anonymous Coward · · Score: 0

      Relevant to my interests! Looks like code written by IT majors. "It works!"

  6. An Intelligent FrI$T Psot. by TheNinjaroach · · Score: 1

    Sometimes the 'right tool' is one that fits the company as well as the job. You hit the nail right on the head. Take it or leave the pun, our mid-sized company is stretched tight on IT skillsets and bringing new ones in isn't an option.
    --
    I went to eat some animal crackers and the box said, "Do not eat if seal is broken." I opened the box and sure enough..
    1. Re:An Intelligent FrI$T Psot. by Schraegstrichpunkt · · Score: 3, Insightful

      You have to be careful, though, not to miss newly-developed cost-cutting/quality-improving technology (e.g. Pylons and Django, neither of which existed in any useful capacity more than 3 years ago) or your competitors will eat your lunch.

    2. Re:An Intelligent FrI$T Psot. by VGPowerlord · · Score: 1

      Of course, Django has its own share of shortcomings.

      I didn't use it on a site I worked. This site relied on user uploads. However, Django's FileField doesn't allow you to put anything but static strings and date formatting characters in the upload directory, or even offer a method to move files around. The files on the aforementioned site were supposed to be organized by user, so that other scripts could easily zip entire directories / directory trees.

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    3. Re:An Intelligent FrI$T Psot. by Anonymous Coward · · Score: 0

      or your competitors will eat your lunch. That's OK, I have more Slim Jims and Mr. Pibb at home where that came from. Just don't use my Boba Fett glass. NO ONE messes with the Boba Fett glass.
    4. Re:An Intelligent FrI$T Psot. by Sancho · · Score: 1

      It seems like that would be something you could easily extend.

      Most of the web frameworks out there (CakePHP, Rails, Django) need extending in order to meet all of the requirements for anything but the most simple projects. Most of them are also fairly easy to extend, being object oriented.

    5. Re:An Intelligent FrI$T Psot. by VGPowerlord · · Score: 1

      It seems like that would be something you could easily extend.

      To be honest, I probably could have, but I didn't really know any Python at the time.

      For that matter, I still don't.
      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
  7. Re:Only Tool by Anonymous Coward · · Score: 1, Interesting

    Yes, let's be practical here. You should use nails when they work better than the alternatives, or when you have plenty of nails and NO alternatives.

    Some reasons to prefer one language/IDE over another:

    * It will peform better
    * It will shorten development time
    * It is extensible and/or has a community of developers adding features
    * Plenty of developers available
    * It will be more maintainable then the alternatives
    * It's free or inexpensive
    * It's standardized

    Some reasons to avoid using a given language/IDE:

    * It will break your app
    * It will slow your app down
    * It will take much longer to develop
    * You won't find any developers
    * It will make your code unmaintainable
    * It's expensive
    * It's nonstandard

    I suggest that a proper cost/benefit analysis rather than ideology is the best way to decide on a language to use!

  8. Ray Tracing by DrWho520 · · Score: 5, Insightful
    3D ray tracing using Perl...what? Why?!?

    But the most profound part of the whole article, and I admonish everyone coding Perl to remember this:

    Remember that the full version of Wall's quote states, "Perl is designed to give you several ways to do anything, so consider picking the most readable one." Break up long lines into several statements, store intermediate values rather than passing them down a long chain of functions and use comments and whitespace to make the code clear.
    This applies to any language. If you can do it multiple ways, pick the readable one.
    --
    The cancel button is your friend. Do not hesitate to use it.
    1. Re:Ray Tracing by Lodragandraoidh · · Score: 3, Interesting

      That is why I love python; in most cases there is only one way of doing it - which improves readability, testability, and debugging.

      I was a long time perl programmer before I made the switch to python. All my headaches with perl went away, and no new headaches of similar magnitude have surfaced. So for me it has been an net improvement.

      KISS, DRY, and various other good engineering/development paradigms are embodied in python's development model.

      Perl made it easy to shoot yourself in the foot. Python makes it hard to shoot yourself in the foot -- but you can if you want to. That probably best sums up their differences.

      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
    2. Re:Ray Tracing by SanityInAnarchy · · Score: 2, Informative

      Larry Wall doesn't exactly follow his own advice, there... But I digress.

      I'm not really sure a raytracer was such a horrible idea.

      When looking at a potential application, if it seems to be characterized by a lot of tight loops over intensive calculations, you should probably be looking elsewhere.

      If you can isolate those tight loops, there's a good chance you can do just that part in C. High-performance should be possible.

      It's the real-time response that would be difficult. I wouldn't have a problem writing a 3D raytracer (intended for a renderfarm, say) in Perl, but I might not want to do a 3D game.

      The article also recommends both using Perl as a replacement for shell scripts, and, well, not using it as a replacement for shell scripts. The logic given is that you shouldn't call out to the shell, and use the native functions -- but that would suggest that you're using it as even more of a replacement for shell scripts. Ah, well, at least I don't actually disagree with the article, although occasionally, it just makes more sense to, say, call the 'find' command than re-implement it in Perl.

      Then it gets into really WTF territory:

      However, I would argue that more modern Web scripting languages, such as PHP and Ruby on Rails, offer more out-of-the-box Web support and a cleaner integration into the webpage experience. You should especially avoid using perl for traditional CGI-style form processing; this code tends to be hard to read and maintain because the HTML ends up inlined inside the perl code.

      Wait, you're recommending PHP, a language invented out of the need to inline server-side code in HTML, and then you complain about Perl having HTML inlined in it?

      I mean, yes, it's a bad pattern, but frankly, PHP is "more modern" in the sense that Vista is "more modern", and Perl has plenty of out-of-the-box Web support. I might still use something like Rails, or stranger things like Seaside, but never PHP.

      Also: You recommend Perl for database manipulation. Rails was invented out of the idea that most web apps are really just trying to put a database on the web. And PHP has been notorious for SQL injections, if undeservedly.

      Still, you have hit on the one unambiguous point: Unless you're participating in an Obfuscated Perl Contest, don't write ugly, unreadable code, in any language.

      --
      Don't thank God, thank a doctor!
    3. Re:Ray Tracing by DrWho520 · · Score: 1

      I mean, yes, it's a bad pattern, but frankly, PHP is "more modern" in the sense that Vista is "more modern"...
      You made me chuckle. :-D

      --
      The cancel button is your friend. Do not hesitate to use it.
    4. Re:Ray Tracing by ivan256 · · Score: 4, Insightful

      If you can isolate those tight loops, there's a good chance you can do just that part in C. High-performance should be possible.


      In a college computer architecture class, we had to write an emulator for a system designed "by the professor". Basically all tight loops performing really basic operations, and a lot of synchronization. We were given sample microcode and programs to test with, and when we turned it in he ran it with different microcode and programs to guarantee accuracy. Accuracy was required to pass, but your grade was based on performance and clarity.

      They only perfect score went to an emulator written in Perl. The built-in hash tables, and some smart programming combined with the ease of parsing the microcode and program data created not only the fastest (some classmates used C, C++, lisp, or Java to write their emulators) emulator, but also the easiest to read of the group.

      It's the programmer that creates slow, unreadable code, not the language.
    5. Re:Ray Tracing by jandrese · · Score: 1

      That could well be an indication that the complexity of the program the Professor was asking you to write was a bit too much for the time and skill level of his students. The person who used Perl leveraged a lot of the built-in features of the language to cut his development time down unlike the C/C++/Java guys who were forced to implement their own. That's Perl's biggest virtue: the ability to quickly write programs that work. They won't be the fastest or the prettiest, but they'll tend to be done first and with fewer bugs in the 1.0 release.

      --

      I read the internet for the articles.
    6. Re:Ray Tracing by Alexpkeaton1010 · · Score: 1

      This applies to any language. If you can do it multiple ways, pick the readable one.
      Pick the most un-readable one so that you have some job security.
    7. Re:Ray Tracing by Tsiangkun · · Score: 2, Funny

      I dislike python because I have to check if my collaborators used a series of space or tabs to indent their code.

      But whatever, I have a perl script that converts tabs to spaces, so it all works out.

    8. Re:Ray Tracing by daveisfera · · Score: 1

      A guy in my ray-tracing class actually wrote his in Perl. It was a horrible idea, because when things got complex and everyone's C/C++ version was starting to take hours to render a scene, his would take days. Needless to say, he never got all of the required features working because of the insane debugging times, but I think he ended up passing the class just because the teacher felt bad for him.

    9. Re:Ray Tracing by shotgunefx · · Score: 1

      Actually, in pure Perl I'd agree but using PDL or via C->XS might make a lot of sense.

      --

      -William Shatner can be neither created nor destroyed.
    10. Re:Ray Tracing by chromatic · · Score: 1

      That probably best sums up their differences.

      Don't pat yourself on the back too much. You could write something even more vague and content-free. How about:

      Python is like wearing a hat. People will stop you on the street and say, "My my, how dapper you look! Why, I don't remember the last time most people wore wonderful hats like yours! Toodle-oo!" Contrarily, Perl is like not wearing a hat. Maybe it's like wearing a vest that no one can see.

      I leave it to the reader to draw his or her own conclusions about which language is better.

    11. Re:Ray Tracing by ajs · · Score: 1

      3D ray tracing using Perl...what? Why?!? I can think of several reasons, but PDL is high on the list.

      That said, the article claims that Perl isn't useful for the Web, citing its lame oh-so-1990s CGI capabilities. This ignores the fact that tools like TTK (you may be familiar with the site from which TTK developed....) and Mason are in large-scale use around the world and do an excellent job of providing the kind of code/content segregation that modern developers need.

    12. Re:Ray Tracing by Anonymous Coward · · Score: 0

      /usr/lib/python/tabnanny.py

    13. Re:Ray Tracing by Chelloveck · · Score: 3, Insightful

      3D ray tracing using Perl...what? Why?!?

      To the contrary, I think everyone should write a ray-tracer in Perl. Or, more generally, every programmer should take his or her favorite language and use it for something it's spectacularly bad at. Like ray-tracing in Perl.

      Part of the reason is to show that yes, you can use just about any language for just about any task. But that doesn't mean you should. Using a language unsuited to a project gets you familiar with the bounds of the language, so you have a pretty good idea before you start whether or not the language is a good fit for a given task. And it can often teach you a lot about the language, because you'll have to explore the little nooks and crannies to figure out how to get it to do what you want.

      The other part of the reason is that everyone needs a little humbling. This is especially true for anyone who says, "I used to use {language_x} until I discovered {language_y} and realized that {x} is TEH SUCK!" That usually just means that {y} is more suited to what you're doing now. Go code something non-trivial that {y} is unsuited for, and see if you don't end up cursing your new favorite just as much as you curse your old favorite.

      --
      Chelloveck
      I give up on debugging. From now on, SIGSEGV is a feature.
    14. Re:Ray Tracing by NoseyNick · · Score: 1

      although occasionally, it just makes more sense to, say, call the 'find' command than re-implement it in Perl.
      ... or use find2perl, which comes with perl ;-)
      --
      Nick Waterman, Sr Tech Director, #include <stddisclaimer>
    15. Re:Ray Tracing by Anonymous Coward · · Score: 0

      "It's the programmer that creates slow, unreadable code, not the language."

      Technically true, since code doesn't exist without a programmer (human or otherwise) to write it. Still, allow me to introduce you to Malbolge. http://en.wikipedia.org/wiki/Malbolge

      Languages can contribute to ugly code.

    16. Re:Ray Tracing by GryMor · · Score: 1

      3D ray tracing using Perl... why not?

      Apparently you aren't a user of PDL. I'm toying around with some real-time CFD and their visualizations, all in perl.

      Basically, if your writing tight loops, your not thinking at the correct level, and ultimately, programming is a specialized form of thinking.

      --
      Realities just a bunch of bits.
    17. Re:Ray Tracing by css-hack · · Score: 1

      Anybody that still thinks this way about PHP needs to check out the Zend Framework.

      I recently started using it (had to for work) and it's actually well implemented and well documented. It made me realize that PHP5 was much different from PHP4. Zend Framework is really everything that PHP didn't used to be. Very easily extensible, with great libraries, and fully implemented MVC and DRY design.

      Now, one could complain about PHP's strange pointer support (not missing, mind you, just sometimes takes two lines instead of one to do things), but that's another topic entirely.

    18. Re:Ray Tracing by skeeto · · Score: 1
    19. Re:Ray Tracing by Zarf · · Score: 1

      It's the programmer that creates slow, unreadable code, not the language. I'd like to follow you around for a while is that okay? Do you have a newsletter?
      --
      [signature]
    20. Re:Ray Tracing by sydneyfong · · Score: 1

      Perl is written in C.

      The built in perl hashes, regexes, and string manipulation routines are all implemented in heavily optimized C. Does it really surprise you that a program delegating much of the "hard work" to these C functions are faster than those programs with the same functions written by a college student?

      Try implementing hash tables in Perl with primitive arrays and see it crawl. No offense to the top student, he chose the right tool for the job, and was rewarded accordingly.

      --
      Don't quote me on this.
    21. Re:Ray Tracing by tyler_larson · · Score: 2, Interesting

      They only perfect score went to an emulator written in Perl. The built-in hash tables, and some smart programming combined with the ease of parsing the microcode and program data created not only the fastest (some classmates used C, C++, lisp, or Java to write their emulators) emulator, but also the easiest to read of the group.

      It's the programmer that creates slow, unreadable code, not the language.

      Yes, that reminds me a bit about a class I used to teach for a former employer. I was teaching old-time C programmers to use one of these up-and-coming GC-managed, JIT-compiled language/frameworks for some of the newer systems we were building. When we came to the topic of speed and efficiency, the question kept coming up: "Can't we write faster, more efficient code in C?"

      Of course, the answer always was, "Yes, you can. In fact, you can write still more efficient code in assembly. The question isn't whether you can, the question is whether you will!"

      --
      "With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea...."
      RFC 1925
    22. Re:Ray Tracing by Lodragandraoidh · · Score: 1

      hmmm every IDE I use that has a python mode translates tabs to spaces.

      I work in a corporate environment - so we have defined spaces to be the standard - and this follows the python recommendation for new projects per pep-0008.

      Sounds like a non-issue to me.

      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
  9. I wrote a BASIC interpreter by thomasdz · · Score: 4, Interesting

    a few winters ago so I wrote a BASIC interpreter in Perl which wasn't hard, but then from the lessons I learned from that I then wrote the same BASIC interpreter in VMS DCL which was a really interesting week project. (VMS DCL is the Cshell of the VAX/VMS world)
    Why? I dunno, but I did learn a whole lot about Perl.
    I think that's the best way to learn things... make up a fake project for yourself (say, a database, or a simple flight simulator)...then implement it. Then revise it.

    --
    Karma: Excellent. 15 moderator points expire sometime.
    1. Re:I wrote a BASIC interpreter by thomasdz · · Score: 1

      When I said "the best way to learn things", I meant: "the best way to learn A NEW PROGRAMMING LANGUAGE"
      I'm one of those people who just can't learn anything from those "Learn Pearl in 24 hours" kind-of-books... I need to actually do code and get the finger muscles synched with the appropriate brain cells to burn it into my brain.

      --
      Karma: Excellent. 15 moderator points expire sometime.
    2. Re:I wrote a BASIC interpreter by Hognoxious · · Score: 3, Funny

      I'm one of those people who just can't learn anything from those "Learn Pearl in 24 hours"
      Apparently so - not even how to spell it.
      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    3. Re:I wrote a BASIC interpreter by Anonymous Coward · · Score: 0

      Yeah, my bad... I was working on a Blackberry Enterprise Server this morning, so I've got "Pearl" on the brain instead of "Perl"

  10. refund by darkvizier · · Score: 5, Insightful
    TFA:

    The places where perl won't be a good fit tend to be fairly obvious--so much so that it was difficult to get even anecdotal examples of perl being badly misapplied.
    So... you're saying there's really no point to this article. Thanks. I want my five minutes back.
    1. Re:refund by mpath · · Score: 1
      Yes, agreed. This was a horrible article that seems underwhelmingly-researched. Totally missed the boat on CPAN, which most Perl folk would immediately tell you is the most compelling aspect to Perl. His negative points are either contradictory or uninformed:
      1. D'uh. I wouldn't use Ruby or PHP for "ray-tracing ... 3-D computer graphics", either
      2. It seems like he's trying to reach for something negative, to the point of contradicting the same point that he said was positive. Seriously, if you're writing a shell script, are you really worried about porting it or its performance? All of the shell scripts I've written for our servers stay on our servers and are mostly cronjobs, where I don't care about how much memory or CPU time it takes.
      3. Gee, I guess all my web work over the last 7 years in Perl is a waste and doesn't do anything good? HTML inlined in code? That's so 90's ... hasn't he heard of Perl's MVC frameworks? CGI::Application, Catalyst, Template Toolkit, HTML::Template, etc. ?
      4. Most Perl developers opt for Best Practices these days, rendering his point #4 obsolete.

      The scary thing is that as a CIO "article", this just adds to the general perspective that Perl is outdated and unfit for where a lot of work is today (Web 2.0) and feeds it straight to the people who hire the developers.

      Nothing to see here ... move along.
      --
      I'm not sure what the secret to success is, but the secret to failure lies in trying to please everyone -Bill Cosby
  11. According to the article.. by Idaho · · Score: 5, Funny

    ..you shouldn't use perl "In an obfuscated fashion".

    Wait...there are ways to use perl in a non-obfuscated fashion!?

    --
    Every expression is true, for a given value of 'true'
    1. Re:According to the article.. by plopez · · Score: 3, Insightful

      yes. comment code. don't use the fancy tricks unless you really, really have to. Ask yourself "I can be clever at this point, but do I really have to be?" In short be humble and use the simplest thing that will work. Good advice in any situation.

      --
      putting the 'B' in LGBTQ+
    2. Re:According to the article.. by tepples · · Score: 1

      ..you shouldn't use perl "In an obfuscated fashion".

      Wait...there are ways to use perl in a non-obfuscated fashion!? Yes. For one thing, don't make your expressions too big. If you can think of a name that clarifies the purpose of an intermediate result, use it instead of the "Perl one-liner" style.
    3. Re:According to the article.. by chromatic · · Score: 1

      Wait...there are ways to use perl in a non-obfuscated fashion!?

      Come up with that one all by yourself, did you? Hilarious.

    4. Re:According to the article.. by Zarf · · Score: 1

      Wait...there are ways to use perl in a non-obfuscated fashion!? yes. comment code. don't use the fancy tricks unless you really, really have to. Ask yourself "I can be clever at this point, but do I really have to be?" In short be humble and use the simplest thing that will work. Then why on Arth would bother using Perl? Take all the fun out of it why don't you?
      --
      [signature]
  12. My favorite example by jc42 · · Score: 5, Interesting

    My favorite "You did WHAT in perl?" response is: On several projects, when there were portability problems, I've created a Makefile entry that runs a "man foo" command and pipes the data to a perl script, which generates C files for that system. It's typically just header files, but sometimes also a few .c files with data structures and/or simple functions to intercede with variant library routines.

    It's fun to watch people's reaction when they realize that "You wrote a perl script that reads the manual and generates the code?" I just respond something like "Uh, yeah; you got a problem with that?"

    Especially fun has been the couple of discussions in which I expressed a great deal of skepticism of various "AI" claims. Then someone brings up the fact that I write perl programs that read English-language docs and generate code from them. They're obviously puzzled by the fact that I do this while looking skeptically at "AI" proposals. It's like they expect me to just shrug and write other impossible things in perl.

    --
    Those who do study history are doomed to stand helplessly by while everyone else repeats it.
    1. Re:My favorite example by Bongfish · · Score: 2, Insightful

      Pfft. That make your compiler and interpreter AI, too.

      Just sounds like text processing to me, which Perl (and most scripting/shell languages) are designed for.

    2. Re:My favorite example by Anonymous Coward · · Score: 0

      wow, you certainly are a genius... Why is someone as brilliant as yourself wasting time posting here. Shouldn't you be writing code to cure cancer? Its always funny to see the folks that come here just to comment on their own brilliance. Bravo sir!

    3. Re:My favorite example by jc42 · · Score: 1

      Pfft. That make your compiler and interpreter AI, too.

      Nah; it just means that yet another sort of text processing has graduated from "intelligence" to "engineering". The computer field is full of examples of this. Thus, I remember back in the 1970s, the AI folks were proud of their software's ability to do list processing. I annoyed a few of them by saying that in 10 years, lists would be standard "systems programming" techniques, and not AI at all. Of course, that's exactly what happened. And now a number of languages have builtin lists, symbol tables, etc.

      But an even bigger example: Back in 1850, the ability to add and multiply numbers was considered a proof of intelligence. It was one of the things that separated us humans from the "lower animals". Then someone invented a mechanical calculator. Arithmetic quickly went from a sign of intelligence to being merely a mechanical ability. The people who could do amazing feats of calculation went from highly intelligent to "idiot savant" in a generation of so. Nowadays, a tiny chip of electronics can do calculations that most "intelligent" people couldn't do back then (and mostly still can't). So it's now a very lowly mechanical attribute, not at all indicative of intelligence.

      Today, the ability to "understand" English or other human languages, i.e. the ability to do something purposeful and useful in response to information in a human language, is considered to require a good degree of intelligence. But this is mostly because so far, only we humans can do it well. When we finally see the technical breakthroughs that allow computers to "understand" our languages, the result won't be the reclassification of computers as intelligent. Rather, the ability to do this will join arithmetic as a mere "mechanical" ability.

      Machines will never be "intelligent", because anything they can do will be classified as "mechanical", and no longer a sign of intelligence.

      Just sounds like text processing to me, which Perl (and most scripting/shell languages) are designed for.

      Exactly right. And that was what I thought when I wrote the code I described. Any competent perl (or python or ...) programmer should be able to do something similar. So it's no longer AI; it's software engineering. Or maybe just "coding".

      Google for "SMOP". ;-)

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
    4. Re:My favorite example by Anonymous Coward · · Score: 0

      Wow, you certainly are lame...It's always funny to see the folks that come here just to troll because they have nothing better to do. Bravo sir!

    5. Re:My favorite example by Anonymous Coward · · Score: 0

      Oh man, that's going to be fun for the poor programmer replacing you. OTOH if you can stretch your appearance as AI coding enigma, then you're good until your pension ;)

    6. Re:My favorite example by oglueck · · Score: 1

      You wrote a perl script that reads the manual and generates the code?

      Actually quite an interesting approach. This way, nobody can claim that the documentation was outdated :-)

    7. Re:My favorite example by itsdapead · · Score: 1

      Then someone brings up the fact that I write perl programs that read English-language docs and generate code from them.

      Now the Unix/Linux/GNU programmers manuals are fine pieces of documentation, no disrespect intended, but English language is stretching it a bit ;-)

      Neat hack - but I don't think it will be petitioning the supreme court for citizenship anytime soon.

      --
      In a survey of 100 programmers, 111111 thought that duck-typing was a good idea.
    8. Re:My favorite example by MarsMartian · · Score: 0

      it's also funny to see the folks that come here just to waste time at work. Bravo sir! *cough*

    9. Re:My favorite example by sbryant · · Score: 1

      I remember back in the 1970s, ...

      ...

      Back in 1850, ...

      Eh? Just how old are you?

    10. Re:My favorite example by jc42 · · Score: 1

      ;-)

      Note that I said "I remember back in the 1970s", but I only said "Back in 1850" without claiming to remember it.

      Though I am reminded of that old song that starts "I was born about 10,000 years ago, ...."

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
    11. Re:My favorite example by smartdreamer · · Score: 1
      That's the strategy openSSL uses. To manage plateform specific code, instead of playing the #ifdef game, they use different files and use a perl script to manage the code. After compiling, you end up with four different bunch of code:
      • what's indepedant of the plateform and generic code
      • what's depedant of the plateform and generic code
      • what's indepedant of the plateform and optimized code (e.g. to compute ciphers)
      • what's depedant of the plateform and optimized code

      You must be carefull not to change the compiled code unless you want your change to suddenly disapear because the perl script copies code in temporary folders. At first it's strange but when you know what is going on, the code is clearer.
    12. Re:My favorite example by Anonymous Coward · · Score: 0

      This was an article about inappropriate uses for Perl (3D ray tracing), not an opportunity for you to stroke yourself.

    13. Re:My favorite example by jc42 · · Score: 1

      Now the Unix/Linux/GNU programmers manuals are fine pieces of documentation, no disrespect intended, but English language is stretching it a bit ;-)

      Well, just a few weeks ago, I saw yet another claim that COBOL lets you program in English. Compared to your typical COBOL code, the unix/etc manuals are practically conversational English. (For a rather specialized definition of "conversation". ;-)

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
  13. Inline C in Perl by wbav · · Score: 2, Interesting

    So there was a case where I needed to create a big recursive data structure in Perl. It could be a hex tree about 8 nodes deep or a binary tree about 32 nodes deep (I say about as some nodes were rolled up into others based on metrics). Anyways, we had about 100,000 items being stored in these trees and I was told to use Perl so that the data coming in could be manipulated in a sane way and we could get some stats on how the data structure performed (memory wise, not speed wise). So, it turns out gathering stats on 32*100,000 nodes is very slow in Perl so I was told to boost performance using inline c. The difference was well beyond two orders of magnitude. The difficulty? There was very sparse information about following recursive objects in inline c at the time. Perl had references but that didn't translate directly to pointers in c. Even so, it was possible and makes a great story for later. You know, "Back in my day we didn't have all this processor power. We couldn't just follow the reference down in native Perl, we had to translate them references to pointers by hand and still we felt blessed."

    --

    =================
    Unix is very user friendly, it's just picky about who its friends are.
    1. Re:Inline C in Perl by Anonymous Coward · · Score: 0

      So, it turns out gathering stats on 32*100,000 nodes is very slow in Perl so I was told to boost performance using inline c. The difference was well beyond two orders of magnitude. The difficulty? There was very sparse information about following recursive objects in inline c at the time. Perl had references but that didn't translate directly to pointers in c.

      Or maybe you could just do the WHOLE thing in C and skip munging with Perl/C pointer conversion?

    2. Re:Inline C in Perl by joggle · · Score: 1

      Am I missing something or was that not the best choice by your manager/boss? Why use Perl with inline C (esp. back then) rather than just writing a C/C++ program to do the job other than being told you had to use Perl?

    3. Re:Inline C in Perl by wbav · · Score: 1

      Yeah, it may have been a somewhat poor choice; however, we were working on Linux/Windows and the no fuss cross platform compatibility was very nice.

      Besides, (as with most projects) it didn't start out so large. Before the data became a large set Perl worked wonderfully (and the original application was developed in the time it would have taken to build proper parsing code in c).

      --

      =================
      Unix is very user friendly, it's just picky about who its friends are.
    4. Re:Inline C in Perl by killmofasta · · Score: 1

      Dear god:

      The proper choice of a data structure would have made the whole thing moot.
      Use a hash table. Statistics? Just read all the nodes sequentially. A program in interperted basic could easily outrun your handcoded assembly language.

      To the guy who wrote the Basic Interperter in Pearl. Oh my god. Using an intreprited language to interpretet a language. Bet you won the 'it will be done by, monday, next year prize' but given the speed of current processors. BUT, recognising that you can also write a compiler using an intrepretive language, and then compile the compiler using itself...and then just gone had had it all done in silicon...

      Speaking of which, 3D Rendering. There are parts that pearl would absolutly excel at, and having worked with POV-Ray for the better part of 8 years, I am sure I could have used it, for a lot of simple housekeeping chores, but the final rendering pass? Pearl? Umm. POV-RAY is a unique beast. The Mac Port and Windows port are *both* very fast. Time vs money, you need the fastest renderer you can find. I have also used Infini-D. Exceptional. But again, reordering NULRBS would be so much more efficent in Pearl. Best tool I have seen for that is Lightwave.

      Pearl: Use the right tool, for the right job, and Pearl has a lot of them.

  14. Re:is your company weak? by Sobrique · · Score: 3, Insightful
    Why? Software maintainability is a virtue too, and probably more important than a programmer using exactly the right shiny new language that's _exactly right_ for solving the problem.

    OK, so not all languages are well matched to solving all problems, but keeping it down to a managable number also serves to avoid some major grief in future.

  15. Re:is your company weak? by MBGMorden · · Score: 5, Insightful

    I kinda gotta agree with the parent here. Programming is a mindset. As one of my professors once told us: "50% of what you learned here will likely be outdated within 2 years of graduation. The other 50% will last you the rest of your lives." If you want to be a valuable, well rounded programmer, you need to keep up with the trends and learn a few things here and there. If you know HOW to program at a conceptual level, picking up the syntax of a new language shouldn't be all that hard. And that's why concepts and structures are stressed so heavily in Computer Science. The lessons you learn there should be language independent.

    --
    "People who think they know everything are very annoying to those of us who do."-Mark Twain
  16. Re:is your company weak? by TheNinjaroach · · Score: 1

    [quote]Because I consider it pretty weak for a programmer to be restricted to the languages he already knows.[/quote] Nice shot at my skills, but you missed the point. I have too much work to learn anything new while I'm here, and too many interesting things to do at home that aren't related to work.

    --
    I went to eat some animal crackers and the box said, "Do not eat if seal is broken." I opened the box and sure enough..
  17. Quick repair tool by oliderid · · Score: 2, Interesting

    The last time I have used Perl:
    I'm currently writing a server based application written in c# (mono). The email class of c# was good...but enough flexible for the multipart graphically enriched email I had to send (a report not a spam...Mind you). I couldn't properly configured the MIME Parts (especially "inline"). If I had just c# the only available would have been a commercial library.

    So I end up with Perl. perl -MCPAN -e shell . install MIME::Light (if I remind well)
    a couple lines after I had a tool ready to send emails (based html pages written by my c# application). The script is fired up by my c# application with several parameters. It works.

  18. Re:is your company weak? by TheNinjaroach · · Score: 3, Funny

    Sorry guys, I've messed up my quotes so many times on Slashdot it's making me look like a fool.

    Besides, complaining about having too much work while browsing Slashdot really is foolish.

    --
    I went to eat some animal crackers and the box said, "Do not eat if seal is broken." I opened the box and sure enough..
  19. Re:is your company weak? by sacherjj · · Score: 1

    It isn't that hard to pickup a new language, unless the reason you have to pick it up is to maintain an app written by someone long gone, on top of your already full schedule. Then researching some weird syntactical thing takes 15-30 minutes you don't really have.

  20. There should be a pool of accepted tools by MikeRT · · Score: 1

    Any organization should decide in advance what tools are appropriate for the majority of the jobs it does. That's just common sense. Where I've worked, my clients expect all deliverables to be released using a combination of Java, Perl and/or korn shell. They later added Jython when they upgraded Weblogic to version 10 and got the WLST feature. It was one of the only things that actually made sense about the way they did things. That way, you had freedom, but you had to do it within a process that allowed you to be replaced.

    Otherwise we would end up with application servers written in C and ASM, with server-side applications in a combination of Groovy and Ruby, rendered in programs that are written in Perl/Gtk by a disgruntled Perl monk who is afraid for his job.

  21. Write once, run everywhere? Not always :( by Anonymous Coward · · Score: 0

    When it comes to maintaining Perl there is another problem surfacing; because Perl is a modular language its not uncommon that people have added certain libraries/modules in order to use the functionality it has to offer (think cpan). While thats all nice and well it can also quickly result in chaos. $user runs cpan to install modules, stuff gets into ~user/.cpan directory, script is put in /usr/local/bin and simply wait for disaster to strike when the script is eventually copied.

    Naturally you can't blame this entirely on the language, the users or admins have a big influence on this as well. However, its my experience that many people use this approach and I consider it also to be one of the weaker aspects of Perl when it comes to maintaining it.

    In those cases I prefer the use of shell scripts since these are easily transportable. For everything more specific I'm a fan of using Java. It offers a lot of features which might make your life easier, when it comes to extensions you either mention them on the command line (in the classpath) or you put these system-wide into the $JRE_ROOT/lib/ext directory. I consider this to be a lot easier to maintain then having to cope with several separate .cpan directories which can contain several separate modules. Perl tends to be more flexible and more open, which can be a very good thing (don't get me wrong). But when it comes to system maintenance and such I prefer the stubbornness of Java since it (to a certain degree) forces people to cope with it in a certain way. Which is what makes administration a lot easier sometimes.

  22. Re:is your company weak? by Aladrin · · Score: 3, Insightful

    I agree, and I do pick up languages like nothing.

    But the problem isn't 'picking up a language', it's picking up 3. If we hire a new recruit, to expect him to learn 3 new languages immediately is ridiculous. So we don't -have- a ton of different languages in use, we have a choice few that cover everything reasonably well. In fact, since I started, we have dropped 1 and almost dropped another. (They're waiting on me to have time to rewrite that last program in another language.)

    In addition to not having to have new recruits learn those 2 languages, we also don't have to maintain the software needed for those 2 languages. That saves employee time and computing power both.

    And in truth, I tried to suggest adding a new language a few months ago... And after discussion, we decided the benefits didn't outweigh the costs. I was the only one who already knew the language at all, and it wasn't -that- much better than what we had.

    If we were a huge company with thousands of employees, it might make sense to have specialists in each of the languages and also use 'the right tool for the job' ... But I somehow doubt it. I suspect it would still end up being better to use 'the right tool for the majority of the jobs'.

    --
    "If you make people think they're thinking, they'll love you; But if you really make them think, they'll hate you." - DM
  23. Re:This is not a news story by baldass_newbie · · Score: 1, Interesting

    I don't know what's more disappointing, the fact that this story actually got posted or that the parent was modded down for pointing out the same.
    I actually read the f**king article and came away feeling dumber for actually having done so. Funny enough, I did not see one point that you could not use Ruby or Python to make the EXACT SAME CASE.
    Data manipulation in place? Cripes, if I'm in an Excel file perhaps I could write VBA to do the same thing and a lot easier at that.
    This kind of thing is just inane. Perhaps it will get the occasional CIO who reads this rag to name drop a language they neither use nor understand, but it does little in terms of providing anything useful for the actual codewriters - you know the folks who used to frequent this site.
    Bah. Jet lag and cold coffee make me bitter.

    --
    The opposite of progress is congress
  24. Re:is your company weak? by smittyoneeach · · Score: 1

    I've seen some programmers who were simply cut-n-paste hacks that couldn't grasp the information flow separate from a particular tool and basic print statement debugging.
    The real issue isn't first personnel, but time.
    The need to get stuff done NOW, NOW, NOW doesn't afford the FNG any time to sink into the language and its paradigms.
    Lack of time leads to heat and pressure, which produces nasty coal fires more often than diamonds.

    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
  25. Re:is your company weak? by Hognoxious · · Score: 4, Insightful

    It isn't that hard to pickup a new language, unless the reason you have to pick it up is to maintain an app written by someone long gone...
    ... who didn't know how to use it properly either.
    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  26. Re:is your company weak? by hjf · · Score: 2, Insightful

    I beg to differ. It isn't about the language (they're mostly do, while, for, print, echo... no Brainfuck jokes please ;), it's about the environment. A Java programmer can certainly master C# in minutes, but he problem is the framework, from small potato-vs-potatoe, such as Java's StringBuffer and .NET's StringBuilder, to architectural differences, like ASP.NET and JSF/JSP...

  27. Bollocks by bytesex · · Score: 4, Interesting

    Skipped right down to the stuff that perl isn't supposed to do: not supposed to be used in high performance/real time stuff - check, as a replacement for shell scripts where shell scripts are shorter - check (obvious-meter off the scale though), it isn't supposed to be used in CGI. Eh. Right. Because, according to the author, we should be using ruby on rails for that. Eh. Right. Again. Why didn't he just outright say that we should be using j2ee with struts and beans and xml based style sheets ! Oh that was 2007 ! My bad.

    Perl was, and is (IMHO) the first and foremost thing you grab when you write web-stuff. CPAN is nothing if not infinite, the web is a text-based thing the perl was designed for, and its speed makes ruby blush. So why ?

    Why try to write off perl all the time. Is it because they can't seem to /win/ ?!

    --
    Religion is what happens when nature strikes and groupthink goes wrong.
    1. Re:Bollocks by Anonymous Coward · · Score: 0

      Why didn't he just outright say that we should be using j2ee with struts and beans and xml based style sheets ! Oh that was 2007 ! My bad.

      Uh, no. . . that was 2003.

    2. Re:Bollocks by Anonymous Coward · · Score: 0

      as a replacement for shell scripts where shell scripts are shorter - check (obvious-meter off the scale though) Actually, that's not what he says at all. He's comparing perl to perl there, using 2 methods. The first (and he argues the incorrect) one is to use perl to send commands out to the shell, but the method used spawns more subshells (using more memory, etc than necessary). The second one uses perl's internal filesystem manipulation code so that essentially perl becomes the shell (leading to better performance by not spawning subshells, and making it more portable). So he's essentially saying: use perl for shell scripts, but do it correctly.

      Disclaimer: I don't know perl, so I don't know what the actual performance hit is in the first example vs the second.
    3. Re:Bollocks by Anonymous Coward · · Score: 0

      Pretty much, it's not hard to setup a suitable web environment in perl that works like most MVCs .. It is easy to have the code seperation that the article mentions, dispatch tables .. html templates, form validation. There are tons of modules to do it. I guess the issue is perl doesn't force best practices so it helps coming from a language that does, just emulate it for rapid development..

    4. Re:Bollocks by tknd · · Score: 2, Insightful

      Probably because the CIO author is highly ignorant of the existence of CPAN and some of the high quality modules it archives and distributes. One particularly high quality module is Template Toolkit. It is an incredibly powerful templating system. Some would even say it is too powerful (you could write enter programs in the template language). But what I have found is that power was purposely put there because there are instances where you need to do something fancy in the template or view rather than the controller code. And I have found it actually turns out cleaner than the equivalent in something built on J2EE.

      CPAN is also a whole lot more active than other library inventories. While some authors do tend to give up on maintaining their modules, there are lots of reports and patches submitted along-side the modules as well as test reports on systems where successfully/unsuccessfully installed. There are often multiple submissions of the same concept of a module but with varying implementations. This gives you many choices and lets you explore various implementations until you find one that suits your needs.

      Here's a list of other awesome modules that extend perl or implement various concepts:

      • RPC::XML - Implement XML Remote Procedure Calls without writing a single line of HTTP, XML, or Socket code!
      • Inline - Embed other languages like C directly into Perl code (yes the C code gets compiled!).
      • Moose - Extension of objects in Perl, allows more control and adds new syntax sugar to make writing OO programs cleaner/stricter.
      • libwww - World Wide Web library for Perl, easily create something like a robot without too much low level detail with HTTP and Sockets.

      In other languages or platforms there's also been issues with third-party libraries. For example in Java you could spend days trying to get a library or tool to work in your IDE. With perl and unix that's not the case. You simply go onto CPAN, see if someone's done it. If someone has, you'll be up and running in under a minute.

    5. Re:Bollocks by VGPowerlord · · Score: 3, Informative

      it isn't supposed to be used in CGI. Eh. Right.

      I can think of a combination of three factors to support this assertion:
      1. CGI.pm is a memory hog, so you really need some sort of acceleration.
      2. mod_perl breaks if you look at it funny.
      3. Any other way of speeding it up locks you into using that particular method, as you end up rewriting your scripts to use it. See: FastCGI or SpeedyCGI.

      For all the things PHP does wrong, these are things that it has done right.
      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    6. Re:Bollocks by stu42j · · Score: 1

      1. CGI.pm is a memory hog, so you really need some sort of acceleration.
      There are other, faster modules available for parsing CGI parameters. CGI::Minimal, for example.

    7. Re:Bollocks by Blakey+Rat · · Score: 1

      CPAN is nothing if not infinite

      What does that mean? CPAN is infinite? Or not infinite?

    8. Re:Bollocks by VGPowerlord · · Score: 1

      That's true. I just brought up CGI.pm because it's the one that ships with Perl, and thus the one people are most likely to use. In fact, CGI.pm's old cgi_docs document (deprecated after CGI.pm 3.06) even mentions CGI::Base, CGI::Form, CGI::MiniSrv, CGI::Request and CGI::URI::URL by name.

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    9. Re:Bollocks by rhizome · · Score: 1

      What does that mean? CPAN is infinite? Or not infinite?

      It means it's an exaggeration for effect, that if it isn't infinite it may as well not exist.

      In other news, chickens rarely cross the road with a knowable intent.

      --
      When I was a kid, we only had one Darth.
    10. Re:Bollocks by mvdwege · · Score: 1

      Nah. Just use an MVC framework, like Catalyst. Switching from the built-in testserver to CGI, or FastCGI or mod_perl is handled by the framework itself.

      And the existence of Catalyst really makes that article's "Don't use Perl for Webapps" a sign that the author probably hasn't touched Perl since the 5.005 days.

      Mart
      --
      "I know I will be modded down for this": where's the option '-1, Asking for it'?
    11. Re:Bollocks by Chundra · · Score: 1

      Apache::Registry

    12. Re:Bollocks by VGPowerlord · · Score: 1

      Apache::Registry is part of mod_perl. mod_perl breaks if you look at it funny.

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    13. Re:Bollocks by VGPowerlord · · Score: 1

      I don't know about the author, but I tried Catalyst a few years ago... and I seem to recall that you had to use different file extensions if you wanted to use Catalyst with FastCGI.

      Maybe it's changed since then, though.

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    14. Re:Bollocks by mvdwege · · Score: 1

      I've been doing some work with a recent release (just a little hobby project), and as far as I understand, dispatching is not based on file extensions, so from the point of view of a developer, the underlying mechanism is hidden from view, including FastCGI. I must admit that I don't use FastCGI though.

      And of course, since Catalyst handles the nitty gritty of mod_perl, why not use mod_perl?

      Mart
      --
      "I know I will be modded down for this": where's the option '-1, Asking for it'?
    15. Re:Bollocks by madprof · · Score: 1

      mod_perl is just fine - not sure what you're doing to make it so flaky.

      For what it is worth I've been coding with CGI::Application and Template Toolkit for the last 2 years and I'm loving it - it's really really easy to write reasonable MVC applications especially when you use DBIx::Class and the like.

    16. Re:Bollocks by Anonymous Coward · · Score: 0

      mod_perl is not that hard to use.

      The only real issue is that you have to realize that the variables' lifetimes are longer than your script. So unlike the rest of perl, you have to worry about initializing some stuff and clearing other things.

      This is also a huge advantage. If you can recognize when you can safely cache data, you can save a lot of cycles and trips to disk and the db.

  28. Re:is your company weak? by LWATCDR · · Score: 2, Insightful

    That is dumb.
    If it is a one time throw away script to fix a one time problem then yes the programmer can use what ever he wants.
    But if it is a tool then you may need to have other people maintain and work on it.
    You can write any program in any language. Yes some are better than others but how well you know the language is also important. Also having multiple vendors for a language is also really useful. If only one vendor supports the language then they have a lot of control over your company. Take Foxpro and Visual Basic as examples.

    --
    See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
  29. Re:Write once, run everywhere? Not always :( by Hatta · · Score: 1

    In those cases I prefer the use of shell scripts since these are easily transportable.

    Perl scripts may not be portable because they use modules that are not installed everywhere. Shell scripts may not be portable because they use executables that are not installed everywhere. I don't see how one improves upon the other, and it's really pretty easy to install things from CPAN.

    --
    Give me Classic Slashdot or give me death!
  30. Whoosh! by Anonymous Coward · · Score: 2, Insightful

    That's the sound of GP's joke going over your head.

    1. Re:Whoosh! by Anonymous Coward · · Score: 0

      The "joke" was based on confusion or ignorance I guess. Yes we got it. ha ha, perl...

      Here are the answers to some "jokes".

      Wait...there are ways to use C++ in a non-obfuscated fashion!?
        Yes, don't use templates. don't use operator overloading. don't use multiple inheritance.

      Wait...there are ways to use Java in a non-obfuscated fashion!?
        Yes, keep the layers of abstraction to less than 10.

      Wait...there are ways to use C in a non-obfuscated fashion!?
        Yes, keep function lengths under one page.

      Wait...there are ways to use perl in a non-obfuscated fashion!?
        Yes, Stay away from fancy tricks. Don't use perl objects. Don't write million line programs in perl.

      Wait...there are ways to write software in a non-obfuscated fashion!?
        Yes. Write small reusable components with with well defined interfaces.
        Write open source code to allow real peer review.

  31. When to use Perl? by mlk · · Score: 5, Funny

    When someone has deleted AWK, and not before.

    --
    Wow, I should not post when knackered.
    1. Re:When to use Perl? by jandrese · · Score: 4, Interesting

      Ironically, Larry Wall once said that part of the reason he wrote Perl is because he was scared of Awk's parser.

      --

      I read the internet for the articles.
    2. Re:When to use Perl? by jsiren · · Score: 2, Funny

      When your self-rewriting find-xargs-sed-awk commandline exceeds the shell's built-in length limit and you don't have time to recompile.

      --
      Usage: km/h for speed (kilometers per hour); kph for very slow impulses (kilopond hours).
    3. Re:When to use Perl? by Anonymous Coward · · Score: 0

      And he's right... if he said so... I'm so much scared of awk that I rely heavily on Perl to even do stuff you could do with grep awk and sed. I even bought a book "Minimal Perl" which makes you forget there's anything else installed on your system.

    4. Re:When to use Perl? by raddan · · Score: 0, Troll

      Jesus. Talk about "line noise". AWK is pure SETI@home fodder. I'll stick with Perl's line noise any day.

    5. Re:When to use Perl? by jschrod · · Score: 1

      Which AWK? The original, POSIX, nawk, or GNU awk?

      --

      Joachim

      People don't write Manifestos any more -- what's going on in this world? [Frank Zappa]

    6. Re:When to use Perl? by eap · · Score: 1

      Ironically, Larry Wall once said that part of the reason he wrote Perl is because he was scared of Awk's parser.

      Ironically, this would only be ironic if Larry Wall now advocated the use of Awk instead of Perl.

  32. Not quite Perl... by corychristison · · Score: 1

    But I've written a Media Center for use on my TV with PHP/PHP-GTK.

    Originally it was just a small project to get through a week of stagnated work. It's actually pretty hacked together but is separated into a client/server setup for use of a single backend and multiple frontends.

    Eventually I plan to port it to C/C++... but for now it seems to be working fine.

  33. It's "Hard" to learn a few languages? by StCredZero · · Score: 2, Insightful

    If your shop thinks it's "Hard" to learn a few programming languages, then I would worry about hiring you.

    There is a difference between keeping a well stocked and maintained tool-box that covers the basics and being a compulsive tool collector. There's also a difference between keeping a well stocked and maintained tool-box that covers the basics and using a screwdriver for everything. That's the same mentality that tries to use the tip of a hunting knife to turn a precision screw.

  34. Spam filter, clustering system.... by otis+wildflower · · Score: 1

    ... but my favorite is still doing Sun UFS quotas in LDAP with perl, and having to deal with that bass-ackwards quota structure (seek iforgethowmanybytes x uid) from teh 1980s.

    All of it ghetto, but all of it mostly harmless.

    Though the Ghetto Cluster (gclusd) failed hard a few months after I quit that job, it was entirely documented as a fail case, and had I not been forced to quit I may have even fixed that bug at some point! (STOMITH in user space without shared media can be tricky)

  35. Another useless article by outZider · · Score: 2, Insightful

    Articles like this really annoy me. There are indeed tools best suited for each job. Most people are not going to write an end user application with a GUI in Perl, because it's just not normally suited for it. Needless to say, with wxPerl, I've done it. Fancy that, it's readable, too. But, I'm aware it's not good for that.

    What people tend to forget is how extensible a language can be, especially Perl. Blanket statements like "Perl should not be used for the web" is misinformed at best. No one wrote web scripts in Ruby before Rails -- it's all about the framework. Go give the Catalyst framework a try, and tell me again not to use Perl for the web.

    As for high performance computing, remember that the perl interpreter does a few things very well, very fast. We ended up rewriting our web crawling infrastructure at $WORK from Nutch and Lucene in Java to a custom distributed Perl architecture against Xapian. Not only is it much more 'pluggable' than the original solution, we ended up getting a huge increase in speed out of the deal, even putting it up against 64-bit Java. It's anecdotal, and mileage will vary, but there are times that Perl is just better at crunching text than anything else.

    Too many people write off Perl as a relic of the past. What people fail to see is the new Perl renaissance that is quickly approaching. It's a good time to be a Perl developer, judging by the job market. :)

    --
    - oZ
    // i am here.
  36. I call bullshit by Foofoobar · · Score: 0, Flamebait

    I can get the PHPULSE framework in PHP to scale on a 2 GHZ machine with 1GB of RAM up to approx 80 requests per second. I can get JAVA to do better. RUBY I can't get to do NYWHERE NEAR that!!! It does great in the short run then CAPS OFF!! Ruby has a very limited capability for what it can do and Rails even more limited (so say the developers too). To say that Ruby is more versatile than JAVA is a crock of shit that you are never going to be able to back up until Ruby grows up. And by then JAVA will have done alot of growing up as well.

    --
    This is my sig. There are many like it but this one is mine.
    1. Re:I call bullshit by AKAImBatman · · Score: 2, Interesting

      I call overreaction!

      Seriously, you're picking at an example where I say that some small company somewhere might benefit from the faster development time of Ruby over the advantages of Java? Especially when said company probably doesn't need the same level of scalability you're worried about?

      Geez. Simmer down, will ya? :-/

    2. Re:I call bullshit by Foofoobar · · Score: 1

      Thats a small example and only with web dev and only with small shops. But for that matter, what kind of development shop doesn't worry about their applications scaling? what kind of DEVELOPER doesn't worry about their app scaling? That isn't a developer, thats a hobbyist. A developer always worries about the scalability of their app. Scalability, reliability and performance. Anything else is just a hobbyist.

      --
      This is my sig. There are many like it but this one is mine.
    3. Re:I call bullshit by AKAImBatman · · Score: 2, Insightful

      what kind of development shop doesn't worry about their applications scaling?

      Oh, perhaps the kind that provide exclusive or small-reach services? e.g. If I ran a local salon, how many people would reasonably be hitting my site simultaneously? I might not be able to afford to have someone build me a scalable J2EE online-appointment system, but I could probably afford a small Ruby on Rails site. Scalability for my site would be handled by throwing hardware at the problem, as it's a LOT cheaper in this case than trying to pay for a massive development effort.

      And if my site is well and truly straining under the load applies to it (for a single-shop salon!) then I've got a lot bigger problem with over-booked schedule than with my technology.

      To carry that example one step further, I would probably look at opening new locations to solve my overbooking problem. Each location could get its own scheduling system on a different subdomain, thereby solving my issues for the near future. If I manage to get so popular as to need a unified solution, then it's probably time to rearchitect the technology AND the business to meet the demand. (As good as we programmers like to think of ourselves, we can't possibly predict the issues that will be involved in such a changeover to the extent to where we can deliver the original solution with that sort of adaptability in mind while still doing it inexpensively.)
  37. 4 Signs You're An IT Tool by keytoe · · Score: 2, Insightful

    I was expecting the standard litany of anti-perl 'wrong tool for the job' comments in this article, but the 'four things' you're not supposed to do made me laugh:

    1) Real-time or high-performance applications.

    Check. No discussion necessary, but did it even need to be pointed out? Really, if you're even thinking about doing real-time apps in any interpreted language, you need to have your head examined.

    2) As a replacement for shell scripts.

    The example provided points out that using a simplistic perl script that calls 'system' to move files around generates a lot of needless sub shells and processes. OK - good point. However, in the example he provides, he replaces the inefficient perl script with an efficient perl script. How does that help make your point? Unless the point is 'try to write good code' - which isn't language specific.

    3) As a web scripting language

    This is just short-sighted and stupid, and the author suggests we use PHP or Ruby on Rails. OK - there are a lot of choices here, and all of them have advantages and disadvantages. But after reading that I should be using PHP, this quote made me spit coffe on my keyboard: "You should especially avoid using perl for traditional CGI-style form processing; this code tends to be hard to read and maintain because the HTML ends up inlined inside the perl code." Clean, elegant and properly designed code can be written in any language. Some languages encourage this, some make it difficult. Ruby encourages, but I'd stake my reputation on the claim that PHP makes it very hard. Perl is neutral on that spectrum.

    4) In an obfuscated fashion

    Check. No discussion necessary, but did it even need to be pointed out? Oh, I used that one already.

    1. Re:4 Signs You're An IT Tool by julesh · · Score: 2, Insightful

      1) Real-time or high-performance applications.

              Check. No discussion necessary, but did it even need to be pointed out? Really, if you're even thinking about doing real-time apps in any interpreted language, you need to have your head examined.


      Yes. It needed to be pointed out. Look at where the article is published: a magazine targeted at _IT managers_. Many of these people don't really understand the basics of what the languages the programmers they employ are. Articles like this that introduce the strengths and weaknesses of a language might help prevent them from making braindead decisions on the basis of recommendations from fanboy programmers.

      But after reading that I should be using PHP, this quote made me spit coffe on my keyboard: "You should especially avoid using perl for traditional CGI-style form processing; this code tends to be hard to read and maintain because the HTML ends up inlined inside the perl code." Clean, elegant and properly designed code can be written in any language. Some languages encourage this, some make it difficult. Ruby encourages, but I'd stake my reputation on the claim that PHP makes it very hard.

      Not really. I've written MVC applications using a homebrew template engine as the view component in PHP, and it wasn't hard. The only real issue with PHP is that it makes it too easy to program badly... programming well in it is no harder than other languages.

    2. Re:4 Signs You're An IT Tool by fireboy1919 · · Score: 1

      Perl is neutral on that spectrum.

      No it is not.

      Perl has far more tools to support making clean MVC web separation stuff than ruby. The issue is that what represents "good" or "clean" code is domain specific. All the things are showed you are things that are good for the specific problem of document templating for the web. I'd be willing to say that Perl's flexibility lets you code in pretty much any domain cleanly...if you set up your environment to facilitate that.

      --
      Mod me down and I will become more powerful than you can possibly imagine!
    3. Re:4 Signs You're An IT Tool by keytoe · · Score: 1

      Not really. I've written MVC applications using a homebrew template engine as the view component in PHP, and it wasn't hard. The only real issue with PHP is that it makes it too easy to program badly... programming well in it is no harder than other languages.
      The lack of namespaces and the dizzying array of functions included in the core libraries makes it difficult to write clean code. I didn't say it couldn't be done. In fact, I started the comment by saying that you could write good code in any language, but some make it easy and some make it harder. It's great that you can write clean PHP with solid MVC patterns. I do it when I have to as well, but I feel like I'm fighting the language to do it.
    4. Re:4 Signs You're An IT Tool by keytoe · · Score: 1

      I've been writing clean MVC based Perl code for web applications for years - I know that it's well suited for the job and I'm not disputing that in the least. However, it is quite easy to write obfuscated garbage in Perl - just as easy as it is to write clean and elegant code. Thus, I declared it 'neutral' on that spectrum.

    5. Re:4 Signs You're An IT Tool by jimcooncat · · Score: 1

      "Yes. It needed to be pointed out. Look at where the article is published: a magazine targeted at _IT managers_. Many of these people don't really understand the basics of what the languages the programmers they employ are."

      I'm a bookkeeper, and even I didn't need it pointed out. But if my IT manager doesn't understand the basics, he'd be looking for a new job. I don't know where you work, but if that's the way things are run, you might want to check out the want ads yourself.

      (I mean no disrespect to you personally. But wow, no wonder the economy's in the dumpster.)

    6. Re:4 Signs You're An IT Tool by Dan667 · · Score: 1

      Ruby on Rails? Maybe if you are designing a lot of little cookie cutter mom and pop sites, but for big ones that need to process data that seems like a very bad choice. I can see some what of the PHP argument, but perl works fine for the web.

    7. Re:4 Signs You're An IT Tool by sco08y · · Score: 2, Insightful

      2) You also didn't mention that his inefficient perl script does the same thing bash would have to do: launch cp for each file copy. And it doesn't help the guy's case that he doesn't know any Perl. His efficient example is could be rewritten as use File::Copy; copy($_, "$_.bak") for glob "*.doc"'; Frankly, the fact that Unix shells require that I remember obscure syntax to do what DOS could do with ren *.foo *.bar makes me go to Perl for anything more than a trivial script.

    8. Re:4 Signs You're An IT Tool by Dr.+Zowie · · Score: 1

      1)Real-time or high-performance applications
      Check. No discussion necessary, ...


      Actually, this is pretty Wrong. "Real-time" just means "fast enough", and for many, many real-time tasks Perl is plenty fast enough. Precompiled Perl is pretty effing fast at midsized computing tasks. Precompiled Perl with inline C (check out the Inline module at CPAN) or even PDL (check out the PDL module at CPAN) r0xx0rs for many things. We're using Perl to run the flight software for a sounding rocket payload, for exactly that reason -- it runs very quickly and is much more readily developed and debugged than a low-level language such as C.

  38. The silliest statement ever by nsayer · · Score: 1
    From TFA:

    One of the worst things about shell scripting--whether in bash, sh or csh--is that the syntax of the scripts themselves is fairly hard to read. So he's saying PERL is easy to read? You're kidding me, right?

    1. Re:The silliest statement ever by joggle · · Score: 1
      You're kidding, right? Here's an excerpt from a bash script generated by the auto tools:

      # Parse our command line options once, thoroughly.
      Xsed="sed"' -e 1s/^X//'
      while test "$#" -gt 0
      do
        arg="$1"
        shift
       
        case $arg in
        -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
        *) optarg= ;;
        esac
      done
      Perl can be written in a way that's fairly C-style whereas that's not the case for bash. Bash is great for simple tasks but for more complicated ones it can be really difficult to grok (as can be made clear by reading just about any script generated by autoconf or libtool).
    2. Re:The silliest statement ever by chromatic · · Score: 1

      So he's saying PERL is easy to read?

      You're probably thinking of the web programming language PERL, which is basically a joke. This article is about Perl.

    3. Re:The silliest statement ever by VGPowerlord · · Score: 1

      Of course you won't see that if you're programming Perl. That kind of stuff would be in Getopt::Std or Getopt::Long where you wouldn't see it. ;)

      At least I hope you'd be using the Getopt modules in Perl rather than writing it yourself.

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    4. Re:The silliest statement ever by joggle · · Score: 1

      Usually my scripts are so simple I just shift the arguments in. For anything complicated I would definately use the Getopt module.

  39. Perl - Swiss Army Knife by bigtangringo · · Score: 1

    Perl is my Swiss Army Knife. Anything that I can reasonably fit in one to five files, I'll do in Perl. If I need a web app of less than 5 or 10 pages, I'll use PHP. Complex webapps, long running heavy daemons are Java.

    That's the 10,000' view, anyway.

    --
    Yes, I am a smart ass; it's better than the alternative.
    1. Re:Perl - Swiss Army Knife by StargateSteve · · Score: 2

      Swiss Army Knife? You must be using perl 4. It's known as the Swiss Army Chainsaw nowadays.

  40. PHP WTF?! by wilx · · Score: 1

    That guy has some valid points but I seriously fail to understand how can he recommend PHP over Perl for web development. PHP is unsuitable for everything including web development.

    1. Re:PHP WTF?! by joggle · · Score: 3, Interesting

      Why do you say that? I write Perl and PHP scripts all the time and don't see any advantage to using Perl for webforms over PHP, at least not the ones I write. It's trivially easy to access data from a database in either scripting language and you can perform Perl-style regular expressions in PHP. The nice thing about PHP is that it's specifically designed for web applications and has simpler syntax in some situations. The downside to PHP is learning all of these functions that don't have a consistent pattern to them but, once you know them, you can accomplish a lot of tasks efficiently.

    2. Re:PHP WTF?! by wilx · · Score: 1

      Because of all the flaws PHP has? It is possible to use PHP for single page but not for anything else. Using it for anything bigger is pure sadomasochism.

    3. Re:PHP WTF?! by QuasiEvil · · Score: 1

      I'm assuming you're just a troll, but well, you look hungry. Exactly what flaws would those be?

      For reference, I use PHP like a lot of people use Perl. I'm a hardcore assembly/C developer by day, but realistically, we all need to massage data and such, as well as provide web tools to perform certain tasks. I've written moderately-sized web apps in PHP (about 70 different dynamic pages, with the whole system getting about 100k page loads per business day), and find it quite nice as long as you force yourself to avoid sloppy programming. On the other hand, when I just need to slop some crap together to parse data once or twice, PHP is awesome. (Substitute Perl in there if you're a Perl kind of person - I'm not.)

    4. Re:PHP WTF?! by wilx · · Score: 1

      Total lack of name spaces, even after all those years it has been around, inconsistency and redundancy (See how many functions there are for simple string matching.), no real references, flaky implementation, etc.

  41. Why two different languages? by tepples · · Score: 1

    If you can isolate those tight loops, there's a good chance you can do just that part in C. Unless your interpreter can detect inner loops and compile them to native code for you. This is one advantage of using a language that targets the JVM or CLR: the widespread interpreters for these targets are designed to do just that. Why should inner loops and outer loops be written in different languages?

    And PHP has been notorious for SQL injections, if undeservedly. In my opinion, a language is "deservedly" notorious for security holes if many of the code examples in the language's official documentation are subject to these security holes. For example, if a language's best-known SQL database interface that uses concatenation of strings, the language deserves notoriety more than another language whose best-known SQL database interface uses parametrized queries.

    Unless you're participating in an Obfuscated Perl Contest, don't write ugly, unreadable code, in any language. You forgot IOCCC ;-)
    1. Re:Why two different languages? by xmedar · · Score: 1

      No need to target a VM, use PERL as the man says Using Inline in Perl

      --
      Any sufficiently advanced man is indistinguishable from God
    2. Re:Why two different languages? by tepples · · Score: 1

      No need to target a VM, use PERL as the man says Using Inline in Perl That was 404, but I found this page. Are there any editors with syntax highlighting modes that work with Inline?
    3. Re:Why two different languages? by xmedar · · Score: 1

      That page isnt 404, I just accessed it, must be your connection, you can get the same page on googles cache here SciTE should do the syntax highlighting for you, I don't know about other editors.

      --
      Any sufficiently advanced man is indistinguishable from God
    4. Re:Why two different languages? by SanityInAnarchy · · Score: 1

      Unless your interpreter can detect inner loops and compile them to native code for you.

      The point is that by the time you care this much about the performance, compiling to native code isn't going to do much. At this point, you're actually going to want to do without a lot of the features of the language, specifically because those features will cause performance issues. (Example: If I really, really need to squeeze more cache space out of something, I might want to use a char to store a value I know will be small. In pure Perl, you don't get that choice -- it's an integer-which-can-be-coerced-into-a-float-or-a-string-or-any-scalar-value.)

      Even C/C++ programmers will occasionally have to drop to assembly, for that reason. At least for now, programmers are still better at hand-optimizing than compilers are. They're just slower and more error-prone at the process.

      --
      Don't thank God, thank a doctor!
  42. Re:This is not a news story by Anonymous Coward · · Score: 0

    He may well be a racist fucking scum fucker who loves to put crap and rubbish on Slashdot. But I doubt that he submitted this article.

    Indeed, I would suggest that he is a fucking brainless git, and this sort of article requires more intelligence then what Ron Paul has...

  43. Re:is your company weak? by bestinshow · · Score: 1

    such as Java's StringBuffer and .NET's StringBuilder

    Bah, I'll use Java's StringBuilder then :p

    But you are entirely correct about the major differences being the APIs. Indeed because of the high quality libraries available from Apache and elsewhere it makes Java a great language to write servers in my opinion. Then again I've seen a lot of C# embedded into webpages without any attempt at MVC (and the Model being a HashMap, usually directly from the form field names, then pumped into some half-assed webservice with very little validation), and JSPs acting as a front-end for proper backends using Struts/Tiles and other Java frameworks with full data models, databases, modularisation, etc. JSPs can be abused to do the former, and C# can be used correctly, but it's in the mindset and experience of the programmer.

    I love Perl though, CPAN is so great. Need to get back into it, and try Catalyst or similar.

    Wouldn't use either to write a commercial consumer desktop application. This is certainly one of the bad uses that the article could have mentioned. Then again with the web growing in use as an application platform, does it really matter now?

  44. And that's why we wrote MXX in C++ / STL by Anonymous Coward · · Score: 0

    http://sola-x.com/sola_features.htm

    PERFORMANCE
    Processing 200,000 price updates/sec./CPU
    Handling 100,000 orders/sec./CPU
    Delivering an average response time less than 1 ms
    Scalable by CPU

    RELIABILITY
    High system availability not dependant on using specific technical infrastructure

    PORTABILITY
    Developed for portability in C++ ANSI
    Runs on multiple platforms: UNIX, LINUX, WINDOWS

    BTW, the Java / Oracle version was slower than
    the original 2,000 orders/sec mainframe version.

    Conclusion, use the proper tools for the right job.

    Of course, developping a bug free clustered C++ system like that
    using _ONLY_ senior C++ programmers with 15-20 years of experience
    is quite costly, but well worth it as the killing performance shows!

    That's the main problem with C++ systems, do _NOT_ let any junior touch it!
    It's just too error prone to let them play with it,
    it's like letting kids play with matches, it burns too you know!

    All C++ systems I have seen where juniors were involved were full of bugs
    and a total nightmare to maintain, that's why it's refreshing to see
    a senior-only environment.

    Anyway, just my 2 cents.

  45. Oh Snap! by Anonymous Coward · · Score: 0

    Oh no you didn't!

  46. Re:is your company weak? by fishbowl · · Score: 1

    >50% of what you learned here will likely be outdated within 2 years of graduation.

    That's very optimistic. More that this is obsolete in the time it takes to develop lesson plans, get textbooks approved, etc.

    --
    -fb Everything not expressly forbidden is now mandatory.
  47. Data visualization in Perl/Tk... by slk · · Score: 1

    As part of a senior project that was actually the visualization piece of somebody's thesis, I wrote a data visualization/analysis frontend (for software performance analysis data storied in a database) in perl. Full GUI, Perl/Tk, graphs/charts/etc. This was in the 1999-2000 timeframe.

    It ran quite well on the hardware of the day, and had the advantage of actually behaving on just about everything in a very mixed-platform campus (Linux, Windows, Solaris, AIX, etc).

    --
    ERROR: Null .sig, core dumped.
  48. language vs library by bzipitidoo · · Score: 4, Insightful

    I wonder if this whole discussion is off the mark. Languages are for the most part trivial. And universal. "It's the libraries, stupid" is sometimes how I feel. If it was easy to link in or call any library function from any language, then half of this discussion would immediately be seen to be irrelevant. So Perl is "the right tool for the job" because it has the ability to apply regular expressions to strings? But, you know, C can do that too thanks to this PCRE library. Hashes? C can do that too via another library. In case anyone has forgotten, Perl itself is written in C. I read that Perl 6 has vastly improved the interface to other languages, especially C libraries.

    These day, whenever I write a new program it often feels as if I'm creating yet another language. A simple, superficial, limited language, but nonetheless, a language. Program needs a configuration file? Whip up a suitable format (language) for that. Needs to save data? Barf out this big data structure into a YML file. Want some way to run the interface from a batch process, or otherwise automatically? Start turning the user interface into a language. Want to connect Perl 5 and C? Get acquainted with XS, a "language" the Perl folks felt it necessary to create for that purpose, because Perl 5 wasn't good enough alone. Want to compile a large project written in C? Get familiar with the language of Make, because while C certainly could do it, C isn't so good for that. Is ANT a "language" for building Java projects? Where's the line between language and library?

    I suppose where things lead to a new language is when someone wants to implement a new concept and the established ways aren't good enough. Or has a way to eliminate a bad programming practice, but some elements of an existing language must be dropped to do it. For instance, wouldn't be nice to have variable length parameter lists in C, as C's own printf function does? Too bad it's such a pain to do that in C. How about lazy evaluation and currying so we can have infinitely long parameter lists? Oops, guess the C call stack can do recursion, but isn't too well suited to expressing that sort of thing, time to make another language, Haskell. Do we want to pass along a pointer to a structure, or a copy of a structure? Java defaulted to pointers where C did not, but then said Java didn't use pointers. Nice not to have to type in ampersands and asterisks all the time, but still, I find the thinking misleading. Then there's garbage collection. The consensus is that garbage collection is overall a good thing, but that a good programmer can do better than the automatic garbage collector. And so on.

    --
    Intellectual Property is a monopolistic, selfish, and defective concept. It is "tyranny over the mind of man"
    1. Re:language vs library by myvirtualid · · Score: 3, Interesting

      Languages are for the most part trivial. And universal.

      How about lazy evaluation and currying... ...time to make another language, Haskell.... Do we want... a pointer?

      Please do forgive me (hee hee hee: Please ==> forgive $ me) if I haven't quite gotten your point, but I cannot square your first and last paragraphs, specifically the parts I've quoted.

      Perhaps if you'd written "Imperative languages are for the most part trivial and universal? Perhaps then could easily equate C and Fortran and Perl and sed, and leave Haskell and Lisp out of the mix. Or perhaps if you'd written "OO languages are for the most part trivial and universal? Perhaps then I could equate (more or less easily, don't think it's quite NP) Objective C and Java and C++. (But see below....)

      But the bold unqualified "they're all languages, get over it" sort of assertion doesn't parse.

      My intro was Fortran, then F77, then Pascal, then C (OMG! Pointers! The Bomb!), and it was evolution, a little more cool, a little more flexibility all along.

      Then I learned C++ at work by day and Java for fun at night, and my head hurt, 'cause I liked the imperative style and OO was weirdly different but everyone was swilling kool aid so I stuck it out...

      ...and every night I'd discover something in Java that was THE BOMB that would solve that day's problem and every next day I'd find that C++ didn't have that feature (does today, AFAIK, but STL was busted then, so everyone rolled their own)... ...but I moved out of real programming before I got my head around OO.

      And now I'm learning Haskell, just 'cause I've learned that making my head hurt from time to time is a great way of stretching myself, of getting better at everything....

      And I don't understand - at least, I haven't wrapped my head around Monads yet, though I get what they're for. And you know what? No pain.

      None. I can feel the approach of enlightenment. SYB and reflect, baby, introspection and lazy evaluation and side-effect free (or reliably and provably constrained side-effect management) via implicit state passing.

      Whoa.

      I feel like Neo after the roof but just before the hallway - I'm starting to believe.

      I've read the "SYB in C++" paper. I get what they're doing. But they admit the gap:

      SYB in Haskell depends on... features... not available in C++, most notably rank-2 types, higher-order functions, and polymorphic type extension....

      Scrap++ is a great exercise, but how do you get to SYB without those? You don't.

      There's a guy out there that /.ers love or hate, no middle ground, so I won't reference him directly, but he's right: Different programming models change how you think of problems, and the right model opens so many doors you didn't even know existed. Doors you couldn't even have described until you knew they were there, but you were unable to find the hallway until you squinted, looked sideways at the world, and watched it shift... ...and were freed from the imperative....

      "Hello World" is a cool teaching aid in Fortran and C and even perl (do it 15 different ways, without string literals or character types, preferably with a program one column wide :->)

      But Haskell? No. When you learn Haskell, think big. 'Cause its programming model is so way different you have no idea. I'm at the point I almost consider Monads harmful... ...but I'll get the other side of the koan soon.

      And when I have a simple repetitive task that I need to automate, I'll stick to bash, 'cause it's clean and readable, and sufficiently fast and sufficiently limited that I have to force myself to be literate, which makes it so much easier 6 months later when I need to tweak $ remember script.

      I won't use Haskell for that. No way. But that replacement for scrabble/scribble I've been thinking of? That tool for edit

      --
      I'm here EdgeKeep Inc.
    2. Re:language vs library by Anonymous Coward · · Score: 0

      If it was easy to link in or call any library function from any language, then half of this discussion would immediately be seen to be irrelevant. So Perl is "the right tool for the job" because it has the ability to apply regular expressions to strings? But, you know, C can do that too thanks to this PCRE library. Hashes? C can do that too via another library.
      But C can't get the same convenient syntax for either. Where in Perl you use a regex by, well, just using a regex, in C you have to worry about allocating memory for that regex, and encoding the expression in a string, and then deciding when to compile it, and then extracting each match group by hand, and so on. Ditto hashes; in Perl you just use the hash, while in C you have to micromanage a lot.

      There are very few languages that permit library functionality to be as convenient to use as first-class language features, and most of them (e.g. Lisp) can only do so by making first-class language features as inconvenient to use as library functionality.

      So "which language is right" is really a question of "which language provides the best tradeoff between convenient syntax and high performance". Parsing text? Nothing beats Perl (Ruby comes close, but is just too slow). Writing a website? PHP has really convenient syntax for embedding itself in HTML. Writing a database-driven web app? Well, lookee here, I do believe Ruby's metaprogramming capabilities have given us something called "Rails"! And I'm sure Python must be good at something too. Then if you need to run faster, you start moving down the scale towards inconvenient syntaxes, via Java to C.
    3. Re:language vs library by bzipitidoo · · Score: 2, Interesting
      Try this for squaring things. There are times when you really do need a new language to express and use concepts that are cumbersome to do in existing languages. LISP, Haskell, Prolog, and those are perhaps different enough to justify this status, and perhaps only Prolog is really different enough, being declarative while all the rest are imperative. Anyway, it's only cumbersome, not impossible. Most of the time, the "right tool for the job" is trivial hairsplitting among very similar languages, as if there was a big difference between Perl, Java, Python, C/C++, and shell scripts. When making a GUI it almost doesn't matter what features the language supports, it's GNOME, KDE, or the Windows API that you need to use to drive the thing and the most important aspect of the language is how easily it can be interfaced with the desired libraries, not whether it supports some aspect of OOP or functional programming or memory management. Same goes for web programming-- does the language interface well with Apache and Mozilla? In a sense, Java is just C++ with "web glue", handy means to embed programs in web pages, this object code halfway point for platform independence (perhaps that's the biggest difference), and calls on some GUI management classes and authentication. And they took the opportunity to throw in automatic garbage collection and clean up a few of the awkward corners of C++. But Java wasn't anything revolutionary in language concepts, it was just a better C++. There is the cookie cutter Visual Basic approach, which I liken to whipping up a shell script that calls on heavy tools to do a few simple little jobs. You can have the best language in the world, but it's no good if it can't interface. Imagine C without stdio, or any other I/O. Cobol might be better than a lobotomized C that lacks those crucial libraries.

      I don't consider OOP all that revolutionary or different from structured programming. Both are imperative. You can do OOP in C, you don't need C++. You can even do OOP in C without too much trouble-- C has structures and function pointers, and that's really all a class needs. With function pointers, polymorphism is no big deal to implement. I find that with OOP, the technique can get in the way. I have seen people sit there agonizing over what classes are needed and what and where methods and data should exist, and how the inheritance hierarchy should be arranged. They finally make a decision they aren't totally happy about and can't quite put their finger on why, but they need to get something done. Then halfway into writing a program, they think of a another way, and spend lots of time shuffling methods and data from the old class hierarchy to a new. It's the OOP version of renumbering a BASIC program by hand.

      Monads? They're just an abbreviation in syntax. Maybe I don't get it, but it seems to me that monads are functional programmers getting really bent out of shape over nothing. Just because the Haskell equivalent of getc can return different data, they freak out. When in fact, the I/O is just concealing one extra parameter implicitly. Add time (or, file position), and just like that, no more monads. Don't say "c = getc()", say "c = getc(t)" where t is a position in a stream or file. Then the function will always get the same return values for the same inputs. Omitting the t is merely a convenient shorthand they've turned into a big deal.

      It is good to experience different language paradigms. I found LISP somewhat painful when I first encountered it. Took a while to get used to doing tail end recursion instead of fruitlessly searching the language for a loop construct, and this "lambda function" stuff threw me for a while until I understood that it's just an anonymous function block. The biggest change was getting accustomed to passing functions around like any other parameter, and stuffing them into lists like any other data.

      --
      Intellectual Property is a monopolistic, selfish, and defective concept. It is "tyranny over the mind of man"
    4. Re:language vs library by Raenex · · Score: 1

      Lots of trailing off there...

      ...implies you can't complete a thought ...maybe half-baked?

    5. Re:language vs library by myvirtualid · · Score: 1

      The biggest [Haskell] change was getting accustomed to passing functions around like any other parameter, and stuffing them into lists like any other data.

      :->

      I smile because that was an "ah ha" C moment for me: When I discovered I could do exactly that, just treat functions like pointers and pass them around. That shortened a lot of code, and got me more OO-like (as implied by another reply) without having to leave C's comfy playground.

      Point-free is doing that for me in Haskell: Sure, I can pass around functions or parameters, but when writing the functions themselves, I don't need to! Cool!

      Thanks for the Monads analogy. I was getting there, the validation helps assure me I'm on the right track. (Found a great paper on Monads by googling "monads considered harmful"... ...funny that.)

      --
      I'm here EdgeKeep Inc.
    6. Re:language vs library by myvirtualid · · Score: 1

      Lots of trailing off there... ...implies you can't complete a thought ...maybe half-baked?

      LOL! Almost ROFL!

      Yes, much of my mind is half baked after weeks of thinking functional. Such a different way of viewing the world, it is. I find myself sorting all tasks into simple procedural (script), big procedural (C or perl), complex procedural (C), and really complex (Haskell). () :: my language choices, YMMV.

      --
      I'm here EdgeKeep Inc.
    7. Re:language vs library by Axello · · Score: 1

      Nice article. I think I make a signature out of one of your sentences:

      "Refactoring is the OOP version of renumbering a BASIC program by hand."

    8. Re:language vs library by Anonymous Coward · · Score: 0

      Don't say "c = getc()", say "c = getc(t)" where t is a position in a stream or file. Then the function will always get the same return values for the same inputs.


      What if you read with t == 10 once, then someone else modifies the stream at char position 10, and then you read it again? Assume that you want to read the modification. More subtly, what if you are reading a sequential char stream of unknown length? If you only ever read one char at a time, how does your extra variable help?

      There are easy and generally successful compile-time optimizations available when a function will always return the same result, or will always return the same result given the same arguments provided that the set of possible arguments is small, or the probability distribution of the arguments is known in advance to have strong modes. However, not all functions operate on invariants, and you want to avoid misoptimizing those functions, resulting in increases in space or time, or even producing outright buggy results. Monads are used to identify such functions to the compiler.

      A non-monadic (invariant) c = getc(t) would always return the same result, so we can either completely precalculate c at compile-time, or we can memoize the results of each getc(t) so that the next time it is called with the same value of t, we don't have to walk through all the conditional code and other operations in the getc function -- we just set c to the value calculated earlier.

      A monadic c = getc(t) will run through the whole of the getc function (and any monadic functions *it* calls) each time it is invoked at run-time.

      If we know the whole of stdin at compile-time, c = getc(t) is identical to stuffing stdin into an array at compile time and doing c = arr[t] at run time. We can make further optimizations for space (sparsing or compressing the array) and time (avoiding bounds-checking) if we know at compile time that some values of t will never be used. It's much more likely that stdin will vary arbitrarily from run to run of the program, and if so, you cannot abstract away that variation with another parameter to your function.

  49. Most unusual thing I've used Perl for by joggle · · Score: 1

    I wrote an enormous script that takes two XML files as input, one describing data structures I want to encode and another that describes the binary format I want to encode it as (such as a starting byte, the number of bits to store for the length of the message, the type of CRC/checksum to use, etc.). It then creates all of the necessary C code to encode and decode these records bitwise with options for using simple compression algorithms as well. It also has options for generating C++ code wrappers and another independent Java implementation.

    While it took a lot of code to accomplish this (even using the XML::Simple CPAN package) it now is a very handy tool for our purposes where we are encoding dozens of records over a very low bandwidth stream (satellite connection) and can change our record structure at will (with a great deal of flexibility) simply by editing a couple of simple XML files.

  50. Re:is your company weak? by centuren · · Score: 1

    I have to disagree with your former Professor's numbers. I remember using C, Java, Scheme, and some assembly as in-class languages, and I don't remember any of them. The basic Java syntax has stuck with me to some degree, so I'd say it's more 10% / 90% in terms of the tangible, moot part of a CS education and the less-tangible always-relevant portion.

    I've also recently had to train a new developer who looked good on paper, was good enough in the syntax area, and couldn't think like a programmer at all. He didn't last long, and I'll take someone with no formal CS training yet is able to think abstractly over employees like him anyday.

  51. Perl6 will be written in Perl by RidiculousPie · · Score: 1

    At least one implementation of Perl6 is being written in Perl. Which should help with the situation you describe. Plus the perl6 grammar capabilities are pretty nifty looking.

    --
    ah, mod points ... now where is my crack?
    1. Re:Perl6 will be written in Perl by Anonymous Coward · · Score: 0

      That's a good start (there are similar things in Python and Ruby), but I don't think it counts until the language designers are using a self-hosting version as the reference implementation.

  52. Glue and objects by goombah99 · · Score: 4, Interesting

    The list missed the most important part of perl. A glue language. Python and a few other languages claim they can be glue languages but that's pretty much a joke to anyone who knows both fluently. Perl is the ultimate glue language for combining diverse output so different programs from different sources, written decades apart in different languages can all work like a well oiled machine.

    The other really odd experience for me was learing object oriented programming. I had been programming in objects since I was first introduced to them when the first NeXT computer came out. I used java. And C++ and such. I thought I understood objects.

    Then one day I learned to program object oriented in Perl. An I learned that while I was fluent in object oriented usage, I really had a pathetic understanding of how they worked and what was actually possible with objects.

    Perl objects are sort of like owning a copy of grey's anatomy or "the visible" man. You son't just see that arms connect to torso's from outside but you see all the sinews and bones and blood.

    It's actually amazing how so many things we think of as different concepts in object oriented programming and data bases are actually different reflections of the same trick. And that's the trick perl use to make objects.

    in perl, an object is any variable that has an attribute that can store a list of package names.

    Let's see what you can do with that.

    Hmmm.... well that list can be your inheritance heirarchy so each package is what you search for methods. But notice that since it's a mutable list a perl object can do something else that most object oriented languages cannot. A variable can change it's "inheritance" list after the fact. it can change it's own class.

    Okay Now this is just a single variable so where to we get attributes of the object? Well, if that variable is say a hash (dictionary) then we can just use the key's as the attribute names. so if were to write self.foo in C++, you would write self->{foo} in perl.

    More fun: let's say you call a method() or ask for an attribute on a variable that does not exist. Well, a perl object can just add more packages to it's inheritnace list. Or it cold write the method on the spot and add it too it's own inheritnace. "I'm my own grandpa". I've used this trick many times to create tables. I don't write any of the "get" or "set" methods. instead I just intercept the call to the method "setfoo()" which never existed cause I never wrote it, then I have perl create an attribute called foo: Self->{foo} = "something". then I have perl write a subroutine called "setfoo" and add that subroutine into a package namespace and put that in it's inhereticnace list.. ("like adding methods to a C++ package outside the declaration". (programming tip: obviously this is could lead to problems with typos, so I also provide the variabel with a list of all allowed attribute names--- but of course I can always add to that list later).

    Now something more exotic. The hottest thing in Data base programming is the realization that sometimes column centric data bases are better than traditional row-centric data bases structures. In perl an object can change which it is, transparently. For example, if I'm a traditional object with a row organization then all my attributes are stored as self->{foo1}, self->{foo2}, self->{foo3}. and so on, just as you might right self.foo3 in python. But I did not have to do it that way. What if instead of making the self variable a hash (dictionary) I had made the self-variable a simple scalar, say an integer. Well at fist this seems stupid, where did all the instance variables go? Well, I just store them in the class. I make the scalar self-variable's integer just an index. The class keeps the instance variables in arrays--that is column based storage--.. SO for example if self = 4, then the attibute foo for this instance now becomes self->class->foo[4].

    The beauty of this is that si

    --
    Some drink at the fountain of knowledge. Others just gargle.
    1. Re:Glue and objects by arivanov · · Score: 1

      It missed another one - commanding stupid devices designed for command line control. Routers, switches, automation, you name it. On average it takes 5-10 software engineers with the corresponding budget to maintain a full network inventory and activation system written in perl in house for a telco with a few million customers. Been there, done that.

      Compared to that it takes 100 times as much to do this using "carrier class" software written in C++ or Java. Similarly, upgrading, changing adapting this type of software in perl gives you a time to market of weeks (months at most). With C++ or Java you are looking at quarters or even years. Been there, done that as well.

      This is an application where perl rocks. It is generally frowned upon by management for no other reason, but because there is simply no slack to outsource and claim efficiencies. It just works.

      --
      Baker's Law: Misery no longer loves company. Nowadays it insists on it
      http://www.sigsegv.cx/
    2. Re:Glue and objects by intangible · · Score: 1

      You just demonstrated the best part of knowing and using perl... the "perlgasm" when everything just "clicks". :-D

    3. Re:Glue and objects by stonemetal · · Score: 1

      You need to get out more, all dynamic oo languages offer what you describe. The only languages that don't are statically typed languages. That is why they are called dynamic languages because you can fiddle with the types at runtime.

    4. Re:Glue and objects by goombah99 · · Score: 1

      I think you missed the point.

      first I'll note that since all languages are turing complete any language can do anything. Afterall per is wrttten in C, ergo C can do all that I described.

      The point I was making was this. What do the following have in common:

      Lisp --everything is a list
      Prolog --everything is a boolean
      Haskel --everything is a function
      Forth --everything goes on the stack
      APL --everything is a matrix

      What these have in common is two things
      1) they take one simple idea and see how far you can run with it. And the results are truly amazing actually.

      2) they are hard as hell to actually write general programs in.

      Real programming languages like python, java, C, C++, fotran 95, D, and so on, combine all those elements in to real languages. They are not trying for computer science purity.

      Perls a weird case. Regualr spagetti perl is dogerl of many things and highly useful. THe opposite of a pure language.

      But there's an exception to that. Perl Objects.

      Perl Objects -- and object is created when any primitive variable (e.g. an integer) has an associated list storage space.

      the Bless() command in perl just adds a list attribute to a primitive.

      And then look how far you can run with that. Wholly fuck! every single chapter in the python book or a java book talking about some language feature is just a cosnequence of "bless"

      classes --- the bless list
      inheritance --- the bless list
      Add-ins. --- addingin to the bless list
      type checking --- inpecting the blessed list
      column-centric Data bases --- bless ....

      I've stood up in from of rooms of many year python experts and drawn out how python's syntactic sugar is hiding Bless() and suddenly they have a real understanding of how python actually works, not just how to use it, but how to exploit it.

      --
      Some drink at the fountain of knowledge. Others just gargle.
    5. Re:Glue and objects by stonemetal · · Score: 1

      I didn't miss the point. I didn't mean in some abstract turing complete sort of way. In ruby there is methodmissning that can do your nice little x.foo = 4 dynamically add a property trick. The class of an object is an object that can be manipulated at runtime fairly easily. Python has something similar to methodmissing that I don't remember off the top of my head. Heck even objective C has an easy to use method missing facility. The point of a dynamically typed language is that the type system is easily mutable at runtime. You could have learned all that you learned from perl by learning python or ruby or objective C because they provide the same sort of facilities. Now if you wanted to do something like that in C++ or java you would more or less have to build a new type system on top of the language because they aren't dynamically typed.

    6. Re:Glue and objects by goombah99 · · Score: 1


      C and C++ can act dynamically typed too.
      proof: Perl is written in C. perl is dynamically typed. ergo, you can have dynamic typing in C. Albeit by implementing a perl interpreter.

      I was not raving about the fact that there's this groovy missingmethod command in perl that nothing else can do. I was raving about the fact that it's just a trivial artifcat of the bless() list. And that is exactly how ruby and python implement it too. it just is not transparent that it's just a trivial artifact of the same feature that gives every other object feature.

      it's not even restricted to dynamic typing.

      --
      Some drink at the fountain of knowledge. Others just gargle.
    7. Re:Glue and objects by Anonymous Coward · · Score: 0

      The point I was making was this. What do the following have in common:

      Lisp --everything is a list


      Except for vectors, numbers, strings, ports, and so forth, functions and most importantly symbols...

      It's a symbolic processing language. Where you think you see lots of lists, you are really seeing lots of symbolic expressions (sexprs).

      Prolog --everything is a boolean


      Except for atoms, functors, numbers, variables, strings and lists, among other data types ("terms"), and the fundamental constructs of declarations, relations and queries.

      Where you think you are seeing lots of booleans, what you are really looking at is declaration-query-relation arrangements.

      1) they take one simple idea and see how far you can run with it. And the results are truly amazing actually.


      In both cases the central ideas -- symbolic processing and logic programming -- are not what you listed.

      Moreover, the central ideas in most "AI" languages are not taken to extreme to the point of being domain-specific rather than general.

      I suggest that you look more deeply into all five of the languages in your list comprising these two. You are missing things that might interest you.
  53. Re:is your company weak? by MBGMorden · · Score: 4, Interesting

    That's pretty much my point. While I was at college, I worked with Java, C, C++, Fortran, VB, and SPARC Assembly. I have a vague working knowledge of VB and Java syntax. I still remember C and C++ pretty well as I use those still (and I use a lot of PHP as well, but that I picked up after I was out). If you asked me to write something in Fortran or SPARC Asm at this point in time the best I could do without a reference book next to me is a blank stare (The Fortran class I took wasn't even geared towards CS majors. It was just there for Liberal Arts people to get a required computer credit - I took it because for a 3rd year CS student it was like a free A+ to add to your GPA :)). I just haven't used it recently at all and the syntax is lost.

    HOWEVER, I do remember quite well what threads are, what a semaphore is, what a binary tree is, the difference between a bubble/quick/radix sort, the concept of object oriented design, etc. I wish I could say I remembered UML modeling but honestly, I hated that darned part of CS and never paid attention there anyways :P. But, regardless of the percentage, the point still stands: syntax is trivial. The important part is knowing how to think like a programmer. If you can do that the rest just falls into place.

    --
    "People who think they know everything are very annoying to those of us who do."-Mark Twain
  54. Sheesh... by idontgno · · Score: 2, Insightful

    First, and more than sufficiently, of all: who the $curse is going to be taking coding language advice from CIO Magazine? If it's a real practicing software developer, they need to turn in their geek card and coder license immediately. And if it's a CIO or other PHB-level entity, for the love of $DIETY, don't let him start dictating software tool choices on the basis of stuff like TFA!

    Second, the author of the article sounds like he has only ever dabbled with Perl, sysadmin-tool-like. He betrays a disturbing unawareness of the recent development in frameworks and methodologies in the Perl universe that track most of the major software development trends and tools available in other communities. His advice, positive and negative, seems stuck in basic out-of-the-box Perl 5.6 or something. Most of the time, that's plenty good enough for the ol' sysadmin "Swiss Army Scripting Language" approach, but certainly missed out on a lot of good work. (The reader comments after the article call him out on this pretty well, so I won't rehash.)

    Third, a lot of the advice is universal, not Perl-specific. I mean, stuff like "Don't use Perl in an obfuscated fashion" is like "Don't drive a 1973 Dodge Ram pickup truck while drunk." Very true, very sage advice, but the problem is not Perl (or the truck), it's the obfuscation (or the drunkenness). Code readability is a timeless, domainless, endless problem. The only reason Perl gets picked on for readability is basically bad PR.

    Frankly, a lot of TFA just sounds like an excuse to fill up a few column-inches the editor needed filled in.

    --
    Welcome to the Panopticon. Used to be a prison, now it's your home.
  55. They forgot #6 by blantonl · · Score: 2, Funny

    #6 - Slashdot

    --
    Lindsay Blanton
    RadioReference.com
  56. Graphical Applications by uid8472 · · Score: 1

    I wrote an X11 display manager (in the sense of xdm) with Perl/Tk. What do I win?

  57. Re:is your company weak? by jhol13 · · Score: 1

    Just like Bad English is the most widely spoken (but not understood) language, the most widely spread programming language is Bad Visual Basic (but not ... ugh).

    Bad Visual Basic (BVB) in C is horrible, trust me.

    I have only limited exposure to "C++BVB" and no experience in BVB in Perl, Java, Python, ... yet. Don't show me, please.

  58. one of my proudest moments... by UID30 · · Score: 2, Interesting

    was in using perl to perform an xsl transform converting xml directly into executable perl code. hooray for eval. surprisingly it was one of our most stable jobs and ran for years with no problems. i think this was mostly because everybody was afraid to touch it once it got going... is there anything perl can't do?

    --
    "Glory is fleeting, but obscurity is forever." - Napoleon Bonaparte
  59. Re:Write once, run everywhere? Not always :( by Jack9 · · Score: 1

    Perl scripts may not be portable because they use modules that are not installed everywhere. Shell scripts may not be portable because they use executables that are not installed everywhere.

    What kind of logic assumes that you can install Perl but are unable to execute a shell script? It's far more likely that you will have access to a shell and the basic commands in all cases. Making it a requirement to have root access (or permissions to install CPAN modules) to execute your script is dumb.
    --

    Often wrong but never in doubt.
    I am Jack9.
    Everyone knows me.
  60. Not following... by SatanicPuppy · · Score: 2, Informative

    So it's a virtue to be programming in a half a dozen different languages? Or to force an accomplished programmer to switch to a different language for no good reason? Sure, he should be able to pick it up, but there is a learning curve, and lingering inefficiency issues that will last for a while.

    I recently had a throwdown regarding this because one of my coworkers was working on a project, and I flat refused to help him in his chosen language. That language? VB6.

    Now I used to program in that...thing...and when .Net came out, I purged it from my memory banks. I am not going back, not for anything. Does that make me weak, to refuse to dive back into an obsolete language in order to generate a new application?

    It's one thing to be flexible and open to new ideas, and dedicated to improving your skillset, but it's entirely different to be running around programming in random different languages for no compelling reason. One of the negatives in TFA was that if you used perl to sub for a shell script, you'd take an efficiency hit...This after he said you should never use it at all where efficiency was an issue because it's interpreted! The reason to use perl instead of a shell script is because perl will work in any shell...If you need performance you shouldn't be using it anyway.

    In short, using a different tool for every job is only useful if it's not more efficient in the long run to do the job with the tool at hand. If I need to tighten a bolt, I could go to the hardware store and get a socket set that will fit that bolt, or I could use the crescent wrench that's sitting 5 feet away. The sockets would do the job a hell of a lot faster...But it would take longer to get them than it would to just use the wrench.

    --
    ad logicam Claiming a proposition is false because it was presented as the conclusion of a fallacious argument.
  61. Development Environments by ironicsky · · Score: 1

    It largely depends on your development environment. A previous employer I worked for refused to acknowledge any code not written in VB/.NET for apps/scripting. Even though these languages are occasionally useful, for my purposes(report generating/parsing) they rarely were.
    At my current employer I have free control to use whatever I see fit. My boss asked me to write something to parse and compare transaction logs. I told him I was installing perl, he said thats fine... So I scripted in perl , couple hundred lines of code now saves 10-15 minutes of manual comparison everyday.
    Where I would use a Visual language to program interfaces, I'd never use PERL even though it can with the help of outside .dll's or modules. On the otherside, I'd never consider using any language other then perl for parsing data.

  62. IMDB is done in perl by ClioCJS · · Score: 1

    and seems to work just fine.

    --
    -Clio
    Karma: Bad (mostly from not giving a fuck)
    Blog: http://clintjcl.wordpress.com
  63. Real World Counter Example by localman · · Score: 2, Informative

    Sure, Perl is pretty much on everyone's shit list these days. But as the Director of Development for Zappos.com from 2000 through 2006, I have to take exception with his claim that perl is unacceptable for high-performance applications. Of course it depends what type of high performance applications you're talking about, but for high performance web applications it's actually quite good.

    Specifically, the Zappos site, built with Perl, was rated the fastest retail website in the world for broadband customers for much of 2006. It beat out Amazon, Dell, Best Buy, etc, etc, you name it. It was also the most consistent speed and the fewest errors. Search Internet Retailer for the more numbers. It always places in the top 5.

    Also, the claim that one might mix HTML in scripts is a sign that this guy hasn't actually used Perl in the past decade. Everyone switched to powerful templating systems sometime in 98. There are several very nice web development frameworks for Perl these days. Just like almost any other language.

    The rest of his criticisms are more valid. I wouldn't try writing graphic intensive applications, or anything with heavy math processing in Perl. And the most common complaint, that it doesn't prevent you from writing messy code, is certainly true. Of course, just because your code looks neat doesn't mean it's good code either :)

    Cheers.

  64. Another advantge of Perl by Big+Nothing · · Score: 1

    One advantage of Perl not mentioned in the article is that it is probably the easiest programming language to master. The syntax is so simple anyone can program it. In fact, just the other day I left my 1-year old baby girl alone in the room for five minutes only to find on my return that she had written a fully functional email client in Perl.

    --
    SIG: TAKE OFF EVERY 'CAPTAIN'!!
  65. Perl is a powerful weapon by Z00L00K · · Score: 1
    But as it is a scripting language it isn't good at everything.

    And over the time new tools has emerged that makes the use of Perl more limited. One of the drawbacks is that it is possible to be very obscure when writing in Perl. But it may at the same time be very efficient.

    To Write web applications I have stuck on Java and build the web pages using ECS. Unfortunately the use of ECS really brings out the BAD section of Java's inability to do explicit object deletion. It may be that ECS also could have been written in a better way - so anyway maybe I'm just whining.

    The advantage is that I will get a really good HTML which will pass the W3C validator without too much fuzz. The disadvantage is that it's not that easy to introduce the ordinary HTML hacker into the world of ECS. (but why should the world be easy?)

    And ultimately - there is a difference between tools and tools. If you have a tool like Eclipse you may use it to edit more than just Java and somebody else may go in afterwards with Emacs, VI or (horrible thought) Visual Studio to continue the work since the code isn't really aware of which tool I use. On the other hand - a programming language is a tool too. If somebody comes in and say that I need DIBOL for a certain task even though everything else is written in COBOL, then you may want to think twice about the mind of that person...

    --
    If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
  66. Re:is your company weak? by hjf · · Score: 0

    In my opinion, Java is definitely THE language, well, at least for business applications. There are some nice things in .NET (such as the accessors, instead of the tedious instanceOfSomething.setXxx(Object yyy), just instanceOfSomething.xxx=yyy without resorting to a public property), but they're nothing really.

    What I didn't like about .NET is that it promises more that it can handle. Sure, you can throw an SqlDataSource and a GridView and get a quick-and-dirty Table view -- but I can do that easier with Oracle Application Express... I was more than disappointed when I was asked to make an ASP.NET page and found that it was harder to even throw my own PHP from scratch.

    For example, GridView is just that: a view, it doesn't have code to "add" new records, and it's so complicated to make it: you have to add a footer and use it as the empty row, but the footer doesn't appear if the dataset is empty...(AND WHO SAID THAT XML IS SUPPOSED TO BE HUMAN-READABLE?) that one is tempted to inline everything like it's 1997.

    And do I need to mention the fact that J2EE is so scalable and does most things for you that it leaves .NET completely out of the game?

    But in the Windows side of thing, .NET looks more interesting: you get the actual native look and all (except when Microsoft releases a new Office version with a new, nicer skin that you can't use for your own app). And free XNA development is a plus.

    About the web as an application platform... I'll let it cook for a few years... Yes, I'm too lazy and I grew to love "big" languages so much that I'm not really too tempted to hack javascript on the client side to make my app "AJAX-enabled" just to be more responsive... especially if I have to deal with MSIE on the client. Been there and I didn't like it... and the customers like that little blue "e" it's hard to convince them to click on the Firefox icon. (Yes: I'd rather roll a desktop app to tens or hundreds of desktops than spending weeks to find out why the hell XMLHttpRequest is not behaving).

  67. Don't really agree by Anonymous Coward · · Score: 0

    I can't agree with the author on what Perl isn't good for. Shell scripts, for instance, will fork commands anyway...so I'm not sure why perl is being called bad for doing the same thing and replacing a shell script. Maybe the author doesn't really understand what sh does when it sources a shell script.

    And perl is quite good at CGI despite claims otherwise. mod_perl and fastcgi make it an excellent solution for writing web cgi. One could debate modular vs object oriented languages or aspect oriented, but that's not the debate- its whether perl can do the task at hand in a fairly efficient as a CGI language. I mean...the url at the top says "comments.pl", not "comments.php".

  68. tools for the job by MrDiablerie · · Score: 1

    You also have to take into consideration what technology your job allows you to use. Sure, I'd love to spin out some RoR apps but when you work for a large corporation they aren't quick to adapt new technology. There are a lot of companies out there that still use Perl to handle backend processing for their websites because it's what's available to them and there are plenty of resources that can work on the codebase. There are faster, more efficient languages out there but sometimes they aren't an option.

  69. mods: parent is Insightful by Anonymous Coward · · Score: 0

    The visible Object.

  70. The JavaScript companion article is up too by Esther+Schindler · · Score: 1

    You used JavaScript to write WHAT?

    The key to understanding when (and when not) to deploy JavaScript has as much to do with the intent of the target application as it does JavaScript itself. Written by Michael Morrison, author of Head First JavaScript.

    http://www.cio.com/article/print/175950

  71. Crappy Java code is usually more readable.... by my_left_nut · · Score: 1

    ... than well-commented Perl.

    That has to say something.
    1. Java was strongly typed from the beginning. Perl added typing as an afterthought. Inheritance is implemented in a bizarre fashion by adding to an "@ISA" list and "blessing" things.
    With Java many of inheritance errors would be caught at compilation time. With perl, there's no compilation, so those kind of things fail at runtime.

    2. One has to put a $ or a % or an @ in front of a variable to make sure it's used properly. That (in my opinion) immediately obfuscates code and decreases maintainability.
    Java: int i = 0;
    Perl: $i=0;
    What would you rather look at?

    3. Every application I've seen that's been written in Perl looks like a hack. So, if what you need is a quick and dirty throwaway hack, then Perl or PHP may do. However, in many cases those quick and dirty hacks turn into little permanent monsters that someone needs to care and feed every so often.

    4. EPIC, the Eclipse IDE plugin for perl, can't find references to variables. Many times it can't find declarations. With Java there's never a problem. How one can do without this kind of functionality is beyond me. I guess you just grep the codebase looking for things that match.

    5. Perl trades second generation maintainability for first generation instant gratification.

    6. Perl's idomatic quirkiness encourages bad programming practices and butt-ugly code. For example, most Perl code that I've seen uses the "something if (condition)" idiom. If *after* the thing it's suppose to do? C'mon. Or, the "something || die ..." grotesqueness. Code written like that is just waiting for someone to come along later and hose it up.

    1. Re:Crappy Java code is usually more readable.... by chromatic · · Score: 1

      Java was strongly typed from the beginning.

      Unless you're talking about how hard you have to hit the keys, you're wrong. Even after generics, you're wrong.

    2. Re:Crappy Java code is usually more readable.... by my_left_nut · · Score: 1

      I'm not sure what you are getting at.

      Are you saying that Java *doesn't* have strong typing? Sure, I can declare something as an "Object" and bypass typing that way, but I still have to *declare* that reference as being a vanilla Object. In Java all atomic fields and local variables need to be declared as char, int, byte, float, long, etc. You can assign from one to another where it makes sense, and the compiler will catch where it doesn't and flag those things before you get a chance to run the program.

      If that's not a strongly typed language then I don't know what is.

    3. Re:Crappy Java code is usually more readable.... by chromatic · · Score: 1

      If that's not a strongly typed language then I don't know what is.

      That's manifest typing.

      My favorite definition of "strong typing" comes from Shriram Krishnamurthi's Programming Languages: Application and Interpretation (p. 205):

      So what is "strong typing"? As best as we can tell, this is a meaningless phrase, and people often use it in a nonsensical fashion.

      Benjamin Pierce (author of Types and Programming Languages) wrote something similar (see Mark Jason Dominus quoting Pierce on "____ typing"):

      ... the usage of these terms is so various as to render them almost useless.
  72. Re:Write once, run everywhere? Not always :( by oglueck · · Score: 1

    pretty easy to install things from CPAN

    Then you have never tried to install an Oracle DBD from CPAN. When I did that last time (3 years ago maybe) it took me two days of cursing.

  73. RoR is a framework. by Anonymous Coward · · Score: 0

    Why does everyone keep comparing PHP to Ruby on Rails? RoR is a framework. Of course a framework will encourage cleaner code...as do most of the better PHP frameworks, Python frameworks, etc.

    1. Re:RoR is a framework. by keytoe · · Score: 1

      Yeah - I actually had a bit about it being a framework in my first draft, but chopped it to make the points cleaner. You'll note that I actually talk about Ruby and not RoR in that section.

      Of course, anybody using a well engineered MVC framework is going to write cleaner code - no matter the language.

  74. I'm using perl... by Anonymous Coward · · Score: 0

    ...to put together a mathematical compression algorythm for text. The algorythm assigns values from a register to each text character in a file, then chop up and recalculate those values into smaller values.

    All hail to the spacepope.

  75. Re:is your company weak? by nschubach · · Score: 1
    I picked out a few things I wanted to ask about/pick on (forgive me):

    AND WHO SAID THAT XML IS SUPPOSED TO BE HUMAN-READABLE?
    Ever try "humanly reading" a binary data file to find a value? :P

    And free XNA development is a plus.
    Forgive me if this changed recently, but don't you still have to pay $100 to test your game on the console or was that just to "publish" it on the web?

    and the customers like that little blue "e" it's hard to convince them to click on the Firefox icon.
    Same issue here (until I showed my parents Adblock) but your talking big distributions where plug-ins probably are not an option. Though I do hate that people get lost when the "E" icon goes away without taking a second to look around (I normally name the Firefox icon "The New Internet" to help them.)

    Otherwise, I too would prefer a Java world if they could update the language to include things like accessors and such, but I've not not been a fan of anything Microsoft out of prinicple for some time so my viewpoint is bias/skewed.
    --
    Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
  76. Javascript? by nog_lorp · · Score: 1

    Javascript is good for everything! My Javascript DRM system is totally awesome.

  77. Sometimes two is better than one. by Anonymous Coward · · Score: 0

    Unless your interpreter can detect inner loops and compile them to native code for you. This is one advantage of using a language that targets the JVM or CLR: the widespread interpreters for these targets are designed to do just that. Why should inner loops and outer loops be written in different languages?
    Sometimes they shouldn't be. If the language that targets the JVM or CLR is expressive enough to keep your logic quick to write and easy to maintain, and the JVM or CLR is fast enough for your inner loops, then there's no reason not to go with that solution.

    n the other hand, sometimes two languages are better than one. Like it or not, the JVM and CLR are not always viable options. Maybe there isn't an implementation for the platform you want to use. Maybe you can't get approval to use anything with them but Java and C#. Maybe they just aren't fast enough; not every application is a long-running process of the sort that really benefits from runtime optimization. Maybe they simply aren't managing to recognise and optimise your inner loops, for whatever reason. In such a case, you are going to see a benefit from dropping down to C, either from your JVM/CLR-based language, or from another high-level language like Perl or Ruby.
  78. MSAccess by Anonymous Coward · · Score: 0

    I'm waiting for the "You Used Microsoft Access to Write WHAT?!" story...

  79. On behalf of the 2 dozen or so Tcl users out there by EvilTwinSkippy · · Score: 1

    I register my indignation that Perl should be subject of "WTF?" in regards to application. I can assure you the Tcl is used in everything from telescopes to routers to the ad splicing system for all of the NBC television network.

    And in fact, I'm composing this from a browser I wrote in Tcl. It's a ni#$%@#$^H^H^H
    ***NO CARRIER***

    --
    "Learning is not compulsory... neither is survival."
    --Dr.W.Edwards Deming
  80. Re:is your company weak? by misleb · · Score: 1

    That's very optimistic. More that this is obsolete in the time it takes to develop lesson plans, get textbooks approved, etc.


    Nonsense. Technology does not move THAT fast. Even saying 50% is obsolete in 2 years is a bit a of a stretch. Seriously, how much has CS/IT really changed in CS since 2005? Maybe a new major version of Java? Yeah, I'm sure Java developers were just scrambling to catch up there... not. Most just continued targeting old releases. Any big changes in Javascript? Python? PHP? Perl? Ruby? C#? Nope, still the same stuff with perhaps a few API updates here and there. Have basic concepts like sorting, linked lists, and recursion changed? Nope. Has some new major concept in programming replaced OO? Nope. Hell, you coudl probably go back 7 years and not find too many major CS concepts that have changed significantly.

    Anyone who says that what they learn in CS is obsolete in the time it takes to develop lesson plans and get textbooks approved either went to a shitty school (and had shitty text books) or simply failed to grasp the larger concepts and patterns.

    -mtthew
    --
    "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
  81. Re:Write once, run everywhere? Not always :( by Haeleth · · Score: 1

    In those cases I prefer the use of shell scripts since these are easily transportable.
    Excuse me while I roll around on the floor laughing.

    I ran into a fun problem with a shell script recently. Turned out that it relied on the setting of an environment variable that the "programmer" had in ~/.profile. Not documented, of course. It was hell to debug.

    At least when Perl is missing a CPAN module it tells you exactly which module it's missing and refuses even to start the script, instead of getting halfway through what it's doing and then suddenly bailing out with an irrelevant message that doesn't even tell you where in the script the error occurred.
  82. Re:is your company weak? by sacherjj · · Score: 1

    Java and C# are almost exactly the same in syntax. How about maintaining BASH scripts, Perl, Python, and Power Builder? Not quite the same. There are advantages to keeping standardization in technology unless there is a really good reason to change.

  83. Re:is your company weak? by theshowmecanuck · · Score: 2, Interesting

    I'll take someone with no formal CS training yet is able to think abstractly over employees like him anyday


    Sadly it is the brain dead of the HR departments and headhunters who do the hiring/selecting... usually. To them, what is on paper trumps experience. Seems that ever more often these wastes of brain pans either submit for interviews or will outright hire a newly graduated Masters student (based entirely on their piece of paper) with fuck all experience and make them managers or 'senior' developers, or architects, etc. And people who you would like to hire will have their resumes dumped in the waste bin because they don't have the requisite piece of paper that the dumb fuck HR person thinks makes you useful. So you know who is going to be your new boss. Must stop now before meltdown. Yes, some bitterness. Life. :)
    --
    -- I ignore anonymous replies to my comments and postings.
  84. Re:is your company weak? by Vellmont · · Score: 1


    I'm not really too tempted to hack javascript on the client side to make my app "AJAX-enabled" just to be more responsive

    I'm not a big javascript fan myself. I really appreciate some of the custom tags that've come out of the Struts 2 project. They provide AJax functionality, without having to mess around with the actual Javascript (Javascript generated by the JSP).

    --
    AccountKiller
  85. COBOL is as good as anything? by mkcmkc · · Score: 1

    I wonder if this whole discussion is off the mark. Languages are for the most part trivial. And universal. I wonder whether if you had to write everything in COBOL or VB for the next five years you'd still feel the same way.
    --
    "Not an actor, but he plays one on TV."
  86. monkey and a keyboard by Anonymous Coward · · Score: 0

    Give the monkey a keyboard and in a few years it will come up with an article that CIO will publish.

  87. woosh-woosh by StargateSteve · · Score: 1

    LADIES AND, well, I guess no ladies, but GENTLEMEN! we have here, a DOUBLE-WOOSH!

    1. Re:woosh-woosh by jma05 · · Score: 1

      So now Perl Jokes are obfuscated too?

    2. Re:woosh-woosh by StargateSteve · · Score: 1

      yes. ever seen a JAPH sig?

  88. People keep saying this... by JavaRob · · Score: 4, Insightful

    ...and I tend to think they just aren't doing anything *significant* in just-learned languages.
    The problem is not learning the syntax and basic idioms. Agreed, that's pretty quick, particularly if you have a good reference.

    The problem (and the time sink) is the *ugly* side of every language. The parts of the standard libraries that sucked, and were reimplemented elsewhere (but you gotta know that...). The functionality where everyone who "lives with" the language grabs X open source library to implement -- not Y! it's a POS! -- but you don't know that yet. The language features that have secret, illogical gotchas for special cases. The bugs in the compiler or interpreter that are easy to avoid -- once you've been burned once. The code that will break cross-platform compatibility for obscure reasons. The code that will make it almost impossible to internationalize later, because you didn't learn how that support worked yet.

    Granted, the cost of these things with any reasonable mature language should not be enormous (though it depends how long you go down a wrong path...), and you can allow for it, but it's always a significant risk *especially* if you don't have someone on the team (perhaps the new team who has to maintain your old code) who's already more-or-less expert level.

    But either way, you have to allow *something* for that cost, and sometimes it's not worth it just to use the absolute best tool for the job when you have a pretty close fit available.

    1. Re:People keep saying this... by QRDeNameland · · Score: 2, Insightful

      The problem is not learning the syntax and basic idioms. -snip- The problem (and the time sink) is the *ugly* side of every language. -snip- The language features that have secret, illogical gotchas for special cases. The bugs in the compiler or interpreter that are easy to avoid -- once you've been burned once.

      This is worthy of a mod +5 - Wish I Said It Myself. It bears repeating. Syntax can learned in a few hours, figuring out the quirks can last you a lifetime.

      --
      Momentarily, the need for the construction of new light will no longer exist.
  89. Re:is your company weak? by hjf · · Score: 1

    IIRC, you can download it to your console via LAN, what you can't do is "burn a DVD" with your game.

    Oh, and in my case, I noticed that they don't get lost... they look everywhere, pushing any buttons, keyboard, mouse, start menu, whatever... trying to find the little "e". Damn, when they want something they learn quickly.

  90. PHP companion article also is up by Esther+Schindler · · Score: 1

    You Used PHP to Write WHAT?!

    Despite significant shortcomings, PHP is perhaps the most popular Web scripting language in the world. But despite a large collection of nails, not every tool is a hammer. So when should it be used, and when would another dynamic programming language be a better choice? We identify its strengths and weaknesses.

    http://www.cio.com/article/176250

  91. Perl is a write only language by xtronics · · Score: 1

    It might have a place doing quick and dirty jobs that won't ever be maintained, but it is not a language to use for some thing that needs to be maintained - I know because I wrote thing in perl.

    1. Re:Perl is a write only language by chromatic · · Score: 1

      I know because I wrote thing in perl.

      You wrote bad code, and it's the language's fault? Did a camel lock you in a room and force you not to write good code? Did a llama threaten to burn down your house unless you removed all unnecessary whitespace and used only single-letter variable names?

  92. new languages? by reiisi · · Score: 1

    If you're recognizing that new each new system you write is essentially a new language, you might be ready for lisp or FORTH.

    --
    Computer memory is just fancy paper, CPUs just fancy pens with fancy erasers; the 'net is just a fancy backyard fence.
  93. You sound like you may be in a good position to understand what the authors of the Scheme Reports mean when they write that "programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary."

    Lisp does this sort of thing by trying to find the really fundamental things that must be provided in order to allow you to do anything at all you could ever want. This is why R6RS Scheme has record types, libraries with controlled export, hygienic macros and call-with-current-continuation; if you have these four features, you can build nearly every interesting feature of any other language out there on top of them. Dynamic method dispatch, in the style of object-oriented programming? Easy. Lazy evaluation à la Haskell? Can do. Logic programming, like in Prolog? A few (admittedly a bit hairy) lines of code using call-with-current-continuation, but after that, it's easy to use. Pattern matching? Just a few moderately-complex macros. Synchronous message-passing concurrency? Sure, why not.

    This isn't to say that the Lisp world is a panacea, but the languages are more flexible, period.

    1. Re:Lisp by chromatic · · Score: 1

      ... if you have these four features, you can build nearly every interesting feature of any other language out there on top of them.

      Similarly, it's possible to build just about any type of object system atop the Perl 5 object system. You can even build a CLOS-style object system (though it does take a bit of work to get multiple dispatch to work correctly.)

      However, the result should be clear to anyone who remembers Lisp pre-CLOS or who's tried to work with code which uses several object systems built on Perl 5 in the same program, or any Tcl programmers: sometimes providing one good and sane default that works for 95% of the uses is better than giving everyone the same tiny box of carefully-crafted tools and patting yourself on the back for adhering to a mathematical model of purity that breaks down when you don't invent everything from scratch for each tiny program.

  94. By Neruos by Anonymous Coward · · Score: 0

    Being a Software Architect for over 10 years, with 90% of my time on a winbox. I have yet to find a opensource solution that can do anything better then closed source solution. Flame all you want. Perl, Java, Ruby, PHP? None of those flavors does anything that Javascript, VBscript and ASP/VB/C.net couldn't do. Oh MS software is security open, bloatware, bla bla bla. I don't blame the technologies, I blame the developers.

    Dirty Programming is the #1 cause of failed, unsecure software, period.

    I wish, instead of everyone and their grandmother turning out some new 'opensource' language, wrapper, script, etc. People would focus on a tried and true language and improve the flaws.

  95. Turing Machines vs. Lambda Calculus by mstahl · · Score: 2, Interesting

    What you're really talking about here is the difference between the Turing machine model of computation and the Lambda Calculus model, and you're absolutely right. Even though the two are provably equivalent (try expressing one of your Haskell programs as a while loop with a stack; it works but it sucks having to write it!), the very mentality that you use when programming in a language like Haskell is so totally radically different from how you program in C that it's useless comparing the two.

    In college I did a lot of work in cryptography and artificial intelligence. These are tasks for which functional programming is particularly well suited. I remember the day that I learned what the functional folding did. It was like that moment you're talking about, when suddenly I realized that summing all the values in a list didn't require its own function and it was just one succinct statement. Suddenly the evaluation of a perceptron network became a functional fold nested in a functional map, and my AI code shrank from hundreds of lines to dozens, but was still perfectly readable.

    People can say that languages are universal . . . but that's really not the full story is it? The fibonacci sequence, for instance. I'd express it like this in Haskell:

    let fibs = 1 : 1 : zipWith (+) fibs (tail fibs)

    How do you explain that line of code to someone who's only ever seen C? And yet it'll compute the 1000th fibonacci number almost instantly on my computer. The infinite list idiom can only exist in a lazy-evaluative language, and that's a concept that doesn't even translate well to other functional languages like ML (unless you cheat and use ML's lazy module, which I've never really figured out).

    One of the greatest things that I learned in college was that languages are not universal. The people who say they are obviously talking about Java vs. C vs. C# et cetera. Going from imperative to semi-OO like C to C++, you're not really switching entire paradigms. Going from imperative to, say, pure OO (see also: Ruby, Smalltalk), or going from imperative to pure functional (see also: lisp, ML, Haskell, Prolog), is quite a mindfsck.

    Anyways I'm glad to hear that it's not just me here who loves the functional languages. Have you decided to do anything cool with it yet?

    1. Re:Turing Machines vs. Lambda Calculus by myvirtualid · · Score: 1

      Have you decided to do anything cool with it yet?

      I've a few things in mind, I'm letting the concepts soak whilst I consider the different ways of representing and manipulating the data. It's an enriching experience, even before writing a line of code.

      --
      I'm here EdgeKeep Inc.
  96. Sometimes but not often... by metalhed77 · · Score: 1

    Sorry, but language still makes a difference.

    http://www.codinghorror.com/blog/archives/000838.html

    C++ Compiled 1:1
    Visual Basic Compiled 1:1
    C# Compiled 1:1
    Java Byte code 1.5:1
    PHP Interpreted > 100:1
    Python Interpreted > 100:1

    --
    Photos.
    1. Re:Sometimes but not often... by ivan256 · · Score: 1

      Those numbers don't even pass the laugh test. I don't understand why anybody who wants to have a shred of credibility would have published them. Anybody who has used more than one of those languages knows that 100:1 for Python or PHP compared to C++ is *bullshit*, as is even 1.5:1 for Java. You may be able to find some corner case where some specific operation make the statement true, but the article conveniently neglects to mention what they are testing to get those numbers.

      Yes. Interpreted languages are slower than compiled languages. But you say "Sorry" like you're implying I was arguing otherwise. What I was arguing was two things: that when you are working under development time constraints, it is often easy to write a *much* faster application in a feature rich interpreted language than you can in the same amount of time in a less featured language, and that proper selection of algorithm with an eye towards computational complexity can be dozens of orders of magnitude more important than what language you select.

      The article you reference is especially ironic, since it does a fantastic job of pointing out the shortcomings of the application framework (Rails in that case), and then confuses the language with the framework in his argument and unreferenced "data". In other words, he was keen to start a holy war, but he doesn't understand basic concepts. I guess he thinks he has some credibility because he's from Berkeley, and that we won't notice his bias by clicking though to his company's website which claims they "[use] the latest Microsoft technology to redefine the human/computer interface". Easy to pick the right tool for the job when the job is defined by the tool...

    2. Re:Sometimes but not often... by metalhed77 · · Score: 1

      First off, I think you read the quoted text in the article AS the article since Jeff Atwood doesn't really talk about rails much at all in his actual comments. I think you actually agree with his point. He even says that since the problems they're having are mostly centered around the their DB the programming language probably doesn't even matter.

      I was just responding to you closing with "It's the programmer that creates slow, unreadable code, not the language." That's a fairly useless statement to make if you have to qualify it so much. What you meant to say was that sometimes using the fastest algorithm means using a slower language due to development time constraints, and that sometimes, this can produce a faster application, even when using a slower language. That's a far cry from saying that bad programming is the only speed constraint, because really, that's what that statement says. Sure, if you read some of the preceding paragraphs you would realize there were qualifications to that, but the qualifications are so huge that the statement loses all value.

      Really though, this is just quibbling over language. I simply think you were playing fast and loose with language, trying to take a nuanced point and turn it into a sexy soundbite, even when it didn't really fit the bill. I think we agree on the substance of this issue, I just take issue with your saying things which even you don't agree with.

      Lastly, about the benchmarks, I don't want to get into a language holy war, but the gist of what Jeff Atwood says is still true: "...interpreted languages are so slow that if you have to ask how much performance you're giving up, you can't afford it...".

      --
      Photos.
  97. Misinformed Author by acid06 · · Score: 1

    This article contains huge bits misinformation spread all over.

    The author fails to notice completely the recent advances of Perl such as Catalyst which is a Rails-like (but better) framework for web application development.

    Also, Perl isn't interpreted. It's compiled to bytecode on the fly and run by its internal virtual machine, much like Java (except Java has an explicit compilation stage, while it's implicit in Perl).

    Perl performance is more than adequate and surpasses most other languages except. A proof of that is SixApart's perlbal - a load balancer completely written in Perl which is as fast as most of other solutions currently available (some of them in hardware) while providing much greater flexibility.

    I'm honestly disappointed by this article (even the title is full of prejudice), especially because I don't have many hopes for the author to correct his mistakes and this is a somewhat influential site.

    The bottom line is: Perl is an evolving language and we're not in 2000 anymore. Recent Perl developments have made the language a full fledged platform for web development. But developers need to code in "2008 Perl" not "last millenium Perl".

    PS: I wrote this comment for this original article on cio.com and I thought this wouldn't get past the Firehose here... either way, I only pasted it here because I think my comment can be informative or insightful to some of you. Since I'm a bit late, I'm pretty sure it will probably end up buried unless someone mods it up, oh well.

    1. Re:Misinformed Author by strcpy(NULL,... · · Score: 1

      Also, Perl isn't interpreted. It's compiled to bytecode on the fly and run by its internal virtual machine, much like Java (except Java has an explicit compilation stage, while it's implicit in Perl).
      Please learn the meaning of 'interpreted' first.
      --
      echo 'cat sig | sh' > sig
    2. Re:Misinformed Author by acid06 · · Score: 1

      I am fully aware that Perl is bytecode-interpreted (actually, to be more precise, optree-interpreted). But there's a difference between that and line-interpreted languages such as Tcl. My main issue is that people perceive Perl as an interpreted language while also perceiving Java as compiled language.

      You can't use double standards. You either use "interpreted" for both bytecode-interpreted and line-interpreted languages (in which case both Perl and Java are interpreted languages) or you use it for line-interpreted languages (in which case neither Perl nor Java are).

      It's important to note that bytecode interpreted can possibly mean no relevant impact in performance whatsoever because it's possible to write JIT compilers, it's much easier to achieve decent performance and you could even develop hardware for that VM while this would never be possible for line-interpreted language.

      I wouldn't post here if I didn't know what I was talking about and suggest you to follow this same advice.

    3. Re:Misinformed Author by strcpy(NULL,... · · Score: 1

      It really doesn't make much sense to talk about whether a language is interpreted or not. There are C interpreters, for instance.

      The perception about Java being a compiled language is somewhat wrong. There are Java-based CPUs, but other systems have to interpret the code. However, there is no Perl machine or a Perl-JIT compiler. Perl is interpreted on all systems.

      For bytecode performance, what do you get past the AST? Maybe memory seek improvement, maybe disambiguation thru type inference. You're still throwing away all the good work that went into making the branch predictors, separate instruction/data caches, scoreboarding etc. Not to mention the running time requirement for translators vs compilers.

      --
      echo 'cat sig | sh' > sig
    4. Re:Misinformed Author by acid06 · · Score: 1

      It makes sense when talking about Perl because there is only one Perl language, which is defined as whatever is implemented by perl. There isn't a language specification document and this is by design.

      Perl isn't interpreted on any system. Perl is compiled by perl and then its optree is interpreted by perl. The optree is interpreted, not the language itself. I think you've still failed to understand the difference here. There is a formal compiler in there. There is a compilation stage, then you've got 3 optimization stages and then, finally, execution. It just happens to be all inside the same program.

      Empirically speaking, line by line interpreters are slower than bytecode interpreters. Look at the history of Tcl or Ruby (I'm not aware if Ruby is already bytecode interpreted or if it's something scheduled for 1.9 or 2.0).

  98. Perl by Mike610544 · · Score: 1

    Perl is a hacker language: powerful, flexible, opaque to beginners. But that's what we have C and assembly for ... to scare off first year CS students. Scripting languages have evolved, and for getting real work done there are better options now.

    IMO Perl is a bad choice (for a new project) for anything that involves functions being called. I think even the most ardent Perl fanboi will admit that passing arguments to functions in Perl is completely broken. When you can write a single big flat procedure or a one liner that does a bunch of text processing it puts Python to shame, but beyond that you're doing a lot of unnecessary work.

    In the real world, CPAN is a big plus, and the amount of Perl code running huge portions of the internet will not go away anytime soon (nor should it.) Perl hackers should continue to ply their craft; Obviously, what works prevails over my rambling, but I think Perl is going the way of COBOL.

    P.S. Yes, I understand the irony of posting this via an impressive array of Perl code.

    --
    ... also, I can kill you with my brain.
    1. Re:Perl by chromatic · · Score: 1

      I think even the most ardent Perl fanboi will admit that passing arguments to functions in Perl is completely broken.

      Unless you mean argument unpacking or call by reference when accessing @_ directly, I have no idea what you mean. Can you elaborate?

  99. Perl was exactly the right tool for my raytracer.. by Dr.+Zowie · · Score: 1

    ... because it was a one-off scientific visualization, and writing in Perl Data Language minimized coding time. Sure, it took two hours to render a scene of the solar corona as seen from a spacecraft flying through it, while an implementation in C might have taken a few hundred milliseconds -- but it only took me a week to code up and debug, and if I were writing in C it would have taken at least a month.

  100. I wrote a ray tracer in Perl. Right choice. by Dr.+Zowie · · Score: 1

    It was for a one-off scientific render. Run time was long (measured in hours) to render the desired scene, but run + devel was exceedingly short (measured in days).

  101. Re:is your company weak? by Ced_Ex · · Score: 1

    Oh really? That way of thinking has caused my work to consist of things like FoxPro for DOS 2.6 , Visual FoxPro, VBA, VB6, VB.NET, C#, Ruby, Python, Bash, Java, just off the top of my head, without going into mainframe. Best tool for the job has made my job a maze of concepts.

    I went through Computer Science, I know the conceptual level, but guess what? There's a little thing called "reality" that gets in the way. What really happens in the real world, is nothing like what the concepts are supposed to be.

    Filtering through syntax, programming styles that span a multitude of generations is tough. Had they just tried to use the K.I.S.S. principal (which by the way, isn't taught in school), I might have an easier time today. Instead, I go through this stuff and scratch my head wondering, "Why the hell am I the one dealing with this?"

    --
    Live forever, or die trying.
  102. THE BEST SOFTWARE by DynaSoar · · Score: 1

    for any given job is the one the person given the job knows best. Just ask them.
    Until they learn something better. Same thing.

    --
    "I may be synthetic, but I'm not stupid." -- Bishop 341-B
  103. My. God. by joto · · Score: 1

    This has to take the price of the stupidest article on slashdot ever. It's an article, using three pages, to explain in great detail, the prejudices most people have for/against perl, and explaining it like it was something really insightful. No shit, perl is good scripting, but bad for numerical analysis? You must be kidding me? Who the fuck needs to be *told* that?

    Ok, I realize this was for cio.com, which I assume is for pointy-haired bosses (not really sure about american nomenclature for boss titles). But come on, why not put up an article explaining that it's good to listen to your technically competent employees when you face decisions of a technical nature? And what the fuck is it doing on slashdot? I thought this was "news for *nerds*", not "news for blatantly incompetent people who decide to replace actual thought with stereotyping".

  104. Re:is your company weak? by Unoti · · Score: 1

    Seriously, how much has CS/IT really changed in CS since 2005? Maybe a new major version of Java? Yeah, I'm sure Java developers were just scrambling to catch up there... not. Most just continued targeting old releases. Any big changes in Javascript? Python? PHP? Perl? Ruby? C#?
    Actually, things do move faster than you think. It's not all as static as you seem to suggest. I can't help but think that you're falling rapidly behind the technology curve without realizing it, if you honestly think not much has changed since 2005. Do you only write on Slashdot, and never read? A few things:
    • C# 2.0 and 3.0 In 2005, C# 2.0 was entering beta. People were maybe going to use it. The idea of being able to rely on having .NET 1 installed on people's machines at all was really just finally solidifying. It was hard to find web hosting that supported ASP.NET 2.0 in 1995. C# Web code was, by and large, written exclusively in 1.1. Web development in 2.0 is day and night different from 1.1, so that's a major area of technology regarding C# that's moved on the last 2 years. Clearly you're not familiar with the radical new things in C# 3.0, like LINQ. You may think you're not sure if LINQ will be awesome, but you probably didn't like generics either then. Finally, 2 years ago Silverlight was just a "maybe someday they might do something". Today Microsoft is pushing silverlight hard and it's going to happen.
    • Mono. Way better system today that it was a couple of years about. They've implemented System.Windows.Forms, it runs fast as JIT native code, and it runs ASP.NET 2.0. It's practical for production now, both for web, for server apps, and for GUI apps under either Linux or Windows. Wasn't nearly as good or practical 2 years ago.
    • Ruby. Ok, you really think nothings happened with Ruby since 2005? In 2005 Ruby was really exotic and rarely used, and rarely heard of outside of certain circles. Ruby's popularity and adoption has increased staggeringly since 2005. You think anybody saw advertisements looking for Ruby developers in 2005? Hell no.
    • PHP. Ruby's popularity has fueled innovation in other areas, including here. CakePHP is a framework I've used on some projects that's really a terrific way to write things. There's other killer frameworks that have come a long way in the last 2 years, such as Django.
    • Python Gaining in popularity really fast. Django, and other apps are very strong. Today if you aren't well versed with a scripting language of some sort, you're dog meat compared to other developers. People weren't as wise to that two years ago as they are today.
    • Erlang Those umpteen multi core processors are coming soon, and more and more people are interested in languages that easily support parallel processing and distributed processing. Erlang is gaining steam fast. Have you tried it yet? I can tell you tons more people know Erlang today than did in 2005.
    Seriously, if you think things aren't moving fast in the industry, then do be careful. If you've been coding the same thing for a handful of years and not learning much new... well, you can only do that for so long before you're like those old COBOL guys that didn't need to learn any of that that newfangle C crap, or the VMS folks that didn't need Unix.
  105. Buzzword Bingo. by Lord+Kano · · Score: 1

    This guy lost me when he started singing the praises of Ruby On Rails by claiming that it "offer more out-of-the-box Web support and a cleaner integration into the webpage experience"

    When people start giving verbal fellatio to Ruby on Rails without giving concrete details, I know that they're full of shit.

    Once, I was explaining to a friend of mine an application that I wrote in Perl. He asked me why I didn't choose something newer, like Ruby on Rails. I told him that I used Perl because I knew it. I then asked him some questions about Ruby and he didn't know the answers to any of them. Nothing that should have been too difficult. I asked him about things like type conversion and whether it was a compiled or interpreted. He was like "I use a Mac. I don't know."

    Perl is so widespread because it's powerful. I won't be writing any device drivers in it, but it's useful for a LOT of other things.

    LK

    --
    "Hi. This is my friend, Jack Shit, and you don't know him." - Lord Kano
  106. perl is (almost) gone by darkat · · Score: 1

    I used Perl for ten years, but for me is almost dead now. Ruby, Python, even Javascript (Rhino) and other languages have the same pattern matching capabilities (Perl's greatest strength), have a more clean syntax and, which is very important, have been ported to the JVM. Something that make them usable in different environments and embeddable in other applications. Perl is not there yet and it appears that it will never be.

  107. Are you trolling? by BerntB · · Score: 1

    You keep claiming that mod_perl is fragile. That hasn't been mine (and others) experience. Could you give references to support your claims or are you just trolling?

    --
    Karma: Excellent (My Karma? I wish...:-( )
  108. PDL for math is great! by uuxququex · · Score: 1
    ...or anything with heavy math processing in Perl...

    With PDL you can do heavy math processing really, really fast. And easy!

    1. Re:PDL for math is great! by localman · · Score: 1

      Well maybe I'll have to give it a try. Thanks for the suggestion.

  109. Re:is your company weak? by misleb · · Score: 1

    C# 2.0 and 3.0 In 2005, C# 2.0 was entering beta. People were maybe going to use it. The idea of being able to rely on having .NET 1 installed on people's machines at all was really just finally solidifying. It was hard to find web hosting that supported ASP.NET 2.0 in 1995. C# Web code was, by and large, written exclusively in 1.1. Web development in 2.0 is day and night different from 1.1, so that's a major area of technology regarding C# that's moved on the last 2 years. Clearly you're not familiar with the radical new things in C# 3.0, like LINQ. You may think you're not sure if LINQ will be awesome, but you probably didn't like generics either then. Finally, 2 years ago Silverlight was just a "maybe someday they might do something". Today Microsoft is pushing silverlight hard and it's going to happen.

    Ok, but how much does what you learn in CS depend on language specific features? I'm not saying you don't have to keep up to date on languages and APIs. But there's no real fundamental change in the above. Then again, I'm not intimtely familiar with C# specifically, so maybe its evolution was so radical that it makes everything you knew before obsolete. But I seriously doubt it.

    Mono. Way better system today that it was a couple of years about. They've implemented System.Windows.Forms, it runs fast as JIT native code, and it runs ASP.NET 2.0. It's practical for production now, both for web, for server apps, and for GUI apps under either Linux or Windows. Wasn't nearly as good or practical 2 years ago.

    So what about this makes what I might have learned in CS obsolete?

    Ruby. Ok, you really think nothings happened with Ruby since 2005? In 2005 Ruby was really exotic and rarely used, and rarely heard of outside of certain circles. Ruby's popularity and adoption has increased staggeringly since 2005. You think anybody saw advertisements looking for Ruby developers in 2005? Hell no.

    You've gone beyond taking my statement out of context. Now you're confusing a change in popularity of a language with a change in the language itself. Even Ruby 1.9 (soon to be 2.0, hopefully) doesn't change THAT much. It will mostly just make Ruby faster.

    PHP. Ruby's popularity has fueled innovation in other areas, including here. CakePHP is a framework I've used on some projects that's really a terrific way to write things. There's other killer frameworks that have come a long way in the last 2 years, such as Django.

    As we speak, I'm in the process of writing a nasty letter to my alma mater demanding my money back because my entire CS education was centered around a web framework that has now been obsoleted by CakePHP.... NOT.

    Python Gaining in popularity really fast. Django, and other apps are very strong. Today if you aren't well versed with a scripting language of some sort, you're dog meat compared to other developers. People weren't as wise to that two years ago as they are today.

    There's plenty of jobs of developers who specialize in Java, for example. Now you're just making shit up.

    Erlang Those umpteen multi core processors are coming soon, and more and more people are interested in languages that easily support parallel processing and distributed processing. Erlang is gaining steam fast. Have you tried it yet? I can tell you tons more people know Erlang today than did in 2005.

    Again, confusing changes in language/framework popularity with fundamental changes in CS. tsk tsk.

    You would happen to write for Wired magazine, would you? Because this is exactly the kind of technology infatuated garbage I would expect from taht magazine.

    Seriously, if you think things aren't moving fast in the industry, then do be careful. If you've been coding the same thing for a handful of years and not learning much new... well, you can

    --
    "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
  110. What about slashdot? by Bootarn · · Score: 1
    Found this among the areas perl wasn't suited for:

    3. As a Web scripting language IIRC, slashdot is built on perl :)
  111. hmmm what? by Anonymous Coward · · Score: 0

    BUT in SOVIET RUSSIA Perl uses YOU to deal LSD!

  112. haha... but... are you considering Erlang? by toby · · Score: 1

    An "obscure" language could well be the stand-out choice, regardless of whether the skills already exist in your organisation. You can outsource them to get a more optimal solution (Erlang consultants, for example) rather than being restricted to the lowest-common-denominator of developers you already have.

    Disclaimer: I've dabbled in Erlang.

    --
    you had me at #!
  113. Re:is your company weak? by Unoti · · Score: 1

    ASP.NET 2.0 actually pretty much does in fact obsolete most of what you might know about ASP.NET 1.0, which I expect is nearly nothing. I won't bore you with a point by point response to what yuo wrote, I'm sure neither of us care enough to take it seriously anyway.

    But two quick notes. Yeah, I can name the next COBOL. It's called Java and Visual Basic, both. They both are languages with large code bases that people have to support but would really rather be using a newer platform if they could.

    Also, you keep talking about your CS curriculum. You must be really young and new here. You need to pick up new skills on your own. Hopefully 15 more years into your career you'll be thinking about what you learned in the last couple of years, rather than still thinking about what you learned in CS school.

  114. Re:is your company weak? by misleb · · Score: 1

    ASP.NET 2.0 actually pretty much does in fact obsolete most of what you might know about ASP.NET 1.0, which I expect is nearly nothing. I won't bore you with a point by point response to what yuo wrote, I'm sure neither of us care enough to take it seriously anyway.


    You're thinking too narrowly. So what if ASP.NET 2.0 is a lot different than 1.0? CS is about concepts and patterns. Not about the framework du jour. If your education centered on teaching you a specific language and/or framework, you got ripped off.

    But two quick notes. Yeah, I can name the next COBOL. It's called Java and Visual Basic, both. They both are languages with large code bases that people have to support but would really rather be using a newer platform if they could.


    Well, Visual Basic has always been a bit of a toy. Nobody I know ever really took it seriously. SO yeah, I can see that becoming the next "COBOL" in the sense that it will be obsolete. But Java? Please! Java devs I know kinda like it. It has plenty of third party support. It is fast and mature. And technically speaking it isn't really that much differnt than C#. So how do you figure it is going to be the next COBOL? Certainly not any time soon.

    Also, you keep talking about your CS curriculum. You must be really young and new here. You need to pick up new skills on your own. Hopefully 15 more years into your career you'll be thinking about what you learned in the last couple of years, rather than still thinking about what you learned in CS school.


    I'm talking about CS because that is what this thread is about. The issue is this: how fast does technology move and how quickly is what you learn in CS obsolete? I was responding to a person who claimed that most of what you learn is CS is obsolete in the time it takes to make up a lesson plan. Which is just plain wrong.

    I'm perfectly comfortable with my ability to pick up new languages and frameworks as needed. And that is because I grasp the larger concepts and patterns, rather than focusing on the the syntax and APIs of particular frameworks.

    -matthew

    --
    "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
  115. Re:is your company weak? by Zarf · · Score: 1

    I have only limited exposure to "C++BVB" and no experience in BVB in Perl, Java, Python, ... yet. Don't show me, please. Actually it's just plain Bad Coding... or BC... the language is irrelevant. Perhaps Bad Coding is a more universal language than even Engrish.
    --
    [signature]
  116. Re:is your company weak? by Hognoxious · · Score: 1

    I wish I could say I remembered UML modeling but honestly, I hated that darned part of CS and never paid attention there anyways
    I read a book on it once (I was seeing a lot of hype about it) and my reaction was along the lines of "huh?". Likewise there's been a lot of talk on some SAP websites about Business Process Modelling and BP Modelling Notation.

    I don't want to be a luddite and sometimes you can get tripped up if you don't know the latest buzzwords but I've always had a slight suspicion they're all really flowcharts with a bag on the side.

    I also have a concern that the spiffy diagrams become an end in themselves, and give the illusion that it's simpler than it is; very dangerous when the dominant organisational belief is that anything computer related is "just a bit of typing".
    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  117. False Perception by Anonymous Coward · · Score: 0

    I used to work (for 14 years) updating a very large system... multiple platforms, multiple languages, multiple designs.

    Was born from the integration of many original unrelated systems, that evolved to be a single one... in the process: language translation/platform migration/redesign was normal.

    The long term end-user relevance of the system its posible because supports metaprogramming at diferent points (each in a different language) transparently trought (in todays terms) "template driven bytecode generators" (who had guessed at that time!! we believed to be ast producers)

    I was one of the embebed compilers integration guys... at the end we were doing Eiffel, scheme, sql and c. And migrated parts from Modula-3, lisp and some old propietary inventions (at different times tested ml, haskell, ocaml for use) No asm allowed: low level stuff was done in modula-2 (for qa reasons)

    I can tell you: Imperative programing can fake functional doing data driven designs (ending with an adhoc functional language) Pointer to data structures can fake OO and dynamic (ending whit an adhoc OO and/or dinamic language) and template generation could make the use practical.

    Every paradigm in programming languages can express more clearly some problems, but not all... but, c let you do it all using the least hardware. The question allways has been: How you need it? going from easy and clear to explicit and efficient.

    Yes i now, lots of languages but no english (but maybe better than your german)

  118. Perl is not interpreted by melonman · · Score: 1

    I've lost count of how many times I've seen this rather basic mistake. Perl is compiled before it executes. So there's a compiler overhead with each execution, and that can amount to several seconds if you use loads of libraries, which is why it's best to run non-trivial perl websites using mod_perl. But once it's compiled, it's as compiled as C and rather more compiled than java.

    For many text-based tasks, Perl is blindingly fast. The canonical example (from the Camel Book) is implementing grep in perl, which runs faster than some native OS implementations. That's partly because it's optimised for that sort of task, but it's also that it has a ruthlessly efficient implementation of hashes. Sure, you can do better in C if you really try, but if you don't really try a perl nested hash structure will blow C linear search out of the water.

    The Camel book acknowledges that perl isn't the fastest option for tight loops, and ray tracing would probably fall into that category. But, more generally, the other thing about perl is that it has an extremely large collection of APIs to C libraries. If I want to parse XML, LibXML/LibXSLT are among the fastest C libraries out there, and those libraries run about as fast when called from perl as they do called from C.

    --
    Virtually serving coffee
  119. Re:Write once, run everywhere? Not always :( by J.Y.Kelly · · Score: 1

    Perl scripts may not be portable because they use modules that are not installed everywhere.

    Then simply bundle the modules with your program. Not always a universal solution, but we use it a lot to distribute perl applications around our site.

  120. I'm disappointed in this article... by johnny99 · · Score: 1

    ... I honestly thought it was going to be WTF-worthy stories about/from people who had written inappropriate applications in Perl. Or JavaScript or whatever.

    It seems to be written for managers who don't know much about programming -- when they get stuck talking to programmers at work functions they'll have something to chat about, before they say "excuse me for a second" and run away to talk to someone important instead.

  121. Re:is your company weak? by leet · · Score: 1

    Bravo friend. I couldn't agree with you more. I study all the time and it's all valuable. But what I learned in my CS curriculum is priceless. That can never be replaced by clever frameworks and technologies.

  122. Re:is your company weak? by MmmmAqua · · Score: 1

    This post is NOT black.

    This post is blacknot.

    This post is black...




    NOT

    --
    Arr! The laws of physics be a harsh mistress!