fbpx

Which programming language should I learn first?

Black and white image of an open laptop on a desk with programming language displayed

ARTICLE SUMMARY

"The best first language is the one that does what you need it to do.” Keri Savoca shares her valuable knowledge on which programming language you should learn.

As a technical writer, my goal is to simplify complex topics, so you won’t encounter much technical jargon in this article. I could delve into object-oriented programming and data structures, but if you’re new to coding and computer science, that might not resonate with you just yet. Instead, this article aims to provide a broad and straightforward introduction to programming languages, guiding you on where and how to begin your journey into coding regardless of age.

Which programming language should I learn first?

This is the most common question I’ve received since publishing What I Wish I Knew Before I Learned To Code. Most people assume there’s an obvious choice, but the answer is not always so clear.

Many coding bootcamps focus exclusively on JavaScript, perhaps with the assumption that everyone who wants to be a developer should just start with front-end work. JavaScript is pretty much unavoidable if you want to get into front-end development, but many people jump into it before even considering what they’re trying to accomplish by learning how to code.

Many computer science programs start with Python, perhaps because it has a simple syntax and robust documentation, making it a great language for a beginner. Hey, Python is great for all sorts of things, including data science, so why not learn it first? It’s a general-purpose language, after all.

The problem is that many people get it in their heads that they want to “learn how to code”, but they don’t stop to think about what they want to learn how to make.

Programming is not about picking a language, learning its syntax, and then figuring out what it can do later on.

If you want to be developer, and you’re not sure where to start, I strongly encourage you to begin with the end. The end result. What do you want to make?

If the answer is “a lot of money”, then go ahead and browse job listings and pick whatever language your preferred company is looking for. But good luck learning something without having a tangible goal in mind!

After all, it doesn’t matter how “easy” or “difficult” a particular language is to learn. You know what’s really difficult? Trying to push a language beyond its limitations to create something that can’t (or shouldn’t) be created with that language.

I’m not sure what I want to make, but I know that I enjoy the challenge of programming.

Fair enough — but at some point, you have to realize that you’re trying to learn something challenging out of context. It’s like trying to learn a foreign language but admitting that you don’t even know where it’s spoken and that you have no interest in ever speaking a word of it aloud. You can learn all the out-of-context grammar you want, but you’ll never be a linguist.

Begin with the end.

What are some of the things you can make?

  • websites
  • computer games
  • mobile apps (iOS? Android?)

What are some of the things you can do?

  • data science
  • artificial intelligence
  • machine learning
  • cyber security
  • technical writing
  • database administration

This list is obviously not all-inclusive, but you get the point. What exactly do you want to do? Figure that out before you choose a programming language to start with. While some people say it doesn’t matter which one you choose as long as you learn it well, you’ll probably find that this is not the best advice — especially if you’ve already tried and failed.

You probably shouldn’t be spending months and months on JavaScript challenges if your dream is to design the next Fortnite, just like you don’t need to take a course in Swift if you’re trying to be an Android developer.

On the other hand, if your dream is to land a software engineering position at a major tech company, you’ll probably be expected to learn new programming languages once you start working. Your understanding of algorithms and computer science principles might be more important than the language you choose to use at your coding interview.

Undoubtedly, it is easier to pick up new programming languages after you’ve learned one really well, but if you’re just starting out, it’s best to choose a language that aligns well with your short-term and long-term goals instead of choosing one at random, or choosing the one that you think will make you the most money.

Black woman typing on a laptop with a Python coding book at her side, programming language

HTML and CSS

If you want to do anything with front-end development, assume that HTML and CSS are a given. Whether you consider them programming languages or not (technically HTML is a markup language and CSS is a style sheet language), you need to learn these, and you should be able to learn them quickly. There’s a reason coding bootcamps breeze through HTML and CSS, sometimes making them part of pre-bootcamp coursework.

Simply put, HTML is used to put text, images, and other elements on a website. Headers, footers, line breaks, links, italicized text, and so on are created with HTML. The entire hierarchy of your page is done with HTML.

CSS is used to change how these elements look. From opacity to borders, from font sizes to grids, CSS lets you customize the look of each element on your page. You can also use CSS to create animations before you even think of the word JavaScript.

If you want to be a front-end developer, spend a week or two really learning HTML and CSS, and make a few websites from scratch before moving on. Learn Flexbox and Grid to make pages responsive (so that they adapt to different screen sizes), and see how far you can push CSS because it can really do a lot more than you might imagine. Play around with Bootstrap, which is an open-source front-end framework. Then, once you’ve gotten to this point, you’ll find that your programming journey has naturally led you to…

JavaScript

JavaScript can be used in a lot of ways. But it’s most commonly used in front-end development. JavaScript is used to make websites interactive and to make web elements functional. You can add a button to your website with HTML, style it with CSS, and give it functionality with JavaScript. Without JavaScript, your button won’t do anything when users click on it.

You won’t need to use the Terminal to use JavaScript. You’ll work in a code editor and in your browser.

JavaScript can be used to design browser-based games. (If you’ve ever tried to play browser-based games on a school computer and ran into trouble, it’s probably because JavaScript was blocked by the school’s administrator in a futile attempt to stop you from playing games.)

There are plenty of libraries and frameworks that make it easier to work with JavaScript. You won’t start with these, but you might use them extensively later on.

You can use even use JavaScript for back-end work using Node.js.

JavaScript is relatively forgiving of errors. Relatively.

“If you want to be a front-end developer, you’ll need to learn HTML, CSS, and JavaScript. There’s really no way around it.”

View of a LinkedIn search for Javascript, programming language

Python

Python is a versatile, powerful, general-purpose language. You can use it for pretty much anything, from web development to games, which is why a lot of people choose it as a first language.

If you’re just curious about coding, you can start with Python. It’s easy to learn.

But if your dream is to get a job as a data scientist… you might as well stop reading right now because you can definitely start with Python.

Long story short, Python is a data scientist’s dream. Its packages and libraries make it easy to work with massive amounts of data. You can create visualizations with Matplotlib, you can analyze tabular data with Numpy and Pandas… and so on.

Python has robust documentation. If there’s something you need to look up, you’ll be able to find the answer quickly. This is an important consideration for anyone who is learning independently.

Watch your indentation, though. Indentation marks blocks of code, so you’ll get an error if you do this wrong. A missing space or an extra space is a problem. I mention this because this is a distinctive feature of Python. With JavaScript, you can put as many spaces as you want — even if you make a mess. Don’t try this with Python.

Ruby

Ruby is a back-end language, however “Ruby on Rails” is not a languagen- Rails is the framework, and Ruby became popular because of Rails.

It is an awesome language with a gentle syntax. No semicolons at the end of each line! Most developers agree that it’s fun to use, but it’s pretty intolerant of errors. Just a heads up. If debugging is not your forté, you won’t have a good time starting with Ruby.

It’s a high-level language that can accomplish quite a bit with just a few lines of code. Ruby is becoming popular with startups, so you might have seen job postings for “Ruby on Rails developers”.

Ruby might be a good first language if you’re learning independently and if you aren’t a fan of Python. On the other hand, Ruby was designed to make programming as fun and pleasant as possible for experienced developers, so it’s not a language that coding academies or computer science programs teach first. If you’re hoping to learn in a face-to-face environment, you won’t have much luck finding an “Intro to Programming” class that focuses on Ruby.

SQL

SQL (some people pronounce it S-Q-L while others say “sequel”; we can save this argument for another day) is not really a “programming” language. You won’t be making entire apps with SQL. You’ll use it to communicate with or get information from databases.

Data. Bases.

If you want to work in data science, you’ll have to learn SQL or you won’t be obtaining any data. If you want to do anything at all that involves databases, you’ll have to learn SQL. But if you’ve never written a single line of code in your life, you probably shouldn’t start with SQL. Why? You can’t develop a stand-alone app with SQL (it’s not that kind of language), so you’ll pretty much be learning backwards.

Swift

If you want to be an iOS developer, it’s totally fine to start with Swift. Swift is a relatively new language, but it’s easy to learn (kids can do it) and it was literally made for developing iOS apps.

Not much else needs to be said here. There’s no reason that Swift can’t be your first language if your goal is to be an iOS developer.

Java

[Java is not a nickname for JavaScript, just like car is not a nickname for carbon.]

If you want to build Android apps, Java is your language. You can use it for desktop applications, too. And some games. Java used to be one of the most commonly taught languages in computer science programs, but Python has surpassed it in recent years. Java is still quite popular, but Python and Ruby are arguably easier to learn. If you have your heart set on being an Android developer, start with Java — but if not, you might find that you get more versatility (and more bang for your buck, so to speak) by learning Python first instead.

C#

If you want to be a game developer — particularly if you want to develop console or desktop games — you might have looked into Unity. If not, open this link in a new window and explore it as soon as you finish reading.

With Unity, you can build (and monetize) incredible games, even if you’re a beginner. You’ll probably use C#.

While Unity used to support UnityScript (which is basically a “dialect” of JavaScript), it began phasing out support for UnityScript in 2017, leaving C# as the strongest contender.

C# is a great language to learn first if your goal is to be a game developer. It doesn’t have to be difficult. Unity has some of the most robust documentation I’ve ever seen. They have tutorials like no other.

Another reason to learn C#: Microsoft. If you want to built Microsoft applications, C# is your language.

PHP

PHP is a scripting language, and it’s a bit underrated, considering the fact that 80% of the web is powered by PHP. It’s pretty well known for being the foundation of WordPress themes, so if you’re interested in creating custom themes, you’ll have to get comfortable with PHP.

You can do a lot with PHP. It just feels like a weird language to recommend as the first one because it probably won’t be enough to meet all of your programming needs. PHP has its limitations, but it is in fact very easy for a beginner to learn.

There are a lot of other languages out there, and this is not meant to be an all-encompassing list.

If there’s enough interest, I’ll update this article with more languages. Just remember one thing: every developer has a favorite language, and every developer will tell you to learn that language first.

But you are not every developer.

You should start with the language that makes the most sense for you once you’ve figured out exactly what you want to do. Don’t drop $18,000 on a bootcamp that teaches JavaScript (no matter how amazing JavaScript is) if you know that you want to make mobile apps.

Let’s talk about impractical programming languages.

I’m not going to name any names, but if you stumbled upon a “cool language” and you have no idea what it’s used for, chances are that it’s not a good first language to learn.

This includes “legacy” languages. If literally nobody has used a particular language in decades, don’t make it your first programming language. It’s like trying to learn Aramaic as your first foreign language. You won’t find enough documentation to get past the “beginner” level, and people will roll their eyes at you if you try to use an ancient language during a coding interview. I’m just saying.

Be practical.

The best first language is the one that does what you need it to do.

For more of Keri’s writing, be sure to follow her on Medium.

RELATED ARTICLES

Join us for an insightful episode where we dive into the transition from student life to the corporate world with two recent graduates who now...
The secret to making your tech cover letter remarkable is to infuse it with genuine excitement about the position you're eyeing.
One of the fundamental reasons for the growing skills gap in the tech industry is the lack of diversity and underrepresentation of certain groups, including...
With over 700 programming languages in existence today, it can be a challenging task to know which programming language is right for your career. In...