Posted
by
timothy
on Thursday October 27, 2011 @04:05PM
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."

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.

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.

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.

"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.

"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.

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.