Table of contents
Whether you are new to programming, looking for your first language to learn, or an experienced developer looking for a new challenge to take your career to the next level, choosing a programming language to learn can be daunting. There are just so many options. It usually takes years to go from zero to hero in a given language, so you don't want to feel like you're wasting your time.
Factors to Consider
A number of subjective and objective factors may weigh into your motivation for learning a specific language — and in the end, what really matters is staying motivated and having a good reason to learn a new thing, or else you're unlikely to stick with it. That said, here are typical motivations for learning a language.
1. You Need It for Work
This often goes unmentioned, but this is probably one of the most important and motivating factors. If you already have a job (or just landed a job) that requires you to know a particular language, most likely because you'll be working on an existing codebase, that's probably the most motivation you can get. Learn this language or possibly get fired!
2. You Have Friends or Connections Using It
If you already have good friends or all your social media connections use a language, this can help tremendously — when you get stuck you might know who to turn to for help or to discuss your problem. If you are part of a community that seems to gravitate towards a particular language, that will significantly affect your motivations for learning it.
3. Overall Popularity
If a language is extremely popular, this will likely sway your opinion about which you should learn. The more popular the language, the more likely you are to find high-quality resources for learning it and getting help. There will be more packages written in the language that you can use so you don't constantly have to reinvent the wheel. And there will be more, better tooling available to help you code in that language.
4. Job Opportunities
5. Highest Paying Jobs
People proficient in one language over another tend to make more money. There are many factors that could contribute to this, such as the popularity of a language in particularly lucrative industries.
Stack Overflow's 2021 survey found that Clojure was, by a good margin, the highest paying language (although it's far from the most popular language) and Dart is the lowest paying language. PHP was the second lowest. I'm not sure why PHP performed so badly, but perhaps this is because it's a language many junior devs learn to work with WordPress at beginner-level jobs.
I don't know that this is necessarily a good reason to learn one particular language over another, however, because there's no guarantee that you can find a job that requires one of these languages, and even if you do, the salary range could vary wildly depending on how senior the position is, the responsibilities associated with it, and the nature of the company hiring you.
6. You Love It — And Enjoy the Developer Experience
One reason people would take one language over another is simply because they enjoy using it versus other languages they know. A language that makes sense, has good tooling, has clear syntax and is easy to learn and use without tricky bugs cropping up all the time will be one that many people would choose to use, all else being equal.
From Stack Overflow's 2021 survey, Rust and Closure are strong Winners, followed by TypeScript. PHP actually performs quite poorly, worse than PowerShell and barely ranking above C. COBOL performs the worst by far with only 16% of respondents claiming to love the language and 84% dreading it.
It's interesting to look at frameworks, as having a great framework may be a reason to choose a language. The Stack Overflow survey shows that Svelte, ASP.NET Core, FastAPI, and React are well-loved frameworks, and jQuery, Drupal, and Angular are the most dreaded.
It's a Personal Choice
In my case, there are a few languages that I've spent most of my career learning, and I'd like to explain how I came to work with them.
When I started learning web development, PHP was everywhere and was (and still is) extremely popular. I had friends who could program in it and they taught me a bit and I worked on projects with them. Later on, when I got the job I've now had for ten years, it was one of the languages used by my employer, as we had a few Drupal-based websites.
ColdFusion is not very popular anymore, so much so that it doesn't even make any of the lists in this survey. But my employer had an extensive legacy codebase made with ColdFusion and it's just what the existing developers knew and used. So that's what we used. When their existing developer retired I couldn't find any compelling reasons to keep using it so we primarily transitioned to PHP and the Laravel framework.
That said, I've found ColdFusion pretty easy to work with and friendly, but there are a lot of drawbacks to using ColdFusion, and many of those are remedied by using a more popular language. Since we already had PHP in our environment and I already knew PHP, we decided to use the best, most popular PHP framework for new development.
SQL (MySQL and SQL Server)
We are a Microsoft-heavy environment so we used a lot of SQL Server databases, but we are using MySQL for most new web development for cost-saving reasons and because it works a little better with Laravel.
For new development, we are primarily working with Vue.js. Why Vue and not, say, React? Mainly because it seemed more popular and well-liked in the Laravel community, and most of the people I know and interact with use Vue. I know of and use many projects that use Vue heavily, and many jobs in my space require knowledge of Vue — despite React being more popular overall.
If you're a full-stack web developer like I am, it's hard to avoid knowing any of these languages, and I make extensive use of them on any front-end code I write.
If you found this article interesting, please follow me on Twitter at @jdlien for more articles like this!