2009
09.27

Please leave any comments here http://infinityinyourhands.net

There are a lot of programming languages floating around.  Off the top of my head I can think of C, C++, C#, Visual Basic, Java, SML, Scheme, Lisp, PHP, Ruby, Pearl, Python, Haskell, Erlang, Javascript, Various Assembly languages, Cyclone, etc. That’s just the short subset that I happen to remember when writing this down.  There are way more languages on this list than I’ll ever manage to learn even passably well.

What I’d really like is a good set of programming sample problems to use to give hot-new-language-du-jour a run down and see if I should invest anymore time.  I feel like an upper limit on the total test should be about 12-24 hours (i.e. 2-3 Saturdays of part time work.)  The problems should ideally be a known problem (or an easily learned one) so that the implementation time and ease can be measured.  I’d like the list to be relatively general even if it means some problems can’t be solved in a particular language.  Ideally these would be problems that a reasonably skilled programmer could code in 30 minutes or less in his or her most familiar language.

An example problem set I’m conjuring out of thin air:

  • Read a “Hello World” message from a file and print it out (basics, file i/o)
  • Implement quicksort or mergesort  (functional style, recursion, iteration concepts)
  • Binary tree, add, delete, insert, and traverse
  • Consume a web service (REST, etc)
  • write and read from a database
  • Wire up a simple graphical UI
  • Create a math library (encapsulation, namespacing, built in libraries)
  • A test suit for one or more of the above projects (Reflection, etc)

It isn’t a complete list, and every language probably can’t easily handle even my short list.  What I’m interested in is coming up with a nice concise one, and any suggested problems people might have.  I think with a bit of revision I could develop a fairly good little test suite to figure out which languages are worth my time and investment to learn.   Some of the problems above could definitely get lumped into one bigger problem too.  Maybe something like “Use the flickr API to code a desktop application which pulls down all the photos in a selected photoset and write the data out into a mySQL database for local caching”

Anyone have any favorite programming problems they “goto” immediately when taking a new language out for a spin?

6 comments so far

Add Your Comment
  1. How about some favorite problems from Project Euler? Might test your newly written math library, or at least some of the built in functions.

    By the way, I had to attempt to post this several times. Apparently I can’t pass a reCAPTCHA.

  2. I’ll bite. If you accept that different languages have different strengths and weaknesses, than it may not make sense to evaluate them using a common problem set. Good luck performing your Hello World I/O test in R, and good luck performing advanced statistical analysis in Java that’s a breeze to do in R. If you’re searching for a common problem set, then implicitly you’re asking “should I use language x or language y?” when it’s probably more fruitful to ask “what are the problems that I can tackle with x that I would never tackle with y?” Facebook has had an interesting approach to this – essentially allowing their dev teams to code in whatever language is suitable to the task at hand. Need a massively parallel, event driven application? Use Erlang. Need super-fast, close-to-the-metal caching? C++. Web page rendering? PHP. They’ve made all these languages (and many more) play nice together with Thrift (http://incubator.apache.org/thrift/) which provides common data structures for services in all these languages to speak to one another. It let’s them use the right language for the right problem.

  3. Chris,

    I think your point is well taken. That said, I don’t know that I agree entirely. Of course, I’d do some rough background research when picking a language and not go totally against the intended usage. That said, I think once research has narrowed down the total realm of choices to apply to a particular problem, it’s worth running through a standard set of problems to get a feel for how difficult other tasks are in the technologies one is assessing. Especially for individual projects it’s picking up another language or framework definitely adds a pretty significant overhead, so to me it makes sense to evaluate a particular technology in multiple domains first. At least then, later, if I need to apply them to a non-intended problem, I’ll know if I should fight through the awkwardness to get the job done, or bite the bullet and use a different platform.

  4. Hello! addkcaa interesting addkcaa site! I’m really like it! Very, very addkcaa good!

  5. Hello!
    , , , ,

  6. Hello!
    , , , , ,