Which programming language should you learn first?

Olex
Thinkful
Published in
6 min readOct 18, 2016

(This story was originally developed for my work at Thinkful in 2015. I have re-read it in 2022, and stand by these recommendations; 2022 updates are in italic)

This is a question with several correct answers, depending on what you want to do with your code and what kinds of programs you want to build.

There’s software everywhere: Software is running your thermostat, your car or the train that you take to work every morning, and of course the browser or app that you’re using to read this. In this article we’re going to cover just a few areas of development that you might want to get into. Frontend and backend web development, which power websites, mobile development that powers mobile apps, and then games.

2022 update: I added a 4th type of programming — Embedded programming– and a *new programming language to check out*, at the bottom of the article.

Web Development

Let’s start with what’s right in front of you, the code that’s powering websites. Of all the different types of coding, frontend web development is one of the easiest to get into. You can ramp up from little to no technical knowledge and build websites from HTML and CSS, just those two languages. The frontend is basically everything that happens in the browser. HTML is the backbone of a web page. It lets you distinguish paragraphs and headers, show images and create interactive elements like forms and buttons. CSS is a styling layer that works with HTML so it creates the layouts, sets the typography, and controls typical animations that make a site great. Although HTML and CSS are not generic programming languages the way that the other languages discussed here, HTML and CSS are still a great place to start learning to code. You will learn a lot about syntax and in general start thinking like a programmer once you start working with them.

For building actual functionality, your primary choice of programming on the frontend is JavaScript. It lets you handle user input, it lets you pull in data from the server and really do anything that a browser can do. An informal survey of Thinkful’s 300-plus mentor team overwhelmingly agreed that JavaScript is a language you should learn first. 2022 Note: A lot of code in the industry is now written in TypeScript, which is JavaScript under the hood. JavaScript is still the first step to learning TypeScript.

Browsers get HTML and other data from computers called servers. The server is often referred to as the backend, and there are many more options for coding this side of web development. Almost any language, any programming language, can power a server. So, which one do you learn first? For small to medium ­size businesses and working with startups, you probably want one of the more popular dynamic languages, and that’s JavaScript, Ruby and Python. Their code is terse and they’re all optimized for programmer happiness. They all have a lot of open source libraries you can use to power the code that you write. These were the top three languages in our survey and even though they lack a little bit of raw speed, they’re all really good for developing the backends of websites. If you’re looking into build your first server, look no further than JavaScript, Ruby or Python. 2022: This is still accurate, JavaScript / TypeScript is pulling ahead, and Python is solid #2 choice, Ruby is on a slow decline but excellent language to learn early on.

PHP deserves a mention here. It powers WordPress, which is a popular content management system. It’s also a dynamic and popular language, so from a computer science perspective it’s similar to the big three mentioned above. It’s great if you’re looking to work solo or with small freelancing teams building websites for publishers or for small businesses. However, if you have no specific interest in this area, it’s probably best to start off with Python or Ruby and jump into PHP if you have to work on it for a project. They’re similar languages so you can pick up PHP after learning one of the others first.

If you’re looking to join an older, larger company, they’re likely going to be using a static language for many of their projects. That’s a language like Java, C++, or C#. These languages perform better on a large scale. They make sense for companies with hundreds of employees, thousands of servers, and so on. There are plenty of jobs to be found and there’s definitely lots to learn from those languages, so they’re not a bad choice for learning, but there’s a caveat. Established corporations are less likely to hire someone without a Computer Science degree. So if you start out with C# or Java, you’re going to need a lot of extra grit and maybe some extra curricular activities to really get your foot in the door.

Mobile Development & Gaming

Mobile and gaming are some other fields to consider. They rely on some of the same backend technologies as websites, but are rarely built in the browser. So which language you should learn varies by platform. To get into mobile development you should look into Swift if you want to build apps for Apple devices, or into Java if you want to build Android apps. For game development, you might want to start and learn programming in game specific environments, such as GameMaker or libraries like Python’s PyGame. You could also start by building games in the browser using JavaScript. But eventually, you’ll probably want to learn the popular engine Unity 3D and either continue with JavaScript, or learn C#. Blockbuster games like Halo or Doom often have many components built in lower level languages like C and C++, see the next section. Game development and graphics are quite challenging compared to some of the other areas of programming, since complex rendering in 1/60th of a second requires hard math and just very, very fast code.

Embedded Applications, Low-level Code (2022)

While it isn’t a typical starting point for programmers, a *lot* of important code falls into the category of “low-level” programs. This kind of program tends to run at the extremes: the code running inside a tiny device like a phone-jack-to-audio-jack dongle, and the code in a giant networking switch making a data center hum. If you are interested in this kind of code, there’s a new and very promising language that’s worth learning–Rust. It’s entering an area of coding that really hasn’t had much movement in 30+ years; and many applications and development environments are still struggling to shift into the 2000’s, much less the 2020’s. Rust, on the other hand, has a solid community and is likely to grow and chip away at the oceans of C code still used by many legacy corporations (not to mention FORTRAN). If you like the nitty gritty, want to work closely with hardware, and don’t care about quick & easy wins, go learn Rust.

Conclusion

If you’ve decided that coding is for you, those are the languages that you should learn. For web development, it’s HTML and CSS and then JavaScript. For backend web development, you probably want to stick to JavaScript and its sister language TypeScript, but take a look at Ruby or Python for inspiration. For mobile, your options are Swift for iOS (Apple) or Java for Android. If you’re looking to get into game development, you should try learning JavaScript or C# alongside the Unity 3D engine. Larger companies tend to build more stuff in the static languages like Java, C#, C++, but getting your foot in the door might be a little more difficult if you don’t have a Computer Science degree. If you are getting a computer science degree now and low-level code seems interesting, definitely learn Rust. That’s it for now, good luck and enjoy your programming journey!

Olex is a staff engineer and used to be a mentor at Thinkful. He has been building all sorts of stuff with software since 2006.

--

--