Best Programming Languages to Learn in 2021
A lot of people want to start learning to code, so the obvious first question is, “which language should I learn?” The number of programming languages is ever-increasing, but fortunately there’s only a few big contenders you should pay attention to if you’re just starting out in 2021. Which programming language you should start learning depends on a few important factors. First and most important is what do you want to build? Secondly, how popular is the language in question? And thirdly, how beginner-friendly is the language? The fortunate thing is that you really can’t ever go too wrong, because a lot of skills learned in one programming language will transfer over to others, and it’s common for professional software engineers to regularly pick up new languages over their careers.
Best overall language: Python
To skip right to the chase, if you’re not sure what you want to build yet, or if you just want to get started with programming in general, Python is hands-down the best choice. It’s one of the most popular languages among programmers in industry, and powers the services of big-name companies like Google and Dropbox and many many others. Python is also very popular among academics and data scientists. If you want to do number crunching Python has excellent libraries like numpy and scipy for math and science. Its popularity means that it also has a great community and very solid, industry-standard libraries for almost anything you may want to work on. Python also has an intuitive, readable syntax and is quick and easy to get started with, as well as tons of greatonlinecourses. It’s hard to go wrong with Python!
Best web language: Javascript
If you want to make a website with a lot of interactivity then Javascript is really the only choice. Javascript is the only language that web browsers understand, so if your goal is to build a dynamic web application then javascript is a must. Javascript is an extremely popular language so there’s lots of great open-source libraries and plugins for most tasks you’d want to do. Javascript can also be run on servers and on the backend via node.js, so it’s also a very capable language outside of the web too. Since it needs to run in browsers on all sorts of devices, from powerful desktop computers to cheap mobile phones, Javascript has been highly optimized so it performs surprisingly well.
The downsides of Javascript are that it feels like a bit of a mess to get started with compared to some other languages like Python. The ecosystem is less coherent compared to most other programming languages, with all sorts of third-party tools necessary to write modern Javascript well. The language itself also has a lot of cruft from its development over the past 20 years as it has grown and changed with the web, so you’ll need to keep checking when articles and tutorials about Javascript were written to ensure they’re still relevant. There’s also a lot of popularity with different flavors of Javascript like Typescript, which, although great, can be daunting to wrap your head around at first. Regardless, if you’re working with the web, Javascript is the way to go. And if you’re willing to get past the initial headaches around getting Javascript projects set up it’s a very powerful language in its own right!
Best mobile language: it depends, but probably Javascript
Sadly, if your goal is to build a mobile app there’s less of a clear-cut winner in terms of programming language choice. You can build a native app for Android and iOS individually, but that’s a ton of work and is a maintenance nightmare, especially for a solo developer. There are also frameworks that can help you write a single app that runs on both iOS and Android, although these may be less performant than writing a native app from scratch, and you may sometimes have bugs that require knowledge of native iOS or Android code.
For most people, though, it’s worth it to use a framework that lets you write an app once that can run on both iOS and Android. The two most popular frameworks for doing so are React Native by Facebook, which uses Javascript, and Flutter by Google, which uses the coding language Dart. Which of these two is better is still hotlydebated. Either are a good choice, but the benefit of React Native is that it uses Javascript, which is a standard language that you can use for lots of other things like web development, whereas Dart is really just used for Flutter.
Another option is to just create a mobile-optimized website which looks and feels like a mobile app. There are even frameworks like Corodova which will let you create a mobile app using web technologies, so to end-users it will look the same. This just requires the same technologies as the web, so Javascript would still be the winner here.
Dive in and get started!
No matter which programming language you decide to learn first, there’s really no way to go wrong. If you start learning a language then decide you should switch to something different, you’ll already have lots of understanding that will make picking up that new language much easier. Furthermore, having experience in multiple programming languages can help you see problems from multiple angles. No matter what you choose, there’s lots of great free resources online, so if you’re serious about learning and put in consistent effort you’ll find that learning programming can be a joy!