Learn Multiple Programming Languages

Posted by JT Turner on 2015-02-08

I have learned many programming languages over the 28 years I have been programming. Here is a few in no particular order: Basic, C, C++, Java, C#, VB.Net, VBScript, Python, Ruby, JavaScript, SQL, Objective-C, Perl, Pascal, and this year I plan on learning Erlang and Elixir. I couldn’t write an application in most of them today but I have read at least one book or worked through many tutorials online. As you can see I love learning and programming is huge passion of mine. I tell you this because I wanted to talk about why I have chosen to learn so many different programming languages and how it has help me. I hope in turn I can inspire and help you to learn as well.

One of the best reasons to learn different languages is that different languages solve problems in different ways. It is easier to take the language we know really well and solve all our problems with it. I think most programmers can do this after using a language for a year or so. A DBA tends to solve problems with SQL and a .Net programmer solves problems with C#. Doing it this way works but you might just be missing out on an easier way to solve that problem. When you learn a new language you will sometimes just bring back that pattern to your primary languages but sometimes you will get this calling and end up switching to that language. If you never learned it in the first place you are never going to know what you are missing out on or how nice your currently language works.

Another great reason to learn multiple programming languages is you find out quickly that there really is no right way to solve any problem. This can be very hard for some people. We are taught, at least in American schools, that there is always a right and wrong answer. In the real world for many different things this is just not true. Learning multiple programming languages shows us many different ways to solve a problem. Some ways might be slower but easier to maintain later. Some might get the job done fast but as the project gets bigger it gets harder and harder to maintain. In the end though there is never a right answer. There are only trade offs. It’s up to us to decide which ones we want to take and learning different programming languages makes this easier and easier as your career grows.

It isn’t about just learning a few languages either. You should try picking a language that is structured differently. If you know C#, learning Java isn’t going to get you as much value as learning F#. Java and C# are single inheritance object orientated languages. They solve many problems with the same patterns but if you were to learn F# or Haskell well now you are learning a functional language, which is a very different way of solving problems. This was the one reason why I stuck with JavaScript vs Ruby. I was learning both in 2009 but I stopped learning Ruby because although it was a dynamic languages and far more popular at the time, it was still a traditional object orientated language. JavaScript is a prototypical inheritance language and solved problems a little differently. Also at the time Node.JS was picking up and though I had used an event emitter pattern before, I was interested in exploring new ways of solving problems in that way.

So have I gotten you motivated to learn a new language yet? If so which one do you want to learn next? You can always go to the top language index pages like TIOBE Index or PYPL and just pick one of the popular ones. I wouldn’t go that route but it is an option I have done in the past. Lately I try and pick something that solves problems very differently than I do in current programming language. So learn a functional language like Erlang, F#, or R if you know Java, C#, or even C++. You can also take a look at a few of the really small but moving quickly languages like Rust, Go, or Elixir. Another route might be to learn something like MongoDB if you are using mostly SQL servers or PostgresSQL if you are mostly using document stores. It doesn’t have to be a general purpose language as they have very different ways of solving data store problems.

One tip that helps me in selecting is to watch an intro video to a few of the languages. Try to pick conference videos as they tend to be better quality. Then just pick the one that got you the most excited. The idea is to expand your knowledge and keep learning something new. You might never build anything big or significant in the language though I would encourage you to at least build something open source or help out on one of the open source projects. The only real goal though should be to learn a different way to solve the problems you are solving today and, who knows, Elixir or Rust might be the new hot language 4 years from now and you will have a leg up on the competition.


Comments: