I would put the number at five languages, you can’t just learn one. What language to get started with is a totally different question, but after having programmed for five years these are the five I’ve been proficient enough with to dream up a project, decide which of these five suits it best, and implement it. It’s not necessarily the best five, but I dare say they are very solid.
PHP
In spite of all these NoSQL trends, PHP scripts to a MySQL database still is a very fast way to get a site up and running. The LAMP is a very solid platform and if you’re a consultant, be ready to face it often. Since it’s so old it also has loads of frameworks like Phalcon or Slim, which runs real fast and makes RESTful architectures easy to build, with a lot of documentation around it. There’s very few PHP questions that haven’t already been asked on the web so you very seldom get stuck for days.
Java
It’s the most popular language out there so there’s tons of resources out there to do whatever you want. Lots of new stuff that’s all the rage can be done with Java, such as datamining or getting an application hooked up to Google App Engine to abuse the cloud. I’m really big on OO, maybe because I simply haven’t ventured that far into functional programming, so Java really suits the way I do a lot of work; dream up something, identify it’s “moving parts” along with the function of them, and then code away. You can get huge code blots though if you don’t invest (some would say “waste”) a lot of time thinking about the class structure but I think it’s worth it. Did I mention it’s everywhere, too? Sure, it’s easy to outsource but the demand is still very, very large for Java developers.
C++
The first language I ever really learned. It was frustrating at first, because one of it’s main strengths is that you have to understand what you’re doing and do it right or you’ll suffer but wow, it’s a really fast language with a lot of depth. It’s actually fast enough that you shouldn’t bother with C unless you’re coding for microprocessors. I think it’s absolutely awesome for testing out algorithms I’ve just heard of or just writing a simple command line app that automates something boring I usually do. Plus, a lot of systems still run on it, especially old government stuff of which there’s a plenty in my town.
R
This is the most recent addition of languages I’ve made projects in. I’m a huge stats geek, I was an insufferable little shit as a teen ager who had to talk about stuff I recently read, but now that I’m older I’m a little more bearable and the questions I like to answer today are just bizarre. It can handle very large datasets and most of the inferential and plotting stuff you want to do is already abstracted for you, otherwise it’s not that hard to learn and code yourself or find a library someone has already made to save the day. And everyone wants to get in on this Big Data stuff so there’s jobs a plenty.
Javascript
The language of the web has been found, and it’s name is Javascript. It is devilishly harder to learn than it looks, especially if you come to it with a Java and C++ background like myself. The way objects work just boggled my mind for a very long time, it’s still weird to me, but after a while you get the hang of it and oh boy, is it ugly and hard to read but does so much. I find myself typing code thinking “wow, is this really going to work?” and then being surprised often. And with such a large community help is always around the corner. It gets bonus points for stuff like node.js, which means it can be a back-end language too.