What programming language should you learn first?

Perhaps the most common question among new developers or people looking to enter the field. And definitely the one I get most often!

It's a great question too. With so many different languages to learn, how would you know which one to focus on? You don't want to pick "wrongly" and spend time learning a language you don't enjoy or that doesn't have job opportunities. But you also can't spend all your time looking for the perfect language without getting anything done.

The way I see it, your first language isn't that important. As you get deeper into development, you realize that all programming languages are fundamentally very similar; they all have variables, loops, conditional statements etc. The concept of functions or classes remain mostly the same across languages too, so learning one provides you some easily transferable skills.

With that said, that answer is also kind of a cop out. If your goal is to get hired ASAP, your choice of language does make a difference. There's no universal "best first language", but here is a (somewhat subjective) list of the language(s) I would start with depending on your field of interest:

  1. Front-end development: Start with HTML and CSS, then move to JavaScript.
  2. Back-end web development: Pick either Python, PHP or Ruby.
  3. App/mobile development: Swift for iOS, Java or Kotlin for Android.
  4. Machine learning or data science: Python or R.
  5. Operating systems/IoT development: Start with C.
  6. Game development: Either C++ or C# with Unity.
  7. Windows desktop applications: Go for C#.

Just remember that whichever one you pick doesn't have to be the one you use forever. I started out learning Java and C#, before I realized that my real passion was in front-end development - then I switched entirely to writing JavaScript. And it still holds true that skills can be transferred rather easily between languages, so don't sweat it if you feel like you picked the wrong starting point.