Tuesday, November 17, 2009

Teaching an Old Dog New Tricks

Back in grad school (in the nineties, wow!) I remember my first exposure to the revelation of Java. To a C/C++ programmer it was a godsend, promising a pointer-free, garbage collected future where everything (almost) is an object, and fantastic virtual machine code would live everywhere (client and server!!!). Write once, run anywhere, the sky was the limit.

Well, more than a decade has passed now. I've had some great times with my old Object-Oriented pal, and he's been good to me. I've made a good living, enjoyed my trade, and worked with some great people along the way.

Admittedly, I can't say that I have fully mastered Java, I can say that after building scores of Applets, Servlets, Struts and Spring apps, Concurrent Systems, I have grown weary of its charms and annoyed with its foibles.

I feel like I've overstayed my welcome in the J2EE world. It's comfy and familiar, but not satisfying. Its time to shake things up, time to go back to school so to speak.

The good news is, I am not weary of programming in the least. In fact, the prospect of learning the new and emerging languages and styles now in vogue, is exciting and invigorating.

But I am feeling quite behind the times! I have decided that the only way to rid myself of this uneasy feeling of being a "Legacy Programmer"... is to dive in and see if I can still swim.

Now to the problem of what to tackle first.

I am feeling pretty hemmed in by Java's OO/Imperative constraints, and was surprised to find myself really enjoying programming in JavaScript on some recent AJAX projects.

Nowadays, in places I would have happily applied one of the trusty GoF patterns before, code was screaming for first-class functions and closures.

I feel the best thing for me to do to get the flavor of the new-style and lose my old way of thinking, is to learn a multi-paradigm language.

There are many choices, each with their merits, applications, and loyal followings.

I have narrowed it down to three: Ruby, Python, and Scala, but I am having trouble choosing from there.

Ruby is easy to use, learn, and pretty popular out there. Rails apps are everywhere, and from what I have seen so far, I like it a lot.

Python is very widely used, powerful, expressive, and pretty much in a dead heat with Ruby on all fronts.

Both languages have a great MVC framework, and both are commercially viable.

However, in my current job, it is unlikely I will be able to apply either to the real world problems I face, which is ultimately where you learn the most.

Scala on the other hand, compiles to Java bytecode, uses the familiar Java syntax, its even runs integrated with existing Java code.

I think I want to learn all three, and against my better judgment, am going to attempt to learn them concurrently.

I have a decent Ruby book, so I am going to give that a try first.

No comments:

Post a Comment