Linked by Thom Holwerda on Wed 11th Apr 2007 16:35 UTC, submitted by ShlomiFish
General Development "What makes programming languages are suitable or unsuitable as introductory languages? Which languages are better learnt first and at which order? And why what the masses think is the most suitable introductory programming language is not in fact that. This paper examines several approaches to which programming language is the best, and afterwards gives several useful relations for which languages should come first. Finally it gives a final verdict, defends it and then gives some other good food for thought."
Permalink for comment 229739
To read all comments associated with this story, please click here.
Ugh, Perl again
by alexandru_lz on Wed 11th Apr 2007 21:51 UTC
alexandru_lz
Member since:
2007-02-11

A lot of those who have written more than 100 lines of code already *know* why we love Perl. Sure, many features, easy string processing, more than one way to do it, but just as JoeBuck put it, teaching it to someone who has never programmed before is a pain, and I've burnt myself with that.

First of all, because reading Perl code written by someone else is very difficult for someone who is not used to reading code in general. Heck, it's a pain in the neck to read your *own* Perl code. When I learned programming (I learned Pascal, if it has any relevance... and quickly forgot it, too), I would often look over code written by other people, like we all did in fact, and it was an useful experience. Having difficulties in understanding how the program works is more than enough an obstacle for a beginner. Spending several minutes to understand the way the program works is enough -- I wouldn't like Bob Beginner to spend even more time to understand what Perl would get from that gibberish.

Giving grades is also very difficult with Perl, and that's exactly because there are several ways to do it. I found myself in the nasty sittuation where one way of solving a problem was perfectly valid, as in, it worked well and with good performance. It was simply not too elegant (a little bit of "extra" Perl knowledge would have made it more "slim", if you want). What could you do in such a case? It's very difficult to explain a student that, well, his assignment was perfectly solved, but there is some funky feature of Perl which could have made it "look" better. Someone who has done serious programming already knows why good style is important -- but how can you teach writing clear code in something like Perl?

The other problem I've found with teaching Perl was what people were doing after they learned Perl. Sure, sure, it's a nice programming language. Now have a student whose first programming language was Perl trying to learn C (and don't give me the 'C is dead' thing now, please :-D), and use that horrible, mind-blowing, retarded set of string functions.

Just like with any other type of language, the first programming language and the habits you learn are very important, as you'll have a hard time getting rid of them if you need to. I had a great deal of problems myself trying to abstain from using some idiosincracies of Pascal.

Quite frankly, I'd go for using Basic or Ruby as an instructional language. Even more for Basic. Sure, it doesn't sell, but the aim of an introductory programming class should be to give an inside of what programming is, why it is important, to teach basic algorithms and to explain the approach you take when trying to solve a problem, not to get you a job. You can do all of these in Basic.

Don't get me wrong: Basic should be abandoned as soon as one understands what binary search is. And, Perl is a wonderful programming language, just not an instructor's (and probably not even a student's) dream.

Reply Score: 1