/ Programming

Which programming language should a beginner learn first in 2019?

The main question anyone looking to get into programming asks is which programming language should I learn first. With a large variety of languages with different opinions about them, it makes it a daunting task for a beginner to decide.

There are several factors to consider when picking a programming language:

  1. What is your goal in learning to program?
  2. What do you want to build?
  3. Which is the easiest to learn?

The language doesn't really matter

A programmer is defined by his ability to solve problems, not by the language they code in. The main goal when learning to program is to understand programming concepts. The concept of programming is the same across all programming languages with the main difference being only the syntax and the platforms they support. Imagine speaking languages all having mostly the same grammar structure, just different words.

A good programmer would definitely have few languages in their arsenal. If you are planning to learn to programme for the long-term, you eventually have to know a few languages so one language isn't going to define you. Therefore, don't worry too much about which one you pick but it would be easier to start with one that suits your need.

What is your goal?

The first thing to know is what is your goal specifically for learning to program. It could be from the either:

  1. I want to build an iPhone app.
  2. I want to code a website for myself.
  3. I want to have a career in Software Engineering
  4. I just wanna learn how coding works.

Knowing these would help you a lot in deciding which programming you can get in to first. The languages are listed based on what your goal is in learning to code to help you choose which language would suit you most. They are rated based on:

  • Learning: How much it will help you learn programming concepts and make it easier to move on to other languages later on.
  • Versatility: The number of platforms and applications you'll be able to write in that language.
  • Easiness: The ease of learning for a beginner.

I just wanna learn to code (Python)

Python is often recommended as a first language as it provides beginners with a great first experience as it has a very clear and readable syntax. It was designed to be easy to read and to resemble everyday language as close as possible. Its simple syntax makes it easier to focus a bit less on the syntax and more on learning the concepts of programming.

for i in xrange(1, 101):
    if i % 15 == 0:
        print "FizzBuzz"
    elif i % 3 == 0:
        print "Fizz"
    elif i % 5 == 0:
        print "Buzz"
    else:
        print i

Say you are not really sure what you want to build but are looking for a good starting point to learn to programme, then Python is a great way to start. It is popularly used for creating web applications, games, and performing statistical analysis. Some notable companies using it are Google, Youtube, Dropbox, and Instagram.

Learning: 4/5
Versatility: 3/5
Easiness: 4/5

I want to build an iOS app (Swift)

Swift is one of the two supported languages to build an application for iOS devices, the other being its predecessor Objective-C. Swift was created as a replacement for Objective-C for building iOS apps that is modern, simple, and much easier to use.

for i in 1...100 {
    switch (i % 3, i % 5) {
    case (0, 0):
        print("FizzBuzz")
    case (0, _):
        print("Fizz")
    case (_, 0):
        print("Buzz")
    default:
        print(i)
    }
}

Xcode, the program used for creating an iOS app, comes with great features that make your programming experience much better. It assists you with fixing and improving your code and is very friendly to use. Newer iOS applications would most certainly be using Swift. If you are planning an app for your iPhone or iPad, this would be the way to start.

Learning: 4/5
Versatility: 1/5
Easiness: 4/5

I want to build an Android app (Java)

Java is the main language for programming Android apps. Kotlin is an alternative that was only recently introduced. However, Java is still the most widely used and it is also a great first language to learn. It enforces some core programming concepts that forces you to think like a programmer and help you move on to other languages later.

public class FizzBuzz{
	public static void main(String[] args){
		for(int i= 1; i <= 100; i++){
			if(i % 15 == 0){
				System.out.println("FizzBuzz");
			}else if(i % 3 == 0){
				System.out.println("Fizz");
			}else if(i % 5 == 0){
				System.out.println("Buzz");
			}else{
				System.out.println(i);
			}
		}
	}
}

Aside from Android, it is widely used in a variety of applications such as to make cross-platform desktop applications, web applications, and notably Minecraft. Some might argue that the syntax is "ugly" and that it would scare aspiring programmers from the field. However, if the Java syntax is enough to scare you, then you should probably consider a career change.

Learning: 4/5
Versatility: 4/5
Easiness: 2/5

I want to build desktop apps or games (C#)

C# is a language created by Microsoft for their desktop platform but has grown beyond that. Syntactically similar to Java, it is also a great language to learn to get into programming especially if you are looking to build desktop-based applications or games.

class Program
{
    static void Main()
    {
        for (uint i = 1; i <= 100; i++) {
            string s = null;
 
            if (i % 3 == 0)
                s = "Fizz";
 
            if (i % 5 == 0)
                s += "Buzz";
 
            System.Console.WriteLine(s ?? i.ToString());
        }
    }
}

Its use has also grown to cross-platform mobile application development using Xamarin and game development using Unity, both using C# as their scripting language of choice. It also comes with its own game libraries that are good too. It's a good place to get started for building Windows-based applications.

Learning: 4/5
Versatility: 4/5
Easiness: 2/5

I want to build everything (Javascript)

Javascript is the one language to rule them all. Initially, it started as a scripting language to be run on the browser but has then grown into a language used for a variety of applications.

var fizzBuzz = function () {
  var i, output;
  for (i = 1; i < 101; i += 1) {
    output = '';
    if (!(i % 3)) { output += 'Fizz'; }
    if (!(i % 5)) { output += 'Buzz'; }
    console.log(output || i);//empty string is false, so we short-circuit
  }
};

The great thing about it is that you can learn one language and apply it to a variety of places. You can write code for web pages, a back-end server using Node.js, mobile apps using React Native, desktop apps using Electron, and games in Unity.

One thing to note is that Javascript is messy and is difficult to write clean code for beginners. It can be hard to move on to different languages later one but it's a great language if you want to quickly get started to dive into building things.

Learning: 2/5
Versatility: 5/5
Easiness: 3/5

I want to learn the best but painful way (C)

Say you wanna start learning to programme the hard way but will make it much easier for you to learn other languages later on, a great starting point is C (not C++). It is mostly used for building operating systems and embedded systems.

#include<stdio.h>
 
int main (void)
{
    int i;
    for (i = 1; i <= 100; i++)
    {
        if (!(i % 15))
            printf ("FizzBuzz");
        else if (!(i % 3))
            printf ("Fizz");
        else if (!(i % 5))
            printf ("Buzz");
        else
            printf ("%d", i);
 
        printf("\n");
    }
    return 0;
}

It is a very simple language with relatively little features, which means you write most things from scratch. Every other language listed here is based on C and have its syntactical origin from it and they are all simply a simpler version of C.

It will become much easier to move on to other languages later on once you have learned C. However it is very tough early on as you have to deal with many low-level details such as memory management but will help a lot with your understanding much later on.

Learning: 5/5
Versatility: 2/5
Easiness: 1/5

How do I learn?

What you have to remember about programming is that it is a process of problem-solving. No one is going to sit down with you to give you all the answers and you will have to either figure it out and search for them yourself. There are several resources I can recommend to help you get started on your journey but you will have to explore them yourself.

Different methods work best for different people. For me when I started out I liked hands-on tutorial videos and Youtube has been a great place for that. Thenewboston's channel was my favourite at that time but there are some others that are great as well. If you prefer books, there a list of great free resources at Programming Motherfucker.

For online courses, I really recommend Udacity Introduction to Computer Science class to get started with learning Python and the basics of programming. They also include other courses such as an Android course. iTunesU has a great course by Stanford for iOS app development.

This is pretty much the list of resources I can personally recommend. Do search for other resources that are plenty online.

Good luck

Hopefully, you'll be able to pick a starting point for you to get started on your programming journey. Again I would point out that your choice of language doesn't really matter all that much as a language is just a tool of a programmer. Learning fundamental programming concepts should be the main goal and learning to choose the right tools should come after.

Wei-Ming Thor

Wei-Ming Thor

I am a programmer based in Kuala Lumpur, Malaysia. I write guides on programming and running a software business.

Read More