Forgot your password?
typodupeerror
Perl Programming

Is Perl Better Than a Randomly Generated Programming Language? 538

Posted by timothy
from the before-swine dept.
First time accepted submitter QuantumMist writes "Researchers from Southern Illinois University have published a paper comparing Perl to Quorum(PDF) (their own statistically informed programming language) and Randomo (a programming language whose syntax is partially randomly generated). From the paper: 'Perl users were unable to write programs more accurately than those using a language designed by chance.' Reactions have been enthusiastic, and the authors have responded."
This discussion has been archived. No new comments can be posted.

Is Perl Better Than a Randomly Generated Programming Language?

Comments Filter:
  • Perl Is way better (Score:5, Informative)

    by PerlJedi (2406408) Works for Slashdot on Thursday October 27, 2011 @05:15PM (#37861494) Homepage Journal
    I'd have to say PERL is better than a lot of purposefully crafted languages. Its syntax is very forgiving, and there are lots of ways to do most things. Those two components are likely the reason this study came to that conclusion. This in no way means that PERL is not a good language. It does mean that many people can write PERL badly, but many people speak English badly and that doesn't reflect poorly on the language. PERL is, IMO, and should always be: Easy to do, but impossible to do "perfectly". But then I'm not sure that anything can truely be done "perfectly". Things may be done poorly, well, very well, or nearly perfectly, but to claim perfection is to deny the possibility of improvement.
  • Re:Better? (Score:5, Informative)

    by Smallpond (221300) on Thursday October 27, 2011 @05:23PM (#37861578) Homepage Journal

    Yet another ridiculous summary. The study wasn't which language was better, it was in which language can first-time users write a program more accurately. My guess is that Cobol would beat any of the three - it is designed from the ground up to be readable.

  • Not so fast.... (Score:5, Informative)

    by Ardeaem (625311) on Thursday October 27, 2011 @05:23PM (#37861586)
    They claim that Perl is not significantly better than Randomo, but that's just due to the test they chose. Looking at their figure, Perl programmers outperformed Randomo programmers in 6/6 tasks (that is, their means were greater). Using a simple sign test [wikipedia.org] on the differences between the means, the two tailed p value is about 0.03, and the one-tailed p value (I think we're justified here having having a directional hypothesis...) is about 0.015. Both of these numbers are less than 0.05; we are justified in saying that Perl programmers performed significantly better than Randomo programmers, in spite of what the paper says.
  • by finnw (415539) on Thursday October 27, 2011 @05:30PM (#37861666) Homepage

    Yes it was Perl 4 [perl.org], which is one of the flaws in this study.

  • Re:Trick question? (Score:4, Informative)

    by X0563511 (793323) on Thursday October 27, 2011 @05:55PM (#37861962) Homepage Journal

    Hence the name: Pathologically Eclectic Rubbish Lister.

    Note for the ignorant... that REALLY IS what it stands for!

  • by Smallpond (221300) on Thursday October 27, 2011 @05:56PM (#37861970) Homepage Journal

    "we did not train participants on what each line of syntax actually did in the computer programs. Instead, participants attempted to derive the meaning of the computer code on their own."

    They were not trained. They were just shown code samples with no explanation. The code samples had 1-letter variable names and no comments. The Perl sample uses $_[0} for getting the first sub argument instead of shift, and "for ($i = $a; $i = $b; $i++)" to do a for loop instead of "foreach $i ($a .. $b)", so it is deliberately obfuscated Perl.

  • Am I wrong? (Score:2, Informative)

    by blanks (108019) on Thursday October 27, 2011 @06:57PM (#37862576) Homepage Journal
    "Its syntax is very forgiving, and there are lots of ways to do most things"

    Am I the only person who sees this as one of the biggest problems with PERL? Don't get me wrong, I love choice and having options. But when you're learning a language you do not want 10 different styles of writing a function, statement, loop, whatever. Because when you are working with 10+ people you now have 1 language, 10 different ways to write in (and now 10 different ways you need to read).

    When I first started learning PERL and reading books, websites and downloading examples all the different styles of writing in PERL was the biggest problem. You can't just simply learn how to do an IF statement, you have to learn the 20+ different ways you COULD write an IF statement, since every example you will find online will be totally different.
  • by chromatic (9471) on Thursday October 27, 2011 @07:34PM (#37862876) Homepage

    While calling functions with an ampersand may not have any obvious advantages...

    It in fact has three disadvantages: it bypasses any prototype coercions, it passes @_ unmodified by default, and it's unidiomatic.

    I'd argue that C-style loops are a good idea...

    All of these fencepost errors I've fixed argue otherwise.

  • Re:Next question (Score:3, Informative)

    by increment1 (1722312) on Thursday October 27, 2011 @08:14PM (#37863204)

    The study cited has several biases in favor of the scripted languages that are acknowledge by the author in the references of your supplied link.

    Primarily:
    - The non-scripted languages (C, C++, Java) were tested under formal conditions in 1997 / 1998 (Java 1.1 I assume), the script programmers wrote their programs at home and self reported their times (and in most cases spent several days thinking about the problem before starting work, time which was not included).
    - The script programmers were told that the programmer effort and elegance of their solution was a criterion, the non-script programmers were only told that the program would be judged based on its correctness (accuracy).
    - The script programmers had immediate access to a hint (to resolve a misread requirement) which was only available to non-script programmers after they failed an acceptance test.
    - The non-script group would have a cost deducted from them each time their program failed an acceptance test, whereas the script group had access to the final acceptance test data.

    Overall, the comparison between the languages does not seem fair, or at least not the comparisons of the scripted and non-scripted languages.

From Sharp minds come... pointed heads. -- Bryan Sparrowhawk

Working...