Hi,

I heard so many times that perl is good for quick and dirty job.

After all why it's considered not a good job? After all some good things can be achived via that work. Don't you think so..?

Being in America, people respect every job here..
The notion of 'dirty' associated with job via perl doesn't give good feeling
Rather it should be mentioned that 'perl is good for any type of such jobs'.

Replies are listed 'Best First'.
Re: Why after all ? not good
by blakem (Monsignor) on Sep 21, 2001 at 22:43 UTC
    "Quick and Dirty" refers to small, hastily written scripts that aren't particularly robust or optimized. They often accomplish a specific, narrowly-defined goal, and can't be easily reused for similar tasks. In this context a program is "dirty" if it doesn't make the job of writing the next one any easier. Perl excels in this domain because it doesn't impose many restraints on the programmer. Other languages adopt various formalisms that are good practices for bigger projects, but overkill for a 10 line program. Perl's native abilities are also often a great match with the needs of the typical one-off script.

    Of course, perl allows you to enable stricter coding guidelines with various pragmas such as 'use strict', and 'use warnings' (and actually 'use Module' in general makes for less-dirty code...). Hence the mantra "Perl makes the easy things easy and the hard things possible."

    -Blake

      I understand the context of 'dirty'.

      we can very well use "for onetime only" instead of "dirty".

Re: Why after all ? not good
by dragonchild (Archbishop) on Sep 21, 2001 at 23:48 UTC
    I would also like to mention that Perl is excellent for taking what was written for those "quick and dirty" jobs and turning them into multi-use programs. I can't count the number of times I've written a one-off and realized a week later that I needed something more robust. So, I just wrote a module based on my one-off.

    It's actually, in my opinion, the best feature of the language - the support for development efforts of all shapes and sizes.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Re: Why after all ? not good
by CubicSpline (Friar) on Sep 21, 2001 at 23:50 UTC
    I acutally like the 'dirty' part of perl. In particular the fact that TMTOWTDI allows perl programmers to come up with many solutions to the problem at hand. Often times the solution looks like gibberish to the untrained eye. I've gotten quite a kick out of showing fellow developers some of my Perl code and their response is, "All that gets done with THIS?!"

    Besides when it comes to getting a job done expeditiously, quick and dirty are two of the most revered adjectives that can be ascribed to code.

      especially these days, with hardware so cheap. i've implemented viable solutions at work with cast-off hardware using debian and perl. my primary scripting host is a p75 with 64 mb ram and a 1 gb hard drive. i can leave it sitting there, running all day on various and sundry tasks that deliver real value in a very unobtrusive way, seemingly out of nowhere. as time goes on i revisit some of the stuff and clean it up, enhance it as my skills develop, but when the marginal utility of developing something new exceeds that of smoothing functional code by several orders of magnitude, it's hard to justify worrying about being fancy.

      optimizaqtion, in a mathematical decision-making context, refers to finding the appropriate balance between resources expended and return. when the hardware you are using would be valued at $50-75, it's hard to justify spending $150 of my time squeezing cycles until i've reached the point at which the new stuff i want to add is contrained by what is already running (or the other way around, whichever way you want to look at it.)

      look at it this way. i work in the labs of a state health department. if i deliver three solutions that occupy 6 hours a day on a machine that would be surplussed if i weren't using it, is that less optimal than delivering two applications that run in two hours? which solution do you think the taxpayers would prefer?

        Liberating words. A theme I've read dragonchild on, more than once. Code needs lots of different kinds of resources to run. CPU, memory and all that stuff, sure, but also Write Time and Fix Time. Perl seems to shine when those last two are the ones you want to minimise. And given that everything else is getting cheaper and cheaper, that's a good strategy (as well as being one instinctively favoured by the geeks who do the Write 'n' Fix). For me, self-"employed" (quotes meant to dispel any illusion I might be getting paid) writing an application for a web site well past its launch date, this translates into "if the site goes live a month earlier, it'll make enough money in that extra month to pay for the RAM and processor speed you would have saved by farting around getting the code to go quicker."

        Nevertheless, I always find myself worrying about little improvements that take a long time to get done. Perhaps this confession will help me to cut to the chase with renewed vigour.

        § George Sherston
      For better of worse,
      I don't like the word dirty, It some how associates with the word 'bad'.
      Nothing personal towards anyone
      It's just me.. ------------------------------- print 'just another perl lover';