Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Is Perl Better Than a Randomly Generated Programming Language?

timothy posted more than 2 years ago | from the before-swine dept.

Perl 538

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

Sorry! There are no comments related to the filter you selected.

Better? (5, Funny)

Hognoxious (631665) | more than 2 years ago | (#37861404)

Better? How about we start with distinguishable?

Re:Better? (5, Funny)

Chris Burke (6130) | more than 2 years ago | (#37861486)

Indeed. This is the reason why the Obfuscated Perl Contest is run by the Department of Redundancy Department.

Re:Better? (0)

Anonymous Coward | more than 2 years ago | (#37861516)

My thoughts exactly - my first thought looking at the heading was "I thought perl was a randomly generated language".

Anyone who's read the Camel book would agree.

Re:Better? (5, Informative)

Smallpond (221300) | more than 2 years ago | (#37861578)

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.

Quorum looks a lot like Pascal (1)

tepples (727027) | more than 2 years ago | (#37861670)

My guess is that Cobol would beat any of the three - it is designed from the ground up to be readable.

So are Pascal and Python. In fact, Quorum looked a lot like Pascal from what I saw in the PDF.

Re:Quorum looks a lot like Pascal (4, Insightful)

h4rr4r (612664) | more than 2 years ago | (#37861696)

Languages that consider whitespace need to die.

Re:Quorum looks a lot like Pascal (0)

SilverHatHacker (1381259) | more than 2 years ago | (#37861724)

Languages which require gratuitous punctuation marks to delimit a loop that should already be indented for readability's sake need to die, IMO.

Re:Quorum looks a lot like Pascal (1)

Anonymous Coward | more than 2 years ago | (#37861880)

Any language where:

vs

means something completely different, is not one I intend to use.
If you want to enforce readability, use any one of a number of lint tools out there.

What particularly annoys me is that it isn't even optional. The arrogance of it. Python is so wedded to the idea that TMTOWTDI is a stupid idea, and it really should be. "There Is only Guido's Way To Do It" (sorry, s/Guido/obvious/) that they won't even *consider* supporting an alternate parsing mode.
Any language where bugs can be invisible on a printout or through accidental mangling of a text editor or e-mail copy/paste is a dumb idea.

I love how a beginner Python programmer *accidentally* setup an infinite loop that killed our app, when trying to interact with it.
That's when he wrote his own wrapper to have sane nesting in Python.

http://en.wikipedia.org/wiki/Whitespace_%28programming_language%29
^^^^

Python. Repeating the mistakes of Makefiles.

Re:Quorum looks a lot like Pascal (0)

X0563511 (793323) | more than 2 years ago | (#37861922)

Get a real text editor. They tend to have some way of visualizing whitespace.

Mine, for instance, CLEARLY distinguishes tabs from spaces. Interestingly enough using a monospaced font is helpful as well.

Re:Quorum looks a lot like Pascal (1)

Smallpond (221300) | more than 2 years ago | (#37862066)

I remember monospaced fonts. Punch cards with FORTRAN used them. Remington typewriters used them too.

Re:Quorum looks a lot like Pascal (5, Insightful)

MoNsTeR (4403) | more than 2 years ago | (#37861918)

If those punctuation marks (or keywords) make the code more readable, then they're not gratuitous are they?  I, for one, find brace-less languages fantastically hard to read, Python especially.

Re:Quorum looks a lot like Pascal (0)

Anonymous Coward | more than 2 years ago | (#37861832)

Languagesthatconsiderwhitespaceneedtodie.

FTFY :-)

(I'm guessing you meant that languages that consider whitespace as anything other than a token separator need to die)

Re:Quorum looks a lot like Pascal (1)

h4rr4r (612664) | more than 2 years ago | (#37861904)

I had no trouble parsing that :)

But, yes you are correct.

Re:Quorum looks a lot like Pascal (4, Interesting)

AJWM (19027) | more than 2 years ago | (#37862008)

Fortran (at least, IV and earlier) totally ignored white space, even in the middle of an identifier. Of course, this led to problems like

DO 10 I = 1.10

meaning "assign the floating point number 1.10 to variable DO10I", when the programmer meant to type

DO 10 I = 1,10

meaning "loop from here to label 10 varying I from 1 to 10".

An error something like this caused the Mariner II probe to Venus to go off course at launch and the Range Safety Officer hit the destruct.

Re:Quorum looks a lot like Pascal (3, Insightful)

narcc (412956) | more than 2 years ago | (#37861852)

Well said.

If you want your code properly indented, just indent it. It's like the Python apologists are incapable of formatting their code properly unless the language forces its particular version of "properly" on you.

Before the trolls fire back: In the case of code written by others, run it through a pretty-printer. Problem solved. Oh, as a bonus, you can use that same tool to format code the way you prefer, and switch it back to whatever style your company requires at the press of a button. Why is this a bad thing?

Re:Quorum looks a lot like Pascal (1)

Radres (776901) | more than 2 years ago | (#37861942)

Because in practice, the automated code cleaner results in almost every line of code in the file to have a difference highlighted by my company's source code repository diff generator. This obfuscates the true nature of the change to the logic in the code I am making in order to fix a bug or implement a feature. In turn, that makes it harder for people responsible for maintaining the code to determine what exactly changed from version to version.

Re:Quorum looks a lot like Pascal (-1)

mbkennel (97636) | more than 2 years ago | (#37861924)

Right any language which makes the following different

          condition = iandj
          condition = i and j

deserves to die?

Re:Quorum looks a lot like Pascal (1)

h4rr4r (612664) | more than 2 years ago | (#37862002)

Way to misunderstand what was being said on purpose. You must be a fun guy at parties.

Re:Quorum looks a lot like Pascal (2, Insightful)

DragonWriter (970822) | more than 2 years ago | (#37862030)

Languages that consider whitespace need to die.

Most languages consider whitespace. In most programming languages where both of the following are valid, they will have different semantics:

1: foo bar
2: foobar

Quite a lot of languages even distinguish between different types of whitespace, e.g., C where the following two constructs are different, despite differing only in which particular kind of whitespace:

1:
foo(); //
bar();

2:
foo(); // bar();

Python may be unusual in which differences in whitespace it considers significant, but not in that it considers whitespace significant. People need to stop confusing the issue.

Re:Quorum looks a lot like Pascal (1)

smbarbour (893880) | more than 2 years ago | (#37861990)

Quorum looked a lot like BASIC to me. Only the keywords were different. The headline for the article is horrible (as usual). The headline (and summary) neglect to mention that this test was given to people who had no experience in programming.

We compared novices that were programming for the first time using each of these languages, testing how accurately they could write simple programs using common program constructs (e.g., loops, conditionals, functions, variables, parameters).

My takeaway from this "research" is that Perl is not a good language for beginners. If you already know the general concepts of programming, Perl is fairly easy to pick up.

Re:Better? (2)

mwvdlee (775178) | more than 2 years ago | (#37862054)

COBOL is designed to be readable, but it's hardly writable.
(roughly 10 years of experience developing COBOL code).

Re:Better? (1)

McGuirk (1189283) | more than 2 years ago | (#37861652)

You realize we're comparing this to Perl, right?

It's the study participants. (1)

IBitOBear (410965) | more than 2 years ago | (#37861912)

You know, the "study" (which I didn't read, this being slashdot 8-) probably involved exposing the languages in question a hugely diverse and wide ranging number of College Undergrads That Fancy Themselves Programmers. As such, the fact that the quality of the code was not distinguishable despite the language chosen indites the programmers more than the languages.

The problem with most studies is that College Freshmen already know everything so any attempt to test them is doomed to fail.

Next question (1)

Weezul (52464) | more than 2 years ago | (#37861424)

How does C++ fair? LOL

Re:Next question (5, Funny)

Halo1 (136547) | more than 2 years ago | (#37861498)

How does C++ fair?

Farely average.

Re:Next question (-1)

Anonymous Coward | more than 2 years ago | (#37861668)

How does C++ fair?

Farely average.

Good, but I would have gone with "Slightly above average"

Re:Next question (1)

Weezul (52464) | more than 2 years ago | (#37862024)

I know C++ fairly well, trust me, it's the most pointlessly complex language on the planet. And the boilerplate goes on forever.

C++ might have developed sanely if they'd introduced it's major features in reverse order, i.e. lambdas way back in 1983, templates a bit later, and class methods only during the last decade. As it stands, there are basically two types of C++ code : code that badly emulates functional programming styles, and code consisting entirely of calls to simple wrappers around extern "C" functions.

Re:Next question (2, Funny)

Anonymous Coward | more than 2 years ago | (#37861532)

How does C++ fair? LOL

#%@$&#@^UGSOWDYRO&F@#L(EGFGP*$TW

This Script written in Perl computes the answer.

Re:Next question (0)

Anonymous Coward | more than 2 years ago | (#37862014)

# = start of comment in Perl. As usual, 0 clue by most Perl haters.

Re:Next question (0)

Anonymous Coward | more than 2 years ago | (#37861582)

Omg that post was teh funnay! Us java weenies are teh smart amirite?!

Java? (1)

Weezul (52464) | more than 2 years ago | (#37861906)

How is Java better than C++?

Re:Next question (1)

Smallpond (221300) | more than 2 years ago | (#37861776)

In a productivity study of experienced users, perl & python were best and C++ worst in both time to finish and lines of code.

http://www.connellybarnes.com/documents/language_productivity.pdf [connellybarnes.com]

Re:Next question (0)

Anonymous Coward | more than 2 years ago | (#37861812)

Was one of the assignments to write Battlefield 3?

It's easy being easy when the problem domain is restricted to easy shit.

Re:Next question (1)

h4rr4r (612664) | more than 2 years ago | (#37861940)

Far more problems fall into what you seem to consider "easy". My guess is you don't know either language nor what a hard problem really is.

Re:Next question (1)

element-o.p. (939033) | more than 2 years ago | (#37862016)

Cool, but I'd be curious how the languages fared in other metrics as well. For example:
  1. Errors per line of code at initial run/compile, as appropriate;
  2. Time to debug;
  3. Number of times run/compiled until the program has been debugged;
  4. Time to modify when the software requirements change; and
  5. Number of new errors introduced when the software requirements changed.

I've used Python, and Perl is my "goto" language (sorry, bad pun) so I tend to suspect they would do better than C/C++ in these areas too, but it would be nice to have a study supporting or even refuting that theory.

Trick question? (3, Funny)

MrEricSir (398214) | more than 2 years ago | (#37861474)

I always thought Perl was a randomly generated programming language.

Re:Trick question? (0)

Anonymous Coward | more than 2 years ago | (#37861526)

I second that.

Re:Trick question? (4, Funny)

PPH (736903) | more than 2 years ago | (#37861534)

Hence the name: Pathologically Eclectic Rubbish Lister.

Re:Trick question? (1)

osu-neko (2604) | more than 2 years ago | (#37861700)

Hence the name: Pathologically Eclectic Rubbish Lister.

Amen, brother.

Re:Trick question? (1)

the eric conspiracy (20178) | more than 2 years ago | (#37861868)

Like everything else in Perl, the name is too long.

Pathological Rubbish would have been more apropos.

Re:Trick question? (3, Informative)

X0563511 (793323) | more than 2 years ago | (#37861962)

Hence the name: Pathologically Eclectic Rubbish Lister.

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

Re:Trick question? (0)

Anonymous Coward | more than 2 years ago | (#37861574)

PERL, the worlds best write-only language.

Re:Trick question? (1)

AJWM (19027) | more than 2 years ago | (#37862052)

I think APL has the edge there. It went so far as to make up its own non-ASCII symbol set.

Perl Is way better (5, Informative)

PerlJedi (2406408) | more than 2 years ago | (#37861494)

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:Perl Is way better (4, Insightful)

Tridus (79566) | more than 2 years ago | (#37861536)

"Its syntax is very forgiving, and there are lots of ways to do most things"

That's probably why it's so commonly known as a write-only language. "Forgiving syntax" in particular usually leads to someone sitting around later trying to figure out WTF is going on.

It's possible to write bad unreadable code in anything, but it's just so much easier in Perl that I shudder anytime I get asked to look at someone elses Perl code. That has NEVER been a good experience.

Re:Perl Is way better (1)

BarfooTheSecond (409743) | more than 2 years ago | (#37861680)

"I shudder anytime anytime I get asked to look at someone elses Perl code. That has NEVER been a good experience."

Again, this depends on the programmer who wrote the code, not the language.
It surely can happen that Perl has nothing to forgive..

Anyway Perl was ment as a "Practical Extraction and Report Language". Imho, in this domain it remains the best!

Re:Perl Is way better (2)

PCM2 (4486) | more than 2 years ago | (#37861784)

Again, this depends on the programmer who wrote the code, not the language.

Sure, but all the Perl documentation I've ever seen (Camel Book, etc.) encourages Perl coders to concentrate on the result foremost, even at the expense of the process. Thinking about how to write well-structured code seems to be actively discouraged in the Perl community. Once it works, you're done.

The Python community were among the first point this out: Sure, there may be "more than one way to do it," as the Perl hackers like to say, but there's probably one good way to do it. If you don't even bother to think about what way that might be, you're going to tend to produce crappy code.

Re:Perl Is way better (1)

Tridus (79566) | more than 2 years ago | (#37861900)

It depends on both. I mentioned specifically that you can write bad unreadable code in anything because it's true.

But that's like saying you can kill people with a screwdriver. It's true, but it's an awful lot easier with a shotgun. Perl just seems to make it an awful lot easier to "be clever" and come up with something that nobody can understand later. I don't consider that a good thing.

Re:Perl Is way better (1)

hedwards (940851) | more than 2 years ago | (#37861734)

Sounds more like an issue of EBCAK.

You can make a program that's illegible, blaming Perl for the incompetence or sloth of the people that are writing the code is hardly a fair. What about all those C programs where code is being run from random other files without concern for organization or maintainability?

Re:Perl Is way better (1)

jedidiah (1196) | more than 2 years ago | (#37861746)

Yeah but wasn't this supposed to be measuring the efforts of "first time users".

Maintaining someone else's code is an entirely different problem.

Trying to sort out someone else's code is generally a scary experience across the board. You can make spaghetti out of any language.

Re:Perl Is way better (1)

anss123 (985305) | more than 2 years ago | (#37862068)

Trying to sort out someone else's code is generally a scary experience across the board. You can make spaghetti out of any language.

IME it's easier to read Java code, even decompiled java code, than just about anything. C# sharp can be easy too, but a lot more regx use, linq and such ugliness drag it down.

Re:Perl Is way better (2)

mvar (1386987) | more than 2 years ago | (#37861752)

I use perl for my daily tasks (scripts etc) at work and this "forgiving syntax" has been a time saver.. imho perl is (or should be) just an administrator's tool, nothing more. And yes, its true that reading someone else's code is usually a bad experience and you probably end up writing the program yourself from scratch

Re:Perl Is way better (2)

h4rr4r (612664) | more than 2 years ago | (#37861766)

use strict;

Learn it, live it, love it.

Re:Perl Is way better (5, Insightful)

gold23 (44621) | more than 2 years ago | (#37861756)

I would suggest that perhaps Perl is particularly effective in separating good from bad programmers. In other languages, restrictions allow bad programmers to write code that *looks* good.

But if you see readable, understandable Perl code, you know you've got a keeper.

"if you see readable, understandable Perl code" (1)

Quila (201335) | more than 2 years ago | (#37861892)

One of these days that may happen to me.

Re:Perl Is way better (1)

snowgirl (978879) | more than 2 years ago | (#37861928)

I would suggest that perhaps Perl is particularly effective in separating good from bad programmers. In other languages, restrictions allow bad programmers to write code that *looks* good.

But if you see readable, understandable Perl code, you know you've got a keeper.

I've looked at Perl like I look at English. It's possible to write really well done English that uses some obscure structures for emphasis, or to increase clarity. It is however more likely that someone will piece together the most incoherent confusing material into an English essay, and you will have difficulty following it.

Illegible code in Perl is not a fault of the language, but rather a fault of the programmer. Whether the matter of Perl letting people write so hideously is a good or bad thing, it must simply be noted that no one complains about English for allowing people to write horrible messes.

Re:Perl Is way better (1)

Chemicles (771024) | more than 2 years ago | (#37861840)

I agree, but you could say that about English too. You can try and communicate the same point in many different ways in English properly, but there's definitely a certain sentence structure that'll get your point across more easily with more people than other phrasings. It's not so much the fault of the language so much as it is the speaker's fault.

Although yes, having had to look at other people's Perl code and the fact that Perl allows this flexibility makes me :(

Re:Perl Is way better (1)

arth1 (260657) | more than 2 years ago | (#37861856)

Comments are supposed to tell you what's going on. In fact, Perl has a built-in self-documentation system that makes it a breeze to document and find the documentation you want.

You don't maintain perl code by trying to understand it and tweak it. You maintain it by replacing lines or blocks of code with better written code.
And if you're not man enough to write better code, wtf are you doing trying to maintain it in the first place?

Re:Perl Is way better (3, Insightful)

grcumb (781340) | more than 2 years ago | (#37861902)

"Its syntax is very forgiving, and there are lots of ways to do most things"

That's probably why it's so commonly known as a write-only language. "Forgiving syntax" in particular usually leads to someone sitting around later trying to figure out WTF is going on.

One could - quite validly - say the same about the English Language.

Now, I'll grant programming and spoken/written languages don't overlap perfectly with one another. That's why languages like LISP have such elegance; what they're designed to express is something far more abstracted and formalised in nature. It's possible to conceive of a complex structure and accompanying set of behaviours and properties simply by scanning a screenful of LISP, but English is narrative in nature. You don't scan across; you scan from top to bottom.

It's possible to write bad unreadable code in anything, but it's just so much easier in Perl that I shudder anytime I get asked to look at someone elses Perl code. That has NEVER been a good experience.

Perl can be difficult to grok, but it can be elegant as well. I've experienced revulsion looking at Perl code before, but never so consistently as with ASP and PHP. These are languages (and I use that term loosely) that simply cannot be made pretty.

In the right hands, Perl can be as elegant and expressive (and opaque, and efficient) as Shakespearean English. Argue however you like, the same is not true of many other languages. Python has clarity and simplicity. It's truly an engineer's language. LISP, as I've said, is beautiful in the same way architecture can be beautiful: taken as a whole, rather than a story. I didn't understand the appeal of Ruby until I learned that its inventor is Japanese. Then it all became clear. What seemed like awkward, nearly backward syntactical constructions suddenly made sense.

In other words, horses for courses. But arguing that Perl is not readable in its very nature is like arguing that English in incomprehensible based entirely on watching Jersey Shore.

Re:Perl Is way better (0)

Anonymous Coward | more than 2 years ago | (#37861542)

You'd think a Perl Jedi would know it's spelled Perl, not PERL.

Re:Perl Is way better (0)

Anonymous Coward | more than 2 years ago | (#37861818)

Unless it makes him so happy that he shouts whenever he thinks about it -- be glad he didn't add !!!! after each one.

Random? (0)

Anonymous Coward | more than 2 years ago | (#37861502)

What does "random" really mean in this context? This seems more like just a waste of time.

Sample Size 18 (-1)

Anonymous Coward | more than 2 years ago | (#37861548)

They sample size was 18 people. People actaully wrote better programs with perl than the random language. But the sample was too small for it to be statistically significant. So this study needs to be done with like a 100 novices before they can say anything real.

Novices learning from whom...? (1)

madprof (4723) | more than 2 years ago | (#37861570)

Who taught them Perl? Where did they learn to call subroutines with an ampersand? A Perl 4 manual?

OK they're novices but even I didn't write loops using C-style loops as a novice Perl coder because I was reading that it was more readable to do for($a..$b) instead.

Re:Novices learning from whom...? (5, Informative)

finnw (415539) | more than 2 years ago | (#37861666)

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

Re:Novices learning from whom...? (1)

hedwards (940851) | more than 2 years ago | (#37861768)

That's sort of the the point. I'm not a good programmer, but when I code, I tend to use Perl, I focus on making the code legible and typically don't take on much with it. Perl works well with that, but there's plenty of folks that use Perl for things that it's not really intended for and don't have any idea what maintainable code should look like.

Ultimately GIGO, you need more than a study like this to determine whether or not Perl is better than a randomly generated programming language. Ultimately, I would be extremely surprised if it were generally true as there's plenty of things in any language that are necessary but wouldn't be guaranteed to be randomly generated.

Re:Novices learning from whom...? (5, Informative)

Smallpond (221300) | more than 2 years ago | (#37861970)

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

And this is relevant because? (0)

Anonymous Coward | more than 2 years ago | (#37861580)

I would think something on the lines of 'what can quorum or randomo do that perl can't' along with the ease of writing hello worlds (as a small side note) would be marginally more interesting.

Re:And this is relevant because? (0)

Anonymous Coward | more than 2 years ago | (#37861938)

'what can quorum or randomo do that perl can't'

Nothing. They're both Turing-complete, and every programmer knows you can write your own Lisp implementation in any Turing-complete language, and then do what you want from there. (Or if you're a language fanboy, write your favored language in Lisp macros, and then do what you want. Sysadmins may consider writing C, coding some flavor of bourne-compatible shell, and then writing a small script to do what they want.)

Mathematicians even claim you can write your program directly in any Turing-complete language, but it's not clear why you would bother.

Not so fast.... (4, Informative)

Ardeaem (625311) | more than 2 years ago | (#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.

Also... (5, Insightful)

Ardeaem (625311) | more than 2 years ago | (#37861714)

They also say that

While Perl has never had a particular reputation for clarity, the fact that our data shows that there is only a 55.2 % (1 - p) chance that Perl affords more accurate performance amongst novices than Randomo, a language that even we, as the designers, nd excruciatingly difcult to understand, was very surprising.

This is a complete misunderstanding of what a p value [wikipedia.org] means in statistical inference. The p value is not, and should not be interpreted as, the chance that "Perl affords more [or less] accurate performance." The p value is the chance, given that there is no difference, of obtaining a difference as large or larger. This is covered in first-year statistics.

What are they trying to prove? (2)

medv4380 (1604309) | more than 2 years ago | (#37861602)

Are they telling me that Quorum is better then a randomly generated language at teaching and that Perl makes bad programmers? This sounds more like someone setting up a study and trying to rig it so that their horse (quorum) gets taught in the class room. Personally I stick Perl in the same bucket as VB and most scripts. They may have their uses but new programmers need to be beaten with languages like C and C++ first. Otherwise they learn bad habits. Perl only starts getting good when you use strict so that it has been given permission to beat the programmer for any little mistake.

Re:What are they trying to prove? (1)

tepples (727027) | more than 2 years ago | (#37861688)

What bad habits would one learn from, say, Python?

Re:What are they trying to prove? (1)

h4rr4r (612664) | more than 2 years ago | (#37861732)

That whitespace is a good way to delimit blocks.

Re:What are they trying to prove? (1)

MagikSlinger (259969) | more than 2 years ago | (#37861750)

What bad habits would one learn from, say, Python?

Indentation as syntax.

Re:What are they trying to prove? (1)

Hentes (2461350) | more than 2 years ago | (#37861858)

Indentation is a good habit even if it's not necessary in a language's syntax.

Re:What are they trying to prove? (1)

medv4380 (1604309) | more than 2 years ago | (#37861894)

Indentation is a good habit even if it's not necessary in a language's syntax.

Too much work I'm lazy. Right click auto format puts in all the appropriate indents.

Re:What are they trying to prove? (1)

Hentes (2461350) | more than 2 years ago | (#37861952)

Exactly like a Python IDE.

Re:What are they trying to prove? (1)

h4rr4r (612664) | more than 2 years ago | (#37861914)

Sure but confusing it with syntax is a stupid idea.

Re:What are they trying to prove? (0)

Anonymous Coward | more than 2 years ago | (#37861762)

Not putting semi colons at the end of lines :(

Re:What are they trying to prove? (1)

muon-catalyzed (2483394) | more than 2 years ago | (#37861792)

There are two types of programming languages. Those created to solve an urgent need, to make things possible, better, cleared and more robust. And then there are the other type of languages, those that were created to promote the author, to gain recognition, to sell his books, manuals and help him attain better employment or academic position, Wikipedia entry etc. These junk languages usually sport some gimmicks like mascots, academic syntax (bad/random syntax), performance issues and intended incompatibilities. Successfull creators of these are often seen as 'evangelists' at certain corporations.

SIU is a joke (0)

Anonymous Coward | more than 2 years ago | (#37861608)

I went to SIU GREAT party school...... Their CS dept, however, is a complete JOKE...

Coding in Randomo (0)

Anonymous Coward | more than 2 years ago | (#37861728)

I have heard that in Randomo shops they create variable names by closing their eyes and pulling tiles from a Scrabble set.

Their data... (0)

Anonymous Coward | more than 2 years ago | (#37861730)

Is it just me or do their graphs actually show perl above randomo in all tasks? I mean peal is in the 40-60% while randomo is near 20-40%.

The conclusion is then that quorum has 80% compared to 20%, which is significant while the 40 to 20 is not. I call BS.

In a hundred years we will see this as brilliant.. (2)

SirSpammenot (1075889) | more than 2 years ago | (#37861740)

But for now... If I were a Samurai, I would not start newbies with a live sharp sword. And Modern Perl is so, so very sharp...

I keep reading the full paper (+points for publishing the whole thing!) and have yet to hit upon the definition of the word "accurate" they are using to measure the results. Apparently that is contained inside their previous paper with no direct link. On page 3 though, Perl is described as "A well-known commercial programming language". Really? C# is a commercial language, Perl is an Open Source language with wide commercial adoption that has evolved or the years into several distinct beasts.

Dear Southern Ilinois University Researchers: (0)

Anonymous Coward | more than 2 years ago | (#37861744)

If you give someone Fortran, he has Fortran.
If you give someone Lisp, he has any language he pleases.
                -- Guy L. Steele Jr.

Yours In Moscow,
K. Trout

If you give someone Lisp, (2)

Latent Heat (558884) | more than 2 years ago | (#37861878)

I was going to post a string of close parens as representing the termination of a Lisp program, but the comment moderation nanny would not let me do that. So much for trying to tell a geek joke around here.

Better is a strong word (1)

Hentes (2461350) | more than 2 years ago | (#37861794)

The participants didn't know the languages before. If anything, the study only proved that Perl has a steep learning curve.

Users??? (0)

Anonymous Coward | more than 2 years ago | (#37861842)

.....Perl users were unable to write programs......

Users do not write programs. The entire paper is invalid.

 

APL (1)

sprior (249994) | more than 2 years ago | (#37861848)

Didn't APL prove this a long time ago?

Well written Perl (3, Interesting)

danbuter (2019760) | more than 2 years ago | (#37861854)

When Perl is well written, including indents and not jamming multiple lines all together on one line, it looks very similar to Python, but with a semicolon at the end at each line.

Re:Well written Perl (1)

arth1 (260657) | more than 2 years ago | (#37861954)

Not each line. Only lines that need to be separated. There's no need for a semicolon if the next line is a closing curly, for example.

Some insert them anyhow, and I can see the rationale for doing so. But unfortunately, that also encourages cut/paste programming, which is especially bad for perl. I remove superfluous semicolons precisely so I will have to stop and think before doing a cut/paste job.

Southern Illinois University-Edwardsville (1)

ToSeek (529348) | more than 2 years ago | (#37861890)

It's something of an injustice to credit "Southern Illinois University" researchers for this. The unmodified SIU is in Carbondale, while these researchers were in the Edwardsville branch.

Re:Southern Illinois University-Edwardsville (0)

Anonymous Coward | more than 2 years ago | (#37862078)

It's actually kind of an injustice to SIUE (which despite being somewhat of a commuter school in the past has now passed up SIUC in many academic standards... not that that's particularly difficult...)

long term benefits (1)

e**(i pi)-1 (462311) | more than 2 years ago | (#37861908)

While it is important for adoption how fast one can learn a language, the long term benefits are much more important. I also needed time to get used to Perl but is now a programmable languages very dear to me: it is reliable, has a great culture, is fast, does evolve only slowly and can be extremely powerful. This is similar to LaTeX, which needs first some efforts to learned but after a while runs circles around any other text processing system. Other programming languages or text processors might be easier to get started with, but they do not scale and limitations will eventually lead to frustration.

As the saying goes... (0)

Anonymous Coward | more than 2 years ago | (#37861982)

Never put your Perl before swine... er, wait, what was it again?

funding = $428,054 unless horrible_research; (0)

Anonymous Coward | more than 2 years ago | (#37861986)

$428,054 of taxpayer dollars went to pay for this piece of garbage research.

Experiment seems flawed (0)

Anonymous Coward | more than 2 years ago | (#37862044)

From the paper: "Randomo [is a] programming language based largely on the syntactical structure of Quorum [...] many of the keywords and symbols were chosen randomly from the ASCII table."

The syntax of a language [wikipedia.org] includes a lot more than the keywords; it's the structure, the types of commands, and so on. But the overall structure of Randomo is the same as that of Quorum, it's only the keywords that were replaced.
Even if you buy all the rest of the experimental setup, all the authors have shown here is that Perl's keywords and symbols are no better than randomly chosen keywords and symbols. (And really, any idiot who's ever looked at Perl code could tell you that ;-)
Also, their tasks are very basic and only use a total of about 10 keywords + symbols. Not so hard to remember, even if they're totally random. Try something more complicated and show us how that goes.

This experiment seems almost tailored to get the results they got. They only used novice programmer who'd never seen Perl before (I would hardly call them "'Perl users" like they do in the abstract). Even worse: "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 given only 7-10 minutes to solve each task, including figuring out what their code samples mean. Clearly if you've never seen Perl code before, it's going to take you more than 7-10 minutes to understand what's going on. And if you look at the code for their made-up language, Quorum, it's insanely verbose, e.g.:
"action z(integer a, integer b,
integer c) returns number
number d = 0.0"

Of course this is easier to learn if you're not given any explanations about what the keywords mean. But what programmer, short of a total novice, wants to code in a language like that?

Perl and language (2)

knarf (34928) | more than 2 years ago | (#37862050)

Perl is a language, just like Dutch, Swedish, English, German and most of the others. In just about any language there is, to paraphrase a well-known Perl motto, more than one way to say something. That is in many ways a good thing, especially when it comes to using the language creatively as a novelist or poet or similar type of wordsmith does.

It is true that this quality does tend to make Perl programs somewhat hard to grasp for the uninitiated in the programmers style of writing. That is another quality the Perl language shares with those other languages mentioned above - did you understand all of Finnegans Wake the first time you read it?

In other words, Perl is a writers' language. It is not an editors' language. Once you get into the right mood, Perl flows like your native language does. Done right, this can lead to great things. It can also lead to the sort of notes you made when attending those lectures you did not care about in the first place, and did not understand in the second. Use Perl for things you care about, and it will provide you the means to express yourself in just the right way (for you).

Novice ? (0)

Anonymous Coward | more than 2 years ago | (#37862080)

Er.... no novice can write "perl" code. This is as true as winters being cold.

Perl is a very complex language. More complex than traditional procedural languages which "novices" are used to. It's hard to do anything useful with perl when you start, as it is easy to write complex stuff when you learn it.

I don't even know why perl shows up here.

How can a perl novice understand what "chomp while chomp;" does ?

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?