Monday, December 6, 2010

How To Choose Programming Languages For Team Projects

The programming language(s) your software team chooses to use is a key factor in whether your company succeeds or fails. Your best bet is to pick a commonly used language with wide adoption and positive momentum; if you do this it'll be easier to hire experienced people and recruit newbies worth training. If you pick an esoteric language no one knows or an older language that is trending downward, you are digging your software project's grave.

It's The Jobs, Stupid

People are more willing to work for you if they think their skills will be transferable to other jobs. The more jobs there are for a programming language, the more likely your people can find other work after leaving your company. Everyone leaves eventually, so at least make it easier for them to join. Check out the number of jobs available on job aggregator as of December 6, 2010*:
  • Java - 105,322

  • C# - 48,792

  • PHP - 23,351

  • Ruby - 11,853

  • Scala - 374

  • Haskell - 200

  • * click on the links above to see how the numbers have changed since I wrote this blog post.

Live Near The Fire Station

Something is going to happen that causes a big problem that your team won't be able to fix. Maybe you're only software developer will be on vacation, or maybe no one on your team knows how to debug the problem that made your entire site crash. In a pinch, you need to call for backup. When the backup arrives to put out the fire, you want a fire fighter capable of putting out a 5 alarm fire. Here's number of people listing various programming languages as a skill on LinkedIn as of December 6, 2010:

It's A Popularity Contest

People are more likely to work for you if you are working with tools they use anyway. A savvy leader merely jumps in front of a crowd going in a certain direction and yells, "follow me!"

What are people learning in their free time? Let's look at sales rank (lower is number = more popular) of the most popular O'Reilly book for each programming language on

What kind of projects are people working on in their spare time? Let's look at GitHub's cool language section to see what's popular:

Beyond The Numbers

Using the numbers above, I think you can make a compelling argument for building a team that uses PHP, C#, Java, or Ruby. Scala and Haskell lose in my opinion. It's hard enough to build a good software team, so you may at least try to recruit for languages that give you a fighting chance. If you want to be a software hipster and use Scala because no one else does, here is what will likely happen:
  • You'll have to train everyone in Scala from scratch, which takes time and money.

  • You're most talented Scala developers will be recruited away by companies with unlimited recruiting budgets like Foursquare or Yammer.

  • You'll have to train yet more people in Scala from scratch, which takes time and money.

  • If you are lucky enough to get big that your software systems get complex, it will be impossible to recruit experienced Scala developers, and the one person you do find you won't be able to afford.

  • You will run out of money and your company will die.

I'm Just A Recruiter With An Opinion

This back-of-the-napkin analysis is merely meant to get you thinking about the ramifications of choosing a language, because that choice affects your ability to build a team. If you don't put at least a little thought into what could happen if you pick a certain programming language, you're likely to regret that lack of planning later.

Hehe, posted this article on Hacker News and got a lot of comments disagreeing with my thoughts on this topic. Instead of arguing with anyone reading this, I'll just pose a few follow up questions:
  • Would you rather work with Python or Visual Basic? If the first programmer chose Visual Basic, would that affect your decision to join a project as the #2 coder solving a worthwhile problem?

  • Would you rather take a programming job paying $X/year on a project you love or a $X+30K/year on a project you merely like? Would you spouse's opinion matter?

  • Do you think most great programmers would be interested in working with a 10 year old code base to fix bugs and add features? If the answer is no, how do you solve that problem?

  • Sometimes you don't have a choice what language is used.
  • If you ever needed to outsource software development for an existing project, could you find a decent vendor to work on your Scala code base?

  • If you had to rely on a recruiter, could your recruiter find you engineers for a language that wasn't mainstream?
I most certainly don't have all the answers. I can tell you that I've worked with many businesses that trying to cope with forces that come into play as a project grows, becomes more complex, and needs arise that are time sensitive. A friend of mine said that best defense against lock-in was to build modular code and make heavy use of APIs; maybe this is the best approach.


  1. You're = You are != Your

  2. AFAIK Scala-based projects have not caused any company to run out of money and die.

    If you want to be a software hipster and use Scala just because no one else does, as the bad software architect you are you're also able to fail with PHP.

    Your most talented developpers are always likely to be recruited away. Isn't it your job to keep them motivated and loyal? Evoluting from Java to Scala doesn't cost that much and may truly boost your team.

  3. Sorry but this is total BS.

    If you listen this kind of advise you'll be program Java when people takes vacations in a beach in Mars in their private warp drive capable sport spaceships.

    Do your thing in whatever that makes your people to kick ass and you'll be just fine.

  4. Hey @Anonymous, please beat @Martin for using "Evoluting". And then beat him again because he probably uses Scala.

  5. While I understand what you are trying to point out, basing your choice of language primarily on popularity is one of the worst things you can do.

    The choice should primarily be driven by the technical strengths and weaknesses of the languages vs. the system or application that needs to be developed. If you are writing device drivers, or an operating system, then picking any of these mentioned languages would surely be a big mistake ;-)

    Likewise, if you are writing a Windows desktop application that needs to look and behave as native as possible with native levels of performance, then picking Java, Scala, Haskell or PHP would also be a big mistake.

  6. what about python or lisp/scheme/clojure?

  7. Training a smart programmer takes two weeks. You don't need to be an expert in a programming language to start working with it. I actually learned all the languages I know by working on companies, they didn't even gave me a training.

  8. @Martin
    Nobody actually ever built anything in Scala

  9. You're assuming time invariance. You have to consider current AND future trends in languages. Your stats are a snapshot of the current state, but say nothing about the future state. There isn't even a first derivative in your figures.

    Secondly, as a recruiter, you are biased towards your experience with companies that use recruiters. Not everyone uses recruiters, especially small or startup companies.

  10. However a less well known lanuage but with a talented and strong community such as Haskell and Clojure (and at a guess Scala), have a large hoared of the programmers you want to work with, eager for the chance to use there hobby language for work.

    The good members in the community are likely to also have public information availble (blog, mailling list archive, open source code), which I would imagine to be a much better metric then anything you could find out in an interview. (Thou I have never hired anyone, it seems logical)

  11. You could replace Scala with Java and your blog post would have been perfect for 1997.

    You could replace Scala with Ruby and your post would have been perfect in 2006.

  12. I thought Twitter's backend was build on the JVM on Scala?

    And I pity the poor sod who bases the programming language choice solely upon its popularity. I would like to see a person attempt to code a device driver using Java/C#.

  13. This logic is total shit, and it really only makes sense for a recruiter who is looking at software developers as if they are cogs in a machine. First, quality is a major factor. Sure, there are gazillions if PHP developers on earth, but that doesn't mean they are all capable of performing any programming task. In fact, I think most of them are limited to basic web apps. This logic is like saying you should only make pasta at your restaurant because you can always find someone to who knows how to make spaghetti. Never mind the fact that there might be far better foods out there, and that crappy spaghetti is going to make the restaurant fail so it still requires a top notch cook.

    The best programmers are attracted to teams with a similar yearning for knowledge, and they will want to push the envelope with new languages and new techniques. If you want to crank out crappy software for cheap and you need to refill the seats after people come down with RSI than sure, go for PHP or Java.

    Leave the hiring of software developers to people who actually do development.

  14. It's funny a large percentage of the positions you've filled in 2010 were Ruby positions.

  15. Following your link I searched for C++ jobs and found more than 30,000
    So more C++ jobs than PHP, and then there's C, Objective-C

  16. I'm just wondering why Python is not listed in your post?

    Python is more popular then Ruby, just look around the or any other site (or google it).

    You probably need to repost it!

  17. Should be "... if they think their skills ...", not "they're skills"

  18. I'd hire someone who knows Haskell or Scala, even if we're using C, because it indicates that they're smart and passionate about their tools.

  19. According to the author's logic, no one should have ever been hired to write C, Java, or any other new language.

    The author does not understand how each new generation of tools attempts to advance the art of software construction as part of its thesis.

    The author can only see the box, but not the ecosystem within it. In this regard, he is a simpleton, who perceives his value is greater than it is because he gets to meet with managers and sling his worthless opinion upon them.

  20. And don't forget the fact that on average if you test 10 people who claim to be PHP programmers, you will get only 1 who's really good but if you test 10 people who claim to know Scala, at least 5-6 of them will be good.

    So seeking among 500 Scala applicants is prior to seeking among 10,000 PHP applicants for me (regardless of the current setup). Plus, Scala community has a culture which I like very much personally.

  21. Heroku uses Ruby and was acquired for $200M recently.

    Ruby isn't as popular as Java, but I saw this press release today that "Ruby is the language of Cloud 2". I'm so confused. Which language should I choose again?

  22. It's $212 Million. Heroku is one of Captain Recruiters clients! Congrats Heroku!!

  23. If you want warm bodies to fill in seats then this article is perfect advice! Thank you Captain Recruiter for spelling out exactly how not to choose a language or any other piece of your technological infrastructure.

  24. It's clear to me that you have business sense. However, there are other factors which you aren't taking into account. The ire you've raised amongst my brethren should indicate that you have missed a few points:

    Firstly, the language choice has less to do with programmer adaptability than you'd think. Good programmers pick up languages pretty easily. The skills that are hard to translate have to do with domain knowledge. When I took my current job, I had never used Java professionally. Getting up to speed in the language took about two weeks. It took months to acquire the domain knowledge to be a productive programmer, and that time would have to be spent on any hire outside of astronomy. Optimizing for the two weeks over the several months is a mistake. Also, much like natural language acquisition, I was learning the domain while learning the language.

    Secondly, you misunderstand the programmer's relationship with industry standards. For passionate programmers who entered this field out of a desire to program things they are interested in or use technologies they love, standard choices such as Java are usually not what is loved. Programmers that choose to specialize in industry standard choices often don't have this passion, are more motivated by money, and aren't as good. My organization has been unable to hire qualified developers despite using standard tools (Java, Oracle and Hibernate) largely because programmers that know boring tools like these and boring or difficult domains expect to be paid handsomely.

    It's true that using interesting tools reduces the market of qualified developers, but it also is a form of compensation. I would certainly take a pay hit to program in Haskell every day. Most programmers who use Java for their day job but are passionate about Haskell probably would as well, and this is also likely to be true of other fringe languages. This is a cheap way to get passionate talent. At the end of the day, you don't need a hundred mediocre programmers, you need three or five good ones. And programmers with skill at Haskell or Scala or Erlang have no trouble adding more languages to the list. Your numbers of "PHP programmers" versus "Java programmers" fails to take into account the great deal of overlap. Outside Java, PHP and C#, most programmers know many languages and most of the programmers who know more than one language have Java or C# in their closet in case of emergencies.

    Finally, I think you in general have misunderstood the relationship between programmers and niche knowledge. In other occupations, acquiring specialized knowledge and skills makes you more expensive because that knowledge is hard to acquire and the job is difficult. With programming, however, niche skills are (for the most part) easy to acquire and applying them makes the job more enjoyable to the programmer. Knowing Scala is not like knowing how to weld.

    Recruiting for small niche languages is actually quite easy: most of them have a primary mailing list that accepts job postings. I can assure you that any job opening for Common Lisp will get over four hundred applicants, most of whom will be qualified. I can also assure you that if you hire a programmer for a Lisp job who knows Haskell, they'll do better than a Java programmer who knows neither.

    Your essay is, I'm afraid, merely the repetition of flawed conventional wisdom. I can't expect you to change your opinion, but let me suggest that if you run into organizations that openly contradict what you've put forth here, take a gander at them and see if you don't find something surprising within.

  25. I'd like to offer a different perspective, because this topic has come up recently in my work as a web content writer.

    Since I work with lots of developers and designers, I use whatever they prefer -- I'm always using English, html, and css, and I don't care what else is in the file. Pointy sticks in the sand would be fine for me. But recently, I've been doing a project with WordPress and one with DotNetNuke.

    When I run into a challenge with architecture or styling in the WP project, it's easy to find a developer who can fix it up quickly, and I can often do it myself. If the guys on the project are busy, I can do a quick google or shoot off an IM to a friend. There's often a plug-in for it, and multiple forum posts discussing the pros and cons of various options. The same is true for PHP and Java.

    With DNN, we have to wait for the one expert we've got. He's on another continent, so there are often time zone issues, too. I don't know anyone who uses DNN, so I can't rely on my usual circle of support with people I swap favors with.

    One of them said, "It's crazy to use a language that doesn't have community support." While it's one thing if your goal is to be cool, as one commenter said above, it seems to me that the existence of a large, supportive community of users is a real advantage.