Codementor Events

What language should I learn?

Published Nov 04, 2019Last updated Nov 06, 2019

As we're entering 2020, I thought I'd give an overview of some of the more popular programming languages out there, and give some career tips for young developers getting into the industry and don't really know what to think (or have formed strong opinions) about the various programming languages available at their disposal.

Before I get started though: it is a good idea in your career to learn new languages and not to get too attached to a particular language or technology. For example, when I got started: Ruby was all the rage, Python was a niche language that was slowly fading way, Objective-C was mostly unknown, and Javascript was only for making rollovers. Some languages or systems like Go, Node.js, or Kotlin didn't exist yet. The times have changed significantly and they will continue to, so don't handicap yourself by obsessing over a particular technology or framework.

That being said, let's get started! We'll begin with the old tried and true ones.

Python - this one has been the darling of the last few years. If you are new to coding, you can't go wrong with learning Python - in fact I've worked in Python for roughly 7 of the last 10 years, so not only is it easily to learn and use but there are plenty of job opportunities using it. A quick disclaimer though: while I was using Python, I was also using other languages, so my work hasn't been exclusively in Python.
The key areas where Python is used are in web development, data science, and machine learning. If these areas interest you, then Python is definitely a candidate to learn.
Why wouldn't you use Python? Python has two main flaws. The first is performance: Python is slow compared to other languages, even other interpreted languages like Javascript. While you can drop to C or C++ to speed up some inner core loops and operations this is a big pain (speaking from experience here), so if you need some raw CPU performance you might be better served by another language. The other performance issue is in multi-threaded or asynchronous environments; Python has a thing called a GIL (global interpreter lock) that limits how well Python can perform in this setting. Newer languages like Node.js or Go are more useful here.
The second issue is in building robust software: Python has dynamic types and a heavy reliance on unchecked exceptions to handle failure scenarios. Both of these contribute to software that tends to fall over in production settings, especially as your team grows. You can get around this a bit by using Python 3's typing module, but I've found that this is less common than it should be.

Javascript - 5 years ago, people said that JS was slowly taking over the world. Node.js was booming in popularity, as were JSON-based databases like MongoDB or CouchDB.
Now things have changed. It's is still extremely popular, especially for first-time programmers, however the industry as a whole has cooled on the idea of using JS everywhere. As JS applications grew more complex, developers have learned the hard lessons that come with scaling software and discovered that it is lacking in a number of features that are useful in that arena, and the permissiveness that was once a feature leads to quite a few production bugs. For example, I've seen "undefined" get printed in random places on websites for huge companies, like American Express or AT&T! You might say this is caused by sloppiness in the programmers, but robust languages are robust because they prevent bugs from happening despite sloppiness instead of relying on humans being perfect.
If you're working in JS, I'd highly advise taking a look at TypeScript, especially if you're already using a build step to convert from ES6 to something that is more portable. It's relatively painless since it supports all of JS's features, but it allows you to write code in a more robust way.
It seems like I've only given bad things, so let's talk about some of the good things. Node.js is a great platform for building things that are light on CPU but heavy on I/O - things like HTTP APIs or glue code to connect different services. There are libraries for everything (JS is the number one language on Github) and so whipping together something quickly is much easier in Node.js than it is in pretty much any other language. The package management system is very clean and contained, avoiding a lot of the headaches that you get in other languages like Python or Java. Frameworks like React make it much easier to write cross-platform apps than having to maintain several separate codebases.

Java
Where is Java at in 2019? Other than the primary language on Android, Java hasn't changed too much in years. It's a key language for a lot of enterprise software and in large tech companies since scales quite well as teams grow and has a strong history of using good OOP techniques to build maintainable software. If you want to work at Amazon, Google, or another one of the big tech companies, then you can't go wrong with Java.
What's wrong with Java? It is a bit dated nowadays, newer languages tend to be easier to work with from both a coding and a deployment perspective; it's more difficult to write concurrent code than Go or asynchronous code than Node.js. While Java used to be top-dog when it came to libraries it has lagged behind Python and Javascript in that regard in recent years.
From a more economic standpoint, a downside of Java is that it is the language of instruction in most universities, so if you're a new programmer and you only know Java then you don't really have anything to set yourself apart from the crowd.

C#
5 years ago I would have lumped C# in with Java since they are mostly the same language, the choice between the two is whether you want to be on the Microsoft stack or not.
That's changed completely. Microsoft is no longer the evil overlord that it was whereas big Java supporters like Oracle or Google are, so people are less hesitant to marry themselves to Microsoft as they once were. The developer tools for C# are top-notch and the documentation for .NET on MSDN are fantastically thorough - you don't often find documentation this complete.
The biggest change though has come from the rise of Unity. If you wanted to build a good 3D production video game in the past you usually had to go with one of the big engines like Unreal and write all your code in C++; now you can get started with Unity and hack something together in C# in a fraction of the time or cost. If you want to get into video games, then C# is definitely a good choice for you.

C++
You didn't know this guy was still around, did you? Not only is it still around, but it is alive and kicking. It's actually the one language on the list that if you really wanted to get into and ignore the existence of all other languages, this would be it. An expert in C++ can fetch a top-notch salary at the big guys like Google or Facebook, or have reliable employment working on mission-critical systems at older companies like Morgan Stanley. While you could say the same for dead languages like COBOL or Ada, C++ is still actively improved by the community and has regular language updates like C++14, C++17, and the upcoming C++20.
For systems where performance is critical, C++ is still unparalleled. You have very good control over how the system manages memory, which is one of the key performance-killers in many applications.
It is not a language for the faint of heart though. There are a lot of dark corners of the language that can trip you up, and the lack of memory safety means that sometimes the result of a bug have absolutely nothing to do to the code that caused the bug. You need to invest quite a lot of time in understanding modern C++ and the effective ways of using it vs. highly ineffective ways.

The rest of the languages I'll just give a more brief note on, since they're less common than the other ones.

  • C: Contrary to popular opinion, C is not C++. They have the same roots, but modern C and C++ have diverged somewhat. C has become more of a niche language, it's used heavily in embedded systems due to its low execution footprint; and in lots of open-source systems like Linux, MySQL, or most scripting languages. Any jobs that specifically use C will probably be in these two areas, so if you like these types of things then C is a good one to learn.
  • PHP: while PHP is incredibly popular, I put it down here because it is still a niche language - you don't do anything with PHP other than write server-side web applications. It's great for getting web applications rolling quickly, and modern frameworks like Laravel make it pleasant to use.
  • Go: growing in popularity for building distributed systems and infrastructure. It's simpler to code and deploy than C++ or Java, has better performance than Python or Javascript, and is much easier to do concurrent programming than any other language on this list. It is a simpler language, so it's quite easy to learn. There aren't too many Go jobs out there, but since there aren't too many Go developers either it's a good one to learn if you're looking for a shift to infrastructure development.
  • Ruby: this was once an incredibly popular language, it's faded in popularity. Rails is still very good for creating CRUD apps (IMO it's easier to use than Django), and Metasploit is a very good security framework. If you are doing CRUD apps or infosec, then Ruby is a good one to pick up. I also think it's the best shell scripting language - less quirky than bash, more "bare-metal" than Python, and easier to read than Perl.
  • Rust: getting popular for lower-level systems programming. The key selling point is memory and thread-safety, a lot of memory or threading issues are just not possible in Rust. Good if you want to build larger-scale reliable systems, or work for Mozilla.
  • Kotlin: gaining popularity for anything JVM-based, Android in particular. Like many of the newer languages it introduces features to cut down on boilerplate and get rid of a lot of annoying issues. I haven't used it myself, but thought it worth a mention here for anybody wanting to work on Android apps or other systems in the Java ecosystem.
  • Objective C/Swift: another niche language for iOS applications. They are grouped together because Swift is effectively Apple's replacement for Objective C, neither are really used outside of iOS. If you want to develop for iPhones, iPads, etc. then these are languages to learn.

If I forgot a language don't be offended, just leave a comment below and I'll be happy to leave it below. I did deliberately focus on languages that are commonly used in industry, so while it is possible to find jobs in Haskell or Prolog in industry it is much more difficult than the ones I have listed.

Hope this helps!

Discover and read more posts from Rob Britton
get started
post commentsBe the first to share your opinion
Show more replies