Friday, May 14, 2010

A project with programming exercises for learning a new language

My version of twiddling my thumbs or biting my nails is repeatedly clicking on the Stumble! button and giving websites a "thumbs up" or "thumbs down".

While I was doing that I stumbled upon this article called 15 Exercises for Learning a new Programming Language by Prashant N Mhatre.

I've  been interested in comparative programming languages for quite some time, and this list of exercises seems to cover the basic practical features of a language (text manipulation, date and time functions, file handling, math,  assignment, sorting, conditionals and loops, etc).

Consequently I've decided to use the list to do a series of  exercises.  I'm going to do the exercises at two week intervals using the following languages, one language per fortnight, and post the results (or a link to the results) here.

The languages are php, java, common lisp, forth, haskell, ruby, c++, perl, some sort of assembly code (probably x86), python, and ksh or bash.  This list is arbitrary, and if the exercise continues to be fun I'll add more when I've finished this list.  Some of the languages I've worked with a good bit (particularly perl and ksh), some I've done moderately heavy work with in the past, but not recently (php, assembly code), some I've dabbled in (forth, common lisp, ruby).  I've had nearly no hands on experience with java, c++, python, and haskell.

I intend to do the exercises in the most idiomatic form of the language which I can absorb in over a two week period (in other words I'll try to write lisp as a lisp programmer would).

I invite reader input, suggestions, criticisms, even ridicule if you'd like (as long as you tell me why my code is ridiculous).  I'll post my results on alternate  Fridays starting on May 28th, 2010.

I'll include a description of what implementation of the language I used, and my impressions of the language and its idioms.

No comments:

Post a Comment