26 Sep 2012 shlomif   » (Master)

The Ultimate Irrational Homework Assignment

As someone who has been chatting on programming-related IRC (Internet Relay Chat) for a while, I have witnessed my share of people coming up with unreasonable needs due to homework. However, some days ago, someone on Freenode's #perl came and ask for help in parsing a semicolon that does not occur inside shell quotes (e.g: echo "Semicolon in string - ; foobar" ; ls -l ; ) using regular expressions. I suggested him to use a parser generator, and then said that his teacher has forbidden him from using it or any other external CPAN module and that he could only use regular expressions, in order to, get this: write some Perl code that will convert Bash to Python. Yes! His teacher expects them to learn those three languages at once. And apparently without making a judicious use of the proper APIs.

Teaching three languages at the same time (in what may be a introductory course) is wrong and should be avoided, as learning one language is hard enough, and with three the students may become extremely confused. In response to my Thoughts about the Best Introductory [Programming] Language, a friend suggested that one should teach three introductory languages, and if I were remember correctly, they were something like C, a convenient dynamic language such as Perl or Python, and a very "mind expanding" language like Lisp or Haskell. I noted the same thing back then, that it would confuse the heck out of the students, and here the motivation is even more flimsy.

I wonder if we ever top this homework assignment that we are being asked for help with. Will a professor ask his students to implement a Strong AI in a weekend?

Syndicated 2012-09-17 16:05:08 from shlomif

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!