Tuesday, March 25, 2008

The Language Question

My first job was working with Cold Fusion for a year. For the next two years I worked primarily with Javascript and a proprietary language. Next was a brief stretch with PHP and ASP, followed by about 3 years of .net. Finally, for the past 2 years I've been doing Ruby. I do not consider myself a Ruby developer. I prefer to just be a developer.

I don't expect that Ruby will be the last language I ever work with. In fact, I expect I'll probably be doing something new in the near future. The question is what language should I work with next? Should I go for a classic like Lisp or Smalltalk? Should I give Scala or Erlang a shot and ride the concurrency wave?

The problem is, I'm asking the wrong question. Rarely when discussing languages do the languages themselves dominate the conversation. I can't remember ever being in a conversation where someone won a language debate with things like closures, metaprogramming or static typing. Instead, the primary focus of language debates are usually around frameworks, performance, IDE support, developer availability, what OS does it run on, and any number of other factors that are only related to the language.

The question extends even beyond factors related to the language.
At Google I’ll work with C++ rather than (for example) Ruby but I do get to be part of changing the world. -- Jon Tirsen
Jon gave up a job using his language of choice to work with another language he likes far less, but for a cause he's very interested in. I have another friend who recently starting working with an investment company because he was interested in the domain.

Two years ago I started looking at Ruby because several of my colleagues were giving it a look. I preferred Rake to NAnt, and starting using it on my .net projects. Before long, someone asked me to be part of a Ruby project, because of my limited exposure to Rake.

I got introduced to Ruby by coworkers who were interested. I got involved with Ruby because I prefer build files that do not require XML programming. I stuck with Ruby because we had a steady stream of Ruby projects that needed experienced developers, I got plenty of blog content, I liked the composition of the Ruby teams I got to work with, and I liked working with clients who are comfortable with early adoption.

Notice, none of the reasons I use Ruby have anything to do with the Ruby language itself.

I'm interested in doing something new because I feel like I've been doing the same thing for about a year now. I'm also interested in traveling to other ThoughtWorks offices and getting some fresh ideas for innovation.

Again, none of my desires have anything to do with language.

I'm not giving you the tired "no silver bullet" or the hand waving "the right tool for the right job". I'm asserting that people use those phrases to justify their language choice, but you'd be better off asking what the real motivations for choosing a language are. What other factors does the language introduce that make it their choice.

It's also helpful to have this understanding when considering criticizing someone's language choice. My friends aren't using Java because they like Java, they are using it because they like IntelliJ, high performance on a few boxes, simple deployment, Hibernate, String Template, Spring, and a hundred other factors. Therefore, criticizing Java as a language doesn't really do anyone any good. Even if I convinced them that Lisp is a better language than Java, I still wouldn't have convinced them to use Lisp on their next project.

4 comments:

  1. Personally, I'd much rather be programming in Ruby than in just about any other language, but, like you, the environment I work in (as in paid work) is a C++-centric one. In fact, most of the people I work with have never even heard of Ruby (or Erlang or Haskell or OCaml, either). But the domain is interesting - it's not web programming, it's software for designing chips. Actually, Ruby would be too slow (performance-wise) for what we're doing, but OCaml or Haskell could be very good fits for our domain... but there's way too much institutional inertia at this point to expect such a move, so for now I code primarily in C++ for work and I code in Ruby & OCaml at home for fun.

    ReplyDelete
  2. When you get to choose your own tools to solve the problems you're presented with, you choose them based on personal experience, curiosity, reputation of the tool, platform, support, etc. etc.

    For some, having a small and adaptive toolbox, like Ruby currently offers, is a wise choice. For others, big enterprisey toolboxes are a better choice.

    Luckily, I can choose what to put in the toolbox myself.

    I choose my tools based on how much I enjoy working with them, how they help me solve problems, how much effort it takes to continually produce quality results. I disregard tools in the toolbox, that makes me angry, are difficult to bend to my liking, or have too much bagage.

    The language is only one of many concerns when filling up your toolbox ... and for me rarely the primary one. I like C# and Java, don't really care for PHP, don't trust myself with C++. The first two has far too much bagage for my tastes, PHP is just not comfortable for me, and C++ gives me far too many options for making errors.

    Ruby and Javascript are genious IMHO, as they're "simple" languages, and yet very flexible. But, I am sure that I'll also end up trying out other languages before retiring ;-)

    ReplyDelete
  3. "someone asked me to be part of a Ruby project"

    Hey bro, I'm more than just "someone" and don't you forget it! ;-)

    Great post... I fully agree with everything you said.

    ReplyDelete
  4. Anonymous8:22 AM

    Of course you are. Obie Fernandez was the "someone" who invited me to join my first Ruby project.

    Cheers, Jay

    ReplyDelete

Note: Only a member of this blog may post a comment.