Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: What Perl CAN'T do?

by dragonchild (Archbishop)
on Dec 14, 2005 at 13:07 UTC ( [id://516614]=note: print w/replies, xml ) Need Help??


in reply to Re: What Perl CAN'T do?
in thread What Perl CAN'T do?

Actually Perl doesn't play so well at the other end of the programming spectrum either - 1,000,000 line applications would be somewhat difficult to manage in Perl. And there are real applications that are 1,000,000 lines long because they have to be, not because they are so poorly written that in a realTM language like Perl they would be only 10,000 lines, but because that is a fair representation of their required complexity. Even 10,000 lines of Perl would take a bit of taming. :)

This is completely contrary to my experience. A million lines of code in ANY language takes quite a bit of process to do successfully. I should know - I've written and managed 2.2M lines of code by myself. As for 10k lines of code (in any language) - that's quite easily handled by 1-4 programmers.

As for complexity of Perl applications - 90% of every Perl application you, personally, will ever really want to write is either already on CPAN or will be in the next year. So, really, you're only writing 10% of what you would have to write in any other language. Couple this with the 10-1 LOC difference between Perl and most other languages and my 10KLOC is your 1MLOC. All of a sudden, it's not so hard to manage 1MLOC.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^3: What Perl CAN'T do?
by Perl Mouse (Chaplain) on Dec 14, 2005 at 13:25 UTC
    90% of every Perl application you, personally, will ever really want to write is either already on CPAN or will be in the next year.
    Yeah, and 95% of every C application I will ever write is already in the standard libraries.

    The availability of handy libraries doing all kinds of work for you isn't something that's unique to Perl. It predates the existance of Perl. What sets CPAN apart is its role as a central repository.

    Perl --((8:>*
Re^3: What Perl CAN'T do?
by spurperl (Priest) on Dec 14, 2005 at 17:19 UTC
    dragonchild,

    Have you actually written a 2.2MLOC application ? Sounds like terribly lot... What does it do ?

    Or did you include the used CPAN modules' code in your count :-) ?

      The application was about 25KLOC with about 2MLOC of Perl classes that, essentially, were configuration information. I had several scripts that managed the generation and updates (which were frequent) to these classes that represented messages that the application I worked on needed to handle. This was in addition to any CPAN code.

      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
        But if the "config classes" aren't the single source of this information and you didn't treat it as code -- is it source code? Or is it something else?

        /J

Re^3: What Perl CAN'T do?
by tilly (Archbishop) on Dec 15, 2005 at 06:15 UTC
    90% of every Perl application you, personally, will ever really want to write is either already on CPAN or will be in the next year.

    This is true, but only because I rarely find myself writing Perl applications because I really want to write them. Were it not for that caveat, that hasn't been true in any of my years of writing Perl, and I doubt that it will be true this year, either.

    Perhaps I am just unlucky, or don't know where to look on CPAN for what I need, but I doubt that's it. Instead I think that it is because I wind up writing a lot of programs that are very specific to my local environment, and are solving problems that nobody else is interested in. Which is why I get paid, because I am doing stuff that I wouldn't do if I wasn't getting paid, and nobody else would do either.

    For instance no matter how long I wait, I doubt that anyone will put on CPAN any of the reports that I need to write next week, all of which are very company specific.

    Also I would like to point out that the 10 to 1 productivity differences with Perl are relative to very low-level languages, like C. Even a language like Java closes a significant fraction of that gap. Plus I don't believe that Perl is significantly more productive than, say, Python or Ruby. (In fact I believe that Ruby is actually more productive than Perl!) However I'll also admit that it is hard to find many real-world examples of really long programs written in highly productive languages.

      For instance no matter how long I wait, I doubt that anyone will put on CPAN any of the reports that I need to write next week, all of which are very company specific.

      While the specific items you need will never be on CPAN (because they're specific), you can definitely find a lot of glue code. When I write reporting apps, I reuse the following:

      • Application framework
      • Database access
      • Creating output formats (HTML, XLS, PDF, CSV, XML, etc)
      • Parsing input formats (xSV, XLS, PDF, XML, etc)

      So, maybe the actual report doesn't reuse anything from CPAN, but everything around it does.

      Also I would like to point out that the 10 to 1 productivity differences with Perl are relative to very low-level languages, like C. Even a language like Java closes a significant fraction of that gap. Plus I don't believe that Perl is significantly more productive than, say, Python or Ruby. (In fact I believe that Ruby is actually more productive than Perl!) However I'll also admit that it is hard to find many real-world examples of really long programs written in highly productive languages.

      I agree with you, but Perl is definitely very productive. And, frankly, I'm trying to shift our main development to Ruby, so I agree with you on that, too. :-)


      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
        Each individual report reuses the framework, yes. But I have more reports than framework. Plus the framework that I use is somewhat tied to the specifics of the local system.

        A random reporting tip. If you have problems with browser reports timing out, add a feature that any report that takes above a certain amount of time gets mailed to the current user. It is a simple change to make, but you will become an instant hero.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://516614]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-03-28 18:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found