Picking a language to learn to code is a lot like picking a language to speak. Whether you choose to study French, Spanish or Mandarin, each will set your life on a different path to unique professional opportunities and experiences. And each will offer you different excuses to show off at parties just how smart you are.
There are dozens of coding languages in popular use today and nobody wants to make the wrong choice. But really, what language you should learn will depend on what you want to do. Read on to find out which language is best for you.
If you're brand new to coding, be sure to also check out our how to learn to code guide, which will introduce you to the basics of coding and programming. We also have a guide about the value of coding bootcamps, along with advice on the best laptops for coding too.
Why are there different programming languages?
Programming languages work at different levels of 'abstraction.' For example, if you want to program what instructions a CPU gets on a very granular level, then you need to do so using a 'low level' language called Assembly. But if anyone tried to write actual, useful software in Assembly, it would take forever.
That’s why we have 'high level' programming languages that take care of the boring stuff, like memory management and other behind the scenes processes. They enable you to only write code that does the unique things that you want your code to do.
Over the years, this has led to countless new 'high level' languages emerging that are better suited to different computing tasks. For example, PHP is great for writing clever websites, and Apple's Swift language is great for writing basic apps — it essentially turns the different building blocks (menus, pages, buttons, etc.) into Lego blocks that your code can piece together on the screen.
I'm an absolute beginner, where should I start?
If you're learning from scratch, a great place to start is with Python. It’s easy to get the hang of, and will teach you many of the core concepts and ideas that are found in every language, including conditional logic, loops, and the difference between a string, integer and boolean.
Python is also extremely well supported and can run on almost anything. It's built into MacOS and can be easily installed from the Microsoft Store on Windows. And there are countless easy to use plugins that will help you connect to databases, manipulate data, generate graphics, and do whatever it is that you want to do.
What languages are best for making apps?
The best language for making apps will vary depending on what platform you're on and how grand your ambitions are. As mentioned above, Apple's Swift is great for simple apps across all of Apple's products, from Mac through to iPad and iPhone. For Android apps, a language called Kotlin is what you should be looking at instead.
What languages are best for AI and data science?
Grounding yourself with Python is a good place to start if you want to be on the cutting edge of AI and data science. It has a ton of data science plugins, and is well designed for manipulating and displaying data.
If you're more hardcore, however, dig into the stats-specific programming language called R. That will really help you crunch the numbers.
What languages are best for making games?
Making games is a complicated process, but the best place to start is not by looking at languages, but game engines. For example, Unity and Unreal are two of the major engines that many games are written in today. These engines can make game development both straightforward and dizzyingly complicated.
Ultimately though, you'll probably want a good grounding in the programming language C++ to really get your teeth into game development. If you're new to coding, perhaps start with something a little easier.
What's the best hardware to code on?
There's no single answer to what is the best computer for programming — it really depends on your circumstances. Live Science has a best laptops for coding and programming list if you want to code on the go. But there are certain things you should consider.
For example, if you want to write iPhone or iPad apps, then you'll need a Mac in order to access all of Apple's developer tools. Similarly, if your goal is to write code and crunch through a significant amount of data, you'll want to make sure you're using a machine with a beefy GPU, to save you waiting for an eternity for data processing to complete.
It is good practice to run the code you write on a computer that isn't your main machine. You don't want to be left without a computer if, say, your code accidentally erases critical system files or causes other problems. So, it might be a good idea to pick up a secondary device like a Raspberry Pi or Intel NUC to store and execute your code. That way, if something goes wrong, you can simply wipe the storage clean and start again.
And don't worry, you can still write the code and do all of your other work on your main laptop or desktop PC — it's just a case of saving the files and connecting to your other machine remotely across your local network. If you want to play it ultra-safe, it's very easy to get an Amazon Web Services "EC2" instance, which is a bit like a virtual Linux machine in the cloud. The low-powered options only cost a few pence per month, and you can close them down if you break something, and open up a fresh new instance to start again.
Which language will earn me the most money?
According to ITJobsWatch, the language with the biggest payday is Korn Shell. This is an obscure and pretty ancient language designed for interacting with UNIX systems, and will reportedly command an annual salary of around $142,000 (£115,000).
However, we probably wouldn't recommend you blow the dust off of your Stone Age PC to try to master it, as it's not widely used. In terms of more mainstream coding careers, a typical Java engineer can reportedly earn a salary of $94,000 (£76,000) per year, while it's around $90,000 (£72,500) for a Python coder.
If you want to be a little more cutting edge, both Go and Rust are increasingly popular languages with impressive annual salaries. Go, which is often used for data processing or backend web development, will earn you a median salary of $99,000 (£80,000). And Rust, which is often used for writing software to run on embedded systems where efficiency is key, could see you earning $108,000 (£87,500).
Sign up for the Live Science daily newsletter now
Get the world’s most fascinating discoveries delivered straight to your inbox.
James O’Malley is a freelance technology writer and data wrangler. He was previously editor of Gizmodo UK, and over the years has written for everywhere from Wired, Engineering & Technology, TechRadar, Which? Computing, and PC Pro. He has a Masters Degree in International Relations and takes every opportunity to flex his coding muscles.
I suggest Diesel Mechanics or Plumbing and HVAC.Reply
AI will be writing ALL of the code by the time you are proficient in any of the above suggestions. I started coding in 1973, started my own company in 1975, was very successful and sold the company in 2008 to retire. The handwriting is on the wall! The guy who bought my office building probably makes 4 or 5 times the highest salary you have listed above. (maybe more) What does he do? He started his own HVAC company in central Indiana just a few years ago and has grown it to be one of the largest in the mid-west. Coding is a dead end job today!