General

Top 9 programming languages for a new coder. Which programming language should you learn first?

With so any programming languages out there, it could get confusing on which programming language to pick up first, especially if you don’t know how to code yet and want to pick the first programming language.

For myself, I’ve learned Quick Basics first, then picked up C++, and a little bit of Assembly.  Then when I went to college, I’ve picked up Java, Fortran, Perl, Visual C++, a script language called Kix.  When I founded my first company, I picked up Javascript and PHP, and when I started Coding Dojo, I’ve picked up Ruby, Python, C#, Objective C, Swift, Node, and a few other programming languages.  Overall, I’ve been coding since I was eleven, which means I’ve been coding for the last 28 years (as of 2019).

If you were to ask me, when I was in college, what programming language is best to learn, my answer would have been quite different than my answer today.  Back then, I would have said C++ but now I would cautiously recommend someone to start with Javascript.  All languages have pros/cons but some languages are better for a beginner to learn than others.

Before I talk about why I think Javascript is a good language for someone’s first programming language, let me give a high level overview of each major programming languages, difficulty to learn, where it’s used, and a short description for each.

Okay.  Now that you have this overview, let me elaborate more on why I think Javascript is a good language for someone to study.

1. Using Javascript/Node, you can create a full web and mobile application

Most back-end programming language such as Python, Java, C#, Ruby, and PHP, if you want to use them to create a web application, you will also have to learn Javascript to create the front-end.  The front-end is basically what the users see when they browse the web and back-end is what happens behind the scene (e.g. when you buy items from the shopping cart, etc).  Javascript is the de-facto language used for front-end work and handles all the user interactions.   If you want to create a full web application, if you have to learn Javascript anyway, why not learn Javascript as your first language?  In addition, now with Node (think of Node as Javascript but where it’s now used to also create back-end), you can create both full web application (both back-end and front-end) using Javascript!  Recently, using React native and other tools, you can even create a native mobile application using Javascript.  It used to be that you had to learn Javascript for the front-end, another language for the back-end, or learn either Java or Objective C/Swift if you wanted to create a mobile application, but now you can actually use Javascript to do all three!

2. Javascript is a great introductory language

Javascript, although fundamentally it’s very different from the other programming languages, still follows a lot of the C family syntaxes.  If you learn Javascript, the syntaxes will be familiar especially when you switch over to another C family language such as C++, C#, Java, or PHP.   I also personally like using curly brackets to start and close functions (Python, and some other programming languages you can skip some of these steps).  I think it also builds discipline to follow stricter syntaxes when it comes to curly brackets and spaces.  Declaring whether a variable is a string, integer, float, etc, I think is too much for a complete beginner and fortunately with Javascript, you don’t have to worry about this.  You can worry about these later when you learn a stricter language like C#, C++, Java, etc.

Also, because most developers who are involved with web programming all know a bit of Javascript (again as all web application require Javascript for their front-end), it’s also easy for someone who knows Javascript to ask other developers for help, even if that developer is not that familiar with Javascript.  The basics of programming still remain and it’s easy to get help if you’re stuck on Javascript.

3. Sockets – Javascript is great for building real time applications

Here, I am using Javascript and Node.js interchangeably.  One of the greatest strength of Node is how you can easily build an application that handles what is called a socket.  Using sockets, you can create real time application that can handle hundreds of thousands of live users whereas other traditional programming languages such as Java, C#, Python, PHP, and other languages are not quite suited to handle these real time data handling.  For example, think about building a web application (e.g. realtimescores.com) where the user, without having to reload the page, sees the scores of all the live games that are being played and whenever the score changes, have that portion of the page update.  Also imagine how it would support all the current users talking to each other through a live chat.  A traditional web server using Java, C#, Python, PHP, or Ruby could handle hundreds of live users.  This is most often done by a technology called Ajax.

A node server on the other hand are built a bit differently and could easily handle hundreds of thousands of live users!  That’s about 1,000 order of magnitude higher than all the other back-end languages!  The down-side is that the framework for Node, in my opinion, is not as mature as mature frameworks such as Django (for Python), Rails (for Ruby), Laravel or CodeIgniter (for PHP), but for building real time services, I don’t think anything beats the performance of a node server.  As a lot of web applications are moving to this real time update, it’s not a bad idea to learn Javascript and learn how to do socket.  Python and other programming languages do have frameworks that offer these sockets, but based on a few that I’ve tried, they didn’t seem as mature or robust as a simple node server.  Again, a lot of the statements above are generalized as this article is again for someone who’s a new coder and to go really in depth would require a much lengthier article.

Other Articles you may be interested in reading

  1. Can anyone really learn how to code?
  2. Which is better?  Knowing one programming language or multiple languages?
  3. Syntax differences between Javascript, Python, Java, C++, Ruby, and PHP
Michael Choi
About author

Founder of Coding Dojo and Data Compass.

Leave a Reply

Your email address will not be published. Required fields are marked *