Ryan's Blog : Weblog

Ryan's Blog

Thursday Oct 04, 2007

Learn a New Language

In the Pragmatic Programmer, Andy and Dave suggest learning a new programming language every year.  I definitely agree with this!  I
think that it is very important for developers not to be stuck with just one language and another way to keep current.  Specifically it is
important to learn languages that are different than the one you're currently programming in.  There is still benefit to learning similar
languages, like C++ if your a Java developer.  But I think that there is more to be gained by learning languages completely different from
what you're currently using.

It's the little things

   There are little things that make languages different that helps you to appreciate it.  Working in the land of Java gets us stuck in
   a curly brace and semi-colon mindset.  Is there another way?  Of course!  Ruby uses the newline as the end of a statement (or you
   can use a semi-colon if you want), Squeak uses a period (yes just like your English sentences), OCaml uses nothing or a single or
   double semicolon, depending on the context and the list goes on.  What about when you want to test out something small in your
   language?  Like, for example, what's faster for a given situation, a Linked List or an Array List?  In Java, I write a new class with
   a main method, compile it and then run it.  Some languages have a nice runtime read-eval-print-loop (REPL) program that allows you to
   enter your code in a continually evaluated loop.  It's like a minimal programming environment.  I just pull up irb in Ruby, type
   in my code and hit enter.  It interprets it and spits out the result.  In Squeak, that REPL environment is integrated into
   everything in the IDE, so all you have to do is highlight code anywhere in the environment and right-click, then click to run it.
   Is it a killer feature of the language?  Maybe not, but it's one of those little things that is nice to have.

It's the big things

   When you learn a different language, if you've chosen a very different one, there are conceptual differences that could help
   change the way you think.  An example from C++ to Java is garbage collection.  From Java to Ruby or Smalltalk it's the lack of
   typing.  From Java to ML it's the type inference.  These things are very significant when switching a language.  These things can
   change the way that you think.  Who knows, maybe even the cool killer feature of that language will be put into the language
   you're working in down the road (closures, generics, dynamic language support etc).  Other things outside of the syntax of the
   language is how it is developed.  Eclipse is nice, but Squeak has some really advanced IDE tools that are integrated into the
   language.  With Perl you need to dust off the text editor.


Learning a new language doesn't always have immediate practical value.  In fact, many of the "mainstream" languages are pretty similar.  For
example C, C++, Java and C# all have similar syntax.  Sure, Java has reflection, C++ has templates, there are benefits to learning similar
language, but there are more benefits to learning ones with very significant differences.  Ruby has become more popular lately and is
different from the C based language to make it worth-while.  There are two reasons to learn a new language, one is for a very tangible result
like: Java is very popular right now and I need a job, therefore I'm going to learn Java.  The other is to improve your skills as a
developer, just like you would read a book like The Pragmatic Programmer or Mythical Man Month or a patterns book.  None of those
will get you a job, but they will help improve your skills in writing and supporting code, which will get you a job.
   
 

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed

Calendar

Feeds

Search

Links

Navigation