Perl is no more accurate than randomly-generated language
neverworkintheory.org
neverworkintheory.org
An analogy: I don’t know how to read sheet music with any proficiency. It would be easier for me if note duration were shown by horizontal length instead of the system of tails and open/filled circles. However, this wouldn’t be as good for experts, who care more about fingering than about being able to see the melody in the most literal way.
I don’t happen to like perl’s syntax, but this study by itself isn’t proof that it’s objectively bad for the people who use it heavily.
More than that. Three languages were chosen. One was based on what previous studies had shown works, and one sounds like it was basically a ROT13'ed perl (only with symbols), and from what some were saying on Reddit it was an overcomplicated dialect of perl (though IMHO that would change little). Then, in a study in which they pitted Perl against a language designed to do well in studies, the language designed to do well in studies prevailed.
Even though I do question whether there may be a wee whiff of tautology about this whole exercise, this is interesting because it shows that studies may be able to distinguish between the features of two languages w.r.t. how easily they can be taught and learned. This is valuable stuff, millions upon millions of dollars to society's worth of valuable stuff. What it says about Perl is simply that it was not designed to do well in such studies, quelle surprise, and in particular it doesn't say anything at all about Perl relative to any other real language. $YOUR_FAVORITE_LANGUAGE may well have fared worse, and $YOUR_MOST_HATED_LANGUAGE may well have fared much better.
It is a true shame that the underlying valuable message of the study is being missed by so many people in a tearing hurry to go "hurr hurr, perl t3h suckz, hurr hurr".
I disagree. If it says anything, it's that if you give bad code to people who don't know anything about programming, they'll have trouble writing good code.
No, it's not surprising that perl performed poorer than Quorum. The surprise is that perl did as poorly as Randomo, which should not be sensible given that the operators and keywords are gibberish.
I generally agree with what you're saying, but the point of the study is not that the well-designed language did better. Who wouldn't expect that? But there is no tautological question when you realize that the result they are focusing on is the near-even performance with Randomo, not the failure to exceed or match Quorum.
It's pretty clear that they aren't engaging in perl bashing, but trying to provide data that backs up their experiential findings as teachers.
So, while it still looks pretty bad for Perl, I'd say it's not that bad.
Have you read the study? If not, you can find it here: http://www.cs.siue.edu/~astefik/papers/StefikPlateau2011.pdf
Additionally, i am not anonymous. Google my name and you will find all about me, including, if you look for longer than a minute, my full name and address.
Lastly, there was no need to give support in that comment by repeating what others and myself have said copiously all over the comments here. This was my main post towards that. Feel free to argue it: http://news.ycombinator.com/item?id=3153249
The methodology may be sound, they may be good students and deserve a good grade, but there are absolutely zero conclusion to draw from this paper except for the fact that it may be valuable to make a larger study.
Most jazz musicians I have talked to and taken clinics from really don't like sheet music though, as it is an ineffective and inconcise way to represent a tune's structure and melody, hence why they prefer charts. Charts really are worlds ahead of sheet music in my opinion.
Of course when you start out reading notes, double-sharps are confusing as heck.
I do still think that in the end people are just conforming to the standard to make life much much more easier, and that it isn't so much that certain things are better for the expert then the novice, but that experts are more used to the standards than a novice is.
I feel it's more of a matter of personal style than a programming language x being more efficient when you become an expert when compared to language y. Some people really fly with Perl, whereas other people are more of a Python kind of person.
I don't feel that any written music can or could adequately convey the feel, shape, or nature of the music--you've got to work through it with the group, or hear someone who already understands the piece.
About the double sharp, it often has to do with tonality. Classical music is typically more tonal than jazz. The sharp is needed when you temporarily change tonality, and some tonalities just need double sharps then and there –Gsharp dur for instance. If you wrote the natural note instead, it would not convey the intended tonality.
I was also unnecessarily harsh towards double-sharps as well, when I was learning piano I would sight read a lot of easier pop/rock sheet music, and there were a few pieces I encountered with an unnecessary double-sharp that would catch me off guard because it was uncommon for the style.
A more interesting test to me would be something like seeing how fast experts in a number of languages could extend or find a bug in code by other experts. I think there’s been a little research on this, but I don’t know enough to link to the best of it.
As I said, I dislike Perl’s syntax. But I think that, on the available evidence, it makes sense to see that an an opinion on the level of disliking cilantro, not on the level of disliking geocentric cosmology.
It is not The Final Proof (against what? perl?), but it is nice to find one way, among maybe other, to give some ground to empirical teaching experience.
I don't know much of perl, but I tried bash, and know PHP well, and really, really, the language used does matter, it will shape your models and logic, and change the way you handle, debug, write, read, maintain code.
Some people seem to adhere to the relativist cliché: all languages are good for something, in their field of usage. It is a matter of personal taste (implying it doesn't matter at all).
I don't agree. All languages are not equal. The breadth or their application field is often not comparable (eg compare bash, which is useful for some unix scripting tasks, with python, which can do web, and math, and stats, and windows grey-hacking, and multiplatform desktop clients, and image processing, and Unix scripting, etc.)
Having worked with (and fought against) PHP for many years and recently switched away, I can tell, it is not a matter of taste, some languages are simply worse, which implies that some are better. There is no "equal rights" to enforce in this domain.
[edit: clarify]
Interestingly (perhaps) I repeatedly hear from people with language/humanities background that they tried both python and perl and found perl much, much easier to start to get things done with - the more natural-language-ish aesthetic of perl being a strong contributor to that (I'm a pure maths grad but my parents are both Eng. Lit. grads, so I guess I sort of count in the "humanities background" category).
On the other hand, people with non-humanities backgrounds almost always found python easier to start to get things done with, even if they later found perl to be their preference.
Above comments based purely on anecdata; take them for what you will.
I first met Perl after spending some years working in the UNIX command line environment, and it made intuitive sense ... to someone who primarily used awk, sed, and bash (and able to get stuff done in C). I was up to speed and productive in it within a couple of days. (This was in the days of Perl 4 -- the OO stuff in Perl 5 came years later.) At that level, Perl was basically every UNIX text-handling tool rolled into one handy bundle oriented around script execution rather than interactive shell work, with a bunch of POSIX extras and things like the socket() API thrown in to take it beyond the toy language level.
The point is, Perl isn't a beginner's language. Rather, it's an elaboration of a pre-existing toolset that assumes you're already familiar with the UNIX way before you get started. Pitching it against a teaching language isn't even an apples/oranges comparison: it's like comparing a circus merry-go-round to a helicopter (they're simply not intended for the same purpose or the same user demographic).
Larry Wall, http://groups.google.com/group/comp.lang.misc/msg/1ebc89bbc0...
While this is interesting, presenting it as a “randomly-generated language” is extremely misleading.
All in all, though, this paper goes much further in trying to derive language usability than any I've seen. And it does seem disturbing that randomly selected characters (even for a subset of the language) should fare as well as Perl's hand-picked syntax.
"participants were given a code sample worksheet for the particular language group they were in. The general idea of the experiment is to give novice users code samples similarly to if a participant was learning to program from home on the Internet.
This code shows one of the code samples provided to participants."
$x = &z(1, 100, 3);
sub z{
$a = $ [0];
$b = $ [1];
$c = $ [2];
$d = 0.0;
$e = 0.0;
for ($i = $a; $i <= $b; $i++){
if ($i % $c == 0) {
$d = $d + 1;
}
else {
$e = $e + 1;
}
}
if ($d > $e) {
$d;
}
else {
$e;
}
}
This ridiculous thing was supposed to help their test subjects learn Perl.If all their perl samples looked like that it should not be a surprise to anyone that their test subjects were entirely confounded. What is missing in that paper is a description of how they actually sourced their code samples, as well as a list of all code samples provided.
s/no more accurate/no easier for beginnners to learn/
EDIT: And why the downvote? I would actually be interested to hear a better title.
action z(integer a, integer b,
integer c) returns number
number d = 0.0
number e = 0.0
integer i = a
repeat b - a times
if i mod c = 0 then
d = d + 1
end
else then
e = e + 1
end
i = i + 1
end
edit: I realize the title I gave isn't short enough to post on HN, but I wanted to reply just to make a point about the study, not your title.What a silly thing to test in isolation; does the syntax of a programming language present a greater barrier to a novice than the semantics of programming?
A better study would have controlled for the ability of the eighteen participants to describe their algorithms in pseudocode.
$x = &z(1, 100, 3);
sub z{
$a = $_[0];
$b = $_[1];
$c = $_[2];
$d = 0.0;
$e = 0.0;
for ($i = $a; $i <= $b; $i++){
if($i % $c == 0) {
$d = $d + 1;
}
else {
$e = $e + 1;
}
}
if($d > $e) {
$d;
}
else {
$e;
}
}
Fixed? $x = z(1, 100, 3);
sub z{
my( $a, $b, $c ) = @_;
my $d = 0;
my $e = 0;
for ($a..$b){
if($_ % $c == 0) {
$d++;
}
else {
$e++;
}
}
if($d > $e) {
return $d;
}
else {
return $e;
}
}If you don't explain the logic behind the special characters, of course it's easier to learn what the code is about from the notation which has less special characters and less semantic behind the special characters, like their better faring language:
action z(integer a, integer b,
integer c) returns number
number d = 0.0
number e = 0.0
integer i = a
repeat b - a times
if i mod c = 0 then
I'd say the students were talented if they managed to make reasonable results in any language, from my perspective, their "better" language is still way too hard for absolute beginners.I blame the title for turning this into Perl sucks vs. no it doesn't discussion. Not going into the problems with their study (N=18, poor Perl samples,...), all they prove is that a novice will much better understand pseudo code designed to be easy to understand than a real programming language.
I'm a Perl hacker and I would be the last to claim that it has an easy to understand syntax. Perl is full of shortcuts and magic that is hard for beginners, but it makes my life as a programmer much more easier. If they compare their pseudo language with Perl, Ruby, and Python, Perl would be at the bottom of the list.
Thousands of people learned programming using perl. This is much more significant than this ridiculous study (randomo language? quorum? give me a break would you?).
Fortunately, at least this poor-piss stuff won't make the headlines, like too many such ridiculous studies run on 30 students do (remember lately "women wearing make-up appear more competent", augh).
"Given this interesting first result, we plan to test a number of additional languages using the same procedures."
Hopefully they'll use larger sample sizes too. This one involved 18 people across 3 groups.
(If you're in a hurry to mention Scheme, that's #27. And on the list of "pedagogical languages" it would still be beaten by Logo at #23, which, frankly, is a sign we probably shouldn't trust the list at all below about #20....)