Home/Blog/Learn to Code/Which programming language should I learn first?
Home/Blog/Learn to Code/Which programming language should I learn first?

Which programming language should I learn first?

Fahim ul Haq
6 min read

Become a Software Engineer in Months, Not Years

From your first line of code, to your first day on the job — Educative has you covered. Join 2M+ developers learning in-demand programming skills.

I’m Fahim, a software developer turned tech founder. This article is part of my series: The Developer’s Launchpad. I’ll share my top lessons, hacks, and best practices for learning how to code and launching a new career — things I wish I would’ve known earlier in my journey. If you’re starting out your own coding journey, this series is for you.

When new coders ask me the question, “Which programming language should I learn first?” I often think about Coke vs. Pepsi.

The debate between Coca-Cola and Pepsi is alive and well. Everyone has their own personal preference, and there’s no “objectively correct” answer.

Similarly, when it comes to the best first programming language, individual preferences usually precede facts.

At the end of the day, human beings are different. Many successful developers might tell you to start with JavaScript, while tons of brilliant programmers swear by Python. Meanwhile, plenty others might advocate for Java, C++, or Ruby, just to name a few.

I’m not here to tell you which language is right for you — although in this article I will share pros and cons for a few popular options, so you can make a more educated choice.

But what I can tell you is this: Once you get the hang of basic problem-solving and coding in one language, you will have the right foundation to learn many more languages down the road.

So, let’s get into the pros and cons of three popular languages:

  1. Python
  2. JavaScript
  3. Java

I will dive into each language later, but to start, here’s a table breaking down the key differences between three popular languages:

Python vs. JavaScript vs. Java

Language

Use Cases

Pros

Cons

Python

  • Backend development
  • Data Science
  • Machine Learning
  • Simple to get started
  • Intuitive
  • Versatile
  • Lots of freely available libraries


  • Less applicable for web development
  • Can be slow for big projects

JavaScript

  • Web development
  • Creating interactive experiences
  • Intuitive and easy to understand
  • It’s the language of the internet


  • Not as useful outside of web development
  • High abstraction may make learning other languages harder

Java

  • Enterprise-level web development
  • Android app development
  • Powerful
  • Popular at many top companies


  • “Wordy”
  • Less intuitive than Python or JavaScript

Python as your first Programming Language#

Within the last several years, Python has replaced JavaScript as the world’s most popular programming language. Therefore most new learners probably gravitate towards Python as their first language.

Python is a great choice for beginners because it’s relatively simple, yet powerful enough to build planet-scale applications supporting billions of users. It’s a higher-level language than C/C++ and Java, so things are more abstracted (i.e. it hides a lot of underlying complexity, making it easier for humans to read) — without losing much power. Best of all, it’s pretty intuitive to get started in Python.

If you aspire to become a Data Scientist, Python is the strongest option. One of the best things about Python is that it comes with tons of open source libraries that can help you use Python in tons of different situations, from Machine Learning to natural sciences.

However, Python is only my second choice if you are interested in web development — especially front-end web development (more on that next).

Here’s a link to get started with Python.

JavaScript as your first Programming Language#

If Python is not spicy enough for your tastebuds, I recommend using JavaScript.

JavaScript is the programming language that is powering most websites today. If you are planning to build websites, pick JavaScript. Most web developers use JavaScript, along with HTML and CSS. This is essentially how you make and design webpages.

Here’s a quick example: If you want a button on your webpage, you would use HTML to create that button. If you’re going to color that button, you should use CSS. But when it comes to the actual action that needs to happen when you click the button, that’s JavaScript.

You may have also heard from someone that you should learn React or Angular. These web development technologies are actually built on JavaScript.

JavaScript is super abstracted, meaning that it is very easy for humans to read. Unfortunately some of its abstractions are difficult to reconcile when you start working with other programming languages in the future, but that’s a discussion for another day. You can go a long way just by learning JavaScript.

Get started with JavaScript here.

Java as your first Programming language#

If you are in school for Computer Science, chances are that the first programming language you will encounter will be Java.

Despite the similarity in naming, Java and JavaScript are actually two distinct languages with very different use cases.

Java is a great overall language and focuses on the Object-Oriented Programming paradigm (something that you don’t need to worry about right now). The interesting thing is that in the first phase of your coding journey, you won’t need to use any object-oriented design principles, so learning Java would look pretty much the same as any other programming language — except for one key difference: Java is a typed programming language.

This means that you have to tell the type of each data that you use before using it. For example, you would have to tell the Java compiler if a certain data is a number or a string before you use it. That’s different from Python or JavaScript, which can infer the type of the data from the data itself.

You can start learning Java here.

And the winner is…#

If you have read to this point, you already know that there is no winner. We’re back in Coke vs. Pepsi territory. The answer is totally subjective, and depends on your personality and career goals.

But if you had to pick one, which one should it be?

If you are looking for a quick overall winner, go with Python. (That’s coming from someone who learned programming with C and still swears it’s the best language to learn coding). If you are ready to test the waters, you can get your feet wet with a free Python course.

That said, no matter which language you start with, here is the most important thing to remember:

Mastering the foundations of one language will enable you to more easily learn other languages down the road.

That’s why if you invest the time to properly learn your computer science fundamentals, it will enable you to learn any programming language in the future. In this sense, it doesn’t matter that much which language you learn first. The most important thing you can do when just starting out is to establish the right foundation.

This breakdown on the Educative blog explores several top programming languages, and might be a good resource for evaluating which is best for you.

More from The Developer’s Launchpad:#


  

Free Resources