6 ms·
Teaching Perl to Undergraduates
- bigiain 16y ago"Perl is an amazing programming language. And, with its growing worldwide re-popularization" Have I missed something? I'd kinda like this to be true, Perl is still my go-to language when I need to hack something together - not because I think it's necessarily "the best" language to do most jobs, but because I know it's "the best" language for _me_... Has everybody _else_ figured that out too? ;-)
- semuelf 16y agoThe Perl community is pretty pleased with the state of things. The Moose object system is stable and amazing, and I'm sure future language designers will take not and copy it. Plus a new book just went out 'Modern Perl', that talks also about it. The Perl 6 - rokudo is a usable Perl 6 implementation, already reasonable fast and getting faster every release, and bringing new features from the spec. The release team of Perl 5 is working too, making a new version every two years, with new toys for us to play. Web frameworks are coming out, CPAN is expending... fun times.
- wyuenho 16y ago"Perl is an amazing programming language. And, with its growing worldwide re-popularization" Just because this guy says it is so, doesn't make it is so. Tell me 1 metric that tells me definitively Perl is coming back. If this guy told me Perl is never going away, I'd believe him, but when he told me Perl is coming back, with no data to back it up but his ass, and use that as an excuse to brain-wrap the next generation of programmers to think in an alien language that looks like comic characters cursing with $_@qw()<>$@{}*&lc()~>>>$.$/$<$:, I'd brand it as a trash.
- freyfogle 16y agoOne metric: more new modules uploaded to CPAN on a daily basis than ever before.
- danieldk 16y agoAnd another metric shows that Perl continues its years-long decline: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html http://www.tiobe.com/index.php/content/paperinfo/tpci/index.... This is one of the factors why we have replaced Perl in our curriculum with Python. The other being that Python is far more fit for education.
- rjbond3rd 16y agoIf you are using TIOBE to make decisions on what to teach, I feel bad for your students :)
- bigiain 16y agoThat's true, but having said that, it's well known (or at least often joked about) that Perl makes a poor first programming language but a fine _last_ programming language. Jokes aside, I think the sentiment has some strong truth - if for no other reason that there are some very heavy assumptions in the standard documentation that the user is well versed in Unix, shell and C libraries. "perldoc -f printf" and "perldoc -f sprintf" are _not_ what I'd expect first-programming-language learners to have to work with. Unfortunately, the usual refrains of "patches welcome" are unlikely to solve this problem, because as a 2nd or 3rd (or 17th) language, it's precisely the documentation I want.
- danieldk 16y agoThat's a caricature of my comment (given the smiley this is probably intentional). The primary motivation was educational fitness, the second consistency within the education program, the third popularity. Of course, not popularity according to the TIOBE index, but to what typical employers require. Of course, in the market C# and Java are more popular, but popularity is just one factor.
- edenc 16y agoIf you use the TIOBE index as a measurement for language popularity you shouldn't be controlling a curriculum related to information technology because it indicates you don't have high-school level knowledge of statistics. TIOBE is based on "searches for a given language", there are all sorts of factors that can skew the outcome pretty badly. See http://www.tiobe.com/index.php/content/paperinfo/tpci/tpci_definition.htm http://www.tiobe.com/index.php/content/paperinfo/tpci/tpci_d....
- rquirk 16y agohttp://www.google.com/trends?q=perl http://www.google.com/trends?q=perl The downwards trend seems to be flattening off, maybe "it's losing popularity at a slower rate" would have been more accurate? Seems pretty cruel teaching undergrads Perl when they could learn Python.
- dionidium 16y agoInteresting that Ruby and Python have been flat for a while. http://www.google.com/trends?q=perl,+python,+ruby&ctab=0&geo=all&date=all&sort=0 http://www.google.com/trends?q=perl,+python,+ruby&ctab=0... I wouldn't have guessed they'd each surpassed Perl around 2007. Edit: Also, despite a steady decline, watch Java dwarf them all: http://www.google.com/trends?q=perl,+python,+ruby,+java&ctab=0&geo=all&date=all&sort=0 http://www.google.com/trends?q=perl,+python,+ruby,+java&...
- TorKlingberg 16y agoThose numbers are inflated a bit by people searching about snakes, gemstones, coffee and Indonesia. Try adding "programming" to each term: http://www.google.com/trends?q=perl+programming%2C+python+programming%2C+ruby+programming http://www.google.com/trends?q=perl+programming%2C+python+pr...
- TorKlingberg 16y agoMost programming topics are going downwards on Google Trends. Probably because more non-programmers are getting online, while all programmers are already using the internet. The exceptions are very new and hot programming topics.
- bellaire 16y agoThis was done as a free summer course. Language bigotry aside, offering a course to learn another language outside those taught in the standard curriciulum, especially one which costs students nothing, is a win for everyone.
- wyuenho 16y ago
- tene 16y agoLOL PERL USES FUNNY LETTERS!
- ojosilva 16y agoI rather learn what $_ means in Perl, just like I know what % means in math or @@ in Ruby, than have to close blocks with things like '))))))))))))))))))' in Lisp languages. The beauty is in the eye of the beholder. Metrics? How about job trends? http://www.indeed.com/jobtrends?q=perl&l= http://www.indeed.com/jobtrends?q=perl&l= Facts? How about blekko.com and duckduckgo.com, two search engines written in Perl?
- wyuenho 16y agoIt's not about beauty, it's about the ramp-up speed. When Perl was invented, it was really easy to get up to speed if you were already coding a lot in `sh` and `awk` and `make`. You sort of already know the meanings of the punctuations. These days, the most widely recognized punctuations students and other new programmer know are math symbols, so learning a new language that reuse these are far easier than learning Perl. After all, it's far easier to learn and remember French grammar and spellings if you are an English speaker, than to learn Chinese. For this reason alone, I stay clear from languages with a lot of punctuation symbol abuse, i.e. Ruby, Perl, Scala. Don't get me wrong I don't dismiss the continuing importance of Perl, that's why I was very careful in my wording (minus a spelling mistake). I don't think there's even 1 metric we can agree on when measuring language popularity (Python is ranked 4th on TIOBE and 6th on StackOverflow and there's exactly 0 job posting for it in Hong Kong), so never-mind 1 that tells me definitively that Perl is coming back. After all, for it to come back, it must have gone away before. Ever thought of why? Even if it is coming back, what's the significance? We've had other viable choices for a very long time now. Python, PHP are all doing a very good job that Perl was traditionally good at. Hell, I'd even throw in Ruby as another viable choice too. Arguing success stories is kind of pointless too, theoretically I can write anything in any Turing-Complete language, so for all I care I could have written Blekko and DuckDuckGo in assembly.
- edenc 16y agoWhat the hell are you talking about? The only "weird" symbols you need for writing day-to-day perl code are the sigils. The only punctuation you need to use are things that are already well-established in basic math and other very traditional programming languages: commas (list building), exclamation marks (negation), question marks (branching), colons and semicolons (statement ending).
- rjbond3rd 16y agoThe author is (evidently) referring to something well-known to those inside the Perl community which some call the Perl renaissance, a.k.a. the Modern Perl movement, a.k.a. the Perl enlightenment. There are meta-modules which allow you to pull in all the goodies with a single line of code, e.g. "use Modern::Perl;" or "use Task::Kensho;" At that point, you are effectively coding in a "modern" dialect of Perl and it's a definite break from the past. If you are not already interested in Perl, it's arguably not enough to persuade you, but I find it really exciting.
- wyuenho 16y agoIMO, I think Perl has had its time. It's time to move on. It was invented by Larry Wall to sort of have a unified language that minimizes retraining for a `sh` and `awk` programmer, that's why it keeps so many weird punctuations. These days, the thing that Perl is really good at - regular expression - is found in virtually every language that comes after it. It's had accomplished its historical mission, people have learned a great deal from it. There was a time when there was nothing but Perl could solve effectively. That was in the 90s. We've had Moderm Perl dialects for a very long time now, they are called PHP, Ruby, and arguably, Python.
- jerf 16y agoYour post is implicitly based on the premise that languages have some sort of ordained-by-Nature sunset process and that Perl's continued insistence on living is some sort of affront against the Natural Order. That's an awfully large premise to slip into a post without justifying it; one could plausibly claim it to be outright begging the question. If a language continues to evolve and clean itself up (and not merely grow without bound), who's to say it can't live for a very long time?
- wyuenho 16y agoI didn't say it can't live for a very long time, that's why I said I believe it will still be around in my first post. I just don't care much of it anymore now that I have alternatives.
- edenc 16y agoHow about this: http://www.alexa.com/siteinfo/cpan.org+rubygems.org+python-eggs.org http://www.alexa.com/siteinfo/cpan.org+rubygems.org+python-e... CPAN's popularity vs other language module distribution systems could probably explain why perl is a lot less searched for: most of the typical programming problems have already been solved, tested and smoked in perl. Writing perl these days boils down to integrating things from CPAN, and you don't need the funky characters to do that.
- ekiru 16y ago$_@qw()<>$@{}*&lc()~>>>$.$/$<$: Which happens to appear to not be valid Perl code. $ perl -e '$_@qw()<>$@{}*&lc()~>>>$.$/$<$:' Array found where operator expected at -e line 1, at end of line (Missing operator before ?) Scalar found where operator expected at -e line 1, near "$.$/" (Missing operator before $/?) Scalar found where operator expected at -e line 1, near "$/$<" (Missing operator before $<?) Scalar found where operator expected at -e line 1, near "$<$:" (Missing operator before $:?) syntax error at -e line 1, near "$_@qw" Execution of -e aborted due to compilation errors.
- jmah 16y agoBtw slides aren't in English (and download is disabled, what's up with that?).
- buckwild 16y agoI hope he makes the students code. Teaching any student anything without the student understanding the need for it is probably not a good idea. Thinking back to my undergraduate mindset, I am sure I wouldn't care about what is being said at lecture unless it was practically applicable to something I was currently working on. Just my two-bits.