?

Log in

No account? Create an account
teacher-mode

Call for geek help: scripting languages

I'm teaching a Survey of Programming Languages course in the fall. The goals of the course are to teach students how to learn a language, and to introduce students to ideas and techniques they didn't see in their first-year Java courses; if they happen to learn a language that gets them a job, that's a bonus. They're familiar with (if not necessarily good at) class-based OOP and imperative programming; they haven't seen higher-order functions, closures, continuations, comprehensions, macros, or declarative programming in general. Most of them haven't seen any kind of parallel or multithreaded programming, nor network programming.

Traditionally, this course has been about 50% C++, 25% Scheme, and 25% Prolog, but the C++ content has been moved to another course. After polling the preregistered students by e-mail, I've decided to fill the gap with some reasonably-modern scripting language. Leading candidates so far are PHP, Python, Ruby, Lua, Erlang, and Scala.

I can make an unbiased choice among these because I don't really know any of them (although I've written some PHP-based server-side web scripts). So I'll be learning them just ahead of the students :-)

Any advice?

Comments

This course will only spend maybe a month on each language, so I don't expect them to walk out with a professional/employable level of fluency in any one of the languages.

I tell them at the beginning of the course "If your [prospective or current] employer asks whether you know Language X, the correct answer is 'No, but I will next week.'" This course is intended to give them practice learning new languages and putting them into the context of the world of programming languages, as well as to expand their minds with programming techniques that you couldn't already do in 1965 Fortran :-)

I've written some perl-based Web server scripts too, and always felt as though it was purely trial and error: I never developed a mental model that enabled me to predict what the language would do with any given string of source code. Which means either the language is too complex, or I'm too stupid. In either case, I didn't want to do perl.

And JCL is right out :-) (Yes, I studied JCL the spring of my freshman year, retching all the while....)
I've written some perl-based Web server scripts too, and always felt as though it was purely trial and error: I never developed a mental model that enabled me to predict what the language would do with any given string of source code.

You mean... it's not just me? :}
I might, also, look at something like BASH - for a week or so. The notional idea of a glue language, and some discussion of how pipes and files are both more powerful than one might think AND also somewhat too primitive, might be useful.

Almost all the students in the course will be concurrently taking a Unix course that covers shell scripting (and C++, among other things).
Perl is installed most everywhere by default, so it's never a bad choice (and is my choice of language for sysadmin tasks, day in and day out).

That being said, I'd say Python over PHP. PHP is popular, but it's also derided among the 'more serious' languages (though I don't know whether that's more because it's what all of the HTML coders learned when they needed to beef up their resumes and skillsets).

Knowing Python or Perl these days will do well where C++/Java is a bit 'heavy' or the like for certain tasks. Few places will choose to allow PHP to be installed for system-level tasks when Perl or Python are already installed and much more suited for the role. PHP is reasonable for web-oriented things...but if that's not the focus your students might be looking at, there are better choices ;)
(So my choices would be Perl > Python > Ruby > Lua > PHP...Ruby has some nice things going on and Lua...well, it's not PHP) ;)