What programming language should I learn?

I got to talk for DevCon again last Saturday at STI Makati. Instead of preparing a new talk, I just rehashed an old talk to save time. The new talk is also over at Slideshare.

Anyway, the point of this post is to answer a question posed to me by a student in the Q&A portion of the talk:

Anong programming language ang dapat naming pag-aralan?
(What programming language should we learn?)

Here’s a question I wouldn’t want to hear answered by someone else (i.e. someone who’s also invited to talk to students). The question itself may seem simple, but unless you’ve seen how the industry works as a whole, you’ll probably give a wrong answer.

The traditional answer I don’t want to hear is to give a suggested list of languages based on market demand.

Simply put, this is bullshit. This is the same sort of bullshit that pressures our youth to take nursing courses even though they’re just in it for the money, money that they probably won’t get due to the eventual over-supply of nurses.

So for the student’s question, I gave two answers:

Programming language and platform choice doesn’t matter, because for the most part it’s a business decision.

Yes, I’m talking about steaks and strippers. In a large company, you may be initially hired to work on a single language, but eventually there will be a time where the company will make a business decision to shift technologies, whether due to market pressure or due to a new client. If you focus too much on a language, you will not be prepared for the change and you may end up getting fired or demoted.

In smaller companies or in a freelance setting, language still doesn’t matter, though for another reason: the client will not care about the language as long as you deliver the product.

This leads to the other answer:

Focus on the fundamentals, not on the language/platform.

A common mistake among fresh grads is that they’re confident they know language A or platform B because they were able to make their school projects or theses while at the same time not having their fundamentals down pat. Not only does this make them inflexible in terms of learning new languages, it also makes their work brittle and sloppy.

In other words, a student who has 4 years of school “experience” in Java is nothing compared to a developer who just had learned Java a month ago but has solid fundamentals in OOP.

You might say “Screw learning, I’m just in this for the money!”. But the fact is, there’s this thing called the Python Paradox: developers who are passionate enough to learn more than their peers often end up in higher-earning and less-stressful jobs.

Bottom line: There is no “best” language that you need to learn in order to earn a lot of money. However, if you have good fundamentals, learning the language and platform that the market needs will be much easier for you.

Polyglot Programming

no single language

In this day and age, knowing one programming language is not enough to develop software.

Take for example web development. You need to know at least 3 different languages to write a web application:

  1. HTML to provide a user interface.
  2. A web scripting language (e.g. PHP) and possibly a general programming language (e.g. JSP + Java, ASP.NET + C#) in order to process the data entered by the user.
  3. SQL so that you could save the data to a database.

Of course, these are just the bare bones of a web application. More practical web apps require the developer to know more technologies:

  1. CSS to make the interface more appealing and manageable.
  2. Javascript to make that interface more dynamic (a must in Web 2.0).
  3. Another markup language like XML and JSON to facilitate data exchange (e.g. for AJAX)
  4. A web framework to reduce the complexity of a large system.
  5. A scripting language to automate the build and testing of the system

Developing for corporate clients require even more technologies:

  1. Ways of interacting with services on other servers which, when listed down, looks like alphabet soup: SOAP, RPC, CORBA, SOA, etc.
  2. Various security protocols, with keys, certificates, and whatnot.

Continue reading “Polyglot Programming”