Posts
    All Posts
    Explore
    Technology
    Work
    Books

What Programming Language Should I Learn?

April 20, 2020

So.Much.Code.

Recently, I’ve been getting frequent questions on which programming language a beginner programmer should learn. This is an interesting question because many programming languages might be excellent in helping a novice developer understand code, but at the same time, they are not very applicable in the “real world.” Let’s check out some of the most common languages I get asked about to see if they are leading you in the direction you want.

Python

This is by far the most common language people tell me they started to learn, and I think there is a good reason for that. Python’s greatest advantage is its intuitive nature. Let’s take, for example, the case where we want to print something to the console. In python, that will look something like this:

print("Hey there!")

While in another language, take java, for example, it would look something like this:

System.out.println("Hey there!")

Not only that, but python also doesn’t require much syntax in terms of writing methods. While many programming languages require a delimiter like a semicolon ; to end a line of code, python doesn’t use anything.

On a similar note, code blocks in a language like java are surrounded by { ... } while the only real way to define different blocks of code in python is through indentation. Here is a simple example of a method that adds two numbers in python vs java:

Python:

def add_two_nums(number_one, number_two):
 sum = number_one + number_two
 return sum

Java:

public int addTwoNums(int numberOne, int numberTwo) {
 int sum = numberOne + numberTwo;
 return sum;
}

Now that we have heard some awesome things about python, there must be some cons, right? In short, yes, there are.

Though Python is intuitive, I have a harder time finding jobs (aside from data science/machine learning jobs) that use it in comparison to a language like Java or JavaScript. For example, if you would like to build a web app, there is mainly one framework used for this: Django… and again in my experience, not many companies use it if you were thinking about getting a job using it.

That all being said, companies do use python for their back end. Additionally, if you are excited about data science and machine learning, python is commonplace in those realms.

Java

Now that I’ve already given you a bit of an introduction to the java syntax above, let’s check out some possible reasons for you to give it a shot.

Very often in schools, java is the programming language of choice. I believe the reason for this is because it is has a good balance of intuitiveness as well as applicability. It’s relatively intuitive because of it’s strictly typed (when you define it to contain a specific type of value, say integer, it retains that for its entire scope), and it’s usually very explicit in what it is doing.

We can take, for example, a function in Java:

public int multiplyStuff(int numOne, int numTwo) {
 int product = numOne * numTwo;
 return product;
}

and see the difference in JavaScript:

const multiplyStuff = (numOne, numTwo) => numOne * numTwo

Both of these functions are doing the same thing. Namely, they are both multiplying two integers passed through and return them. Notice how you can follow each step in java, but it is a little more challenging to do so in javascript. In java, you can see where the product is returned, but where do they return it in javascript!? For one-liner functions like this, the return statement is implied…Sorry 🤷🏻‍♂️.

Another reason java is great is that it’s widespread throughout the tech industry. You can find companies new and old using it. However, similar to python, it’s not ideal for web development…though companies do use it for android app development!

JavaScript

The last language I want to bring forward is JavaScript. This is usually not the language people talk about as their first, but I believe the rewards of learning it far outweigh the headaches it may cause.

Remember the one-liner I mentioned earlier? Though it might not be intuitive, it also has its share of benefits. The one-liner function makes things cleaner (things can get messy in javascript) and easier when you become more advanced. Rather than writing the classic function declarations that a language like java might require, it’s quick and simple.

Another huge benefit of javascript is what you can do with it. There are many frameworks out there to use javascript for web app development, mobile app development, etc. For this reason, there are a lot of companies hiring people who are good at javascript.

In addition to some of those cool things you can do with javascript, it also runs in every big name web browser. Safari, Chrome, Firefox…you name it. This makes it an extremely versatile programming language that can reach across operating systems easily.

On top of that, javascript is a tried and true programming language. It has stood the test of time, and it is even having an uptick in popularity as of late.

So what do I recommend?

As you can tell from my section on javascript, I think it’s fantastic. But does that mean it’s right to learn for a beginner programmer?

Like most programming questions, the answer is “it depends.” Which programming language you choose is truly reliant on what your goals are through learning it.

If you are interested in learning more about data science, machine learning, deep learning, etc., then I would say choose python. There are plenty of resources out there to help you get up and running with machine learning. One good resource is DataCamp. It has plenty of free tutorials that guide you step by step through getting started.

What if you are interested in building a web app? An easy way to start is to work with html, and css, but that doesn’t get you very far. I believe this is a tough decision between Java and JavaScript. On one hand, java is easier to learn, and it can be used for back end web development, but javascript is more applicable to web development. For these reasons, I would recommend learning javascript.

Regarding app development, it’s another tough decision between java and javascript. However, I would advise starting with java. The reason I suggest this is because java is easier to learn (as I mentioned earlier), and you can get started with android development right away. That being said, I believe it would be wise to learn javascript in the long run because you can use a framework like React Native where you can develop a mobile app for both ios and android.

What if you just don’t know what your goals are, and you just want to code? In this case, I recommend java. The reason I recommend java and not python is because both are some of the easier languages to learn, but it is much easier to go from learning java to python than python to java. Java was the first programming language I learned, and I can speak from experience when I say python is a piece of cake. At the same time, I have friends who started with python, and they can get very sloppy with their code syntax because python’s is minimal while java is stricter. I will also add that learn javascript as soon as you feel comfortable with whichever starter language you choose. It will help you with many projects you may want to pursue in the future.

All in all, I will say that if you are trying to figure out your first programming language to learn, don’t stress too much about it. If your goal is to become a software engineer, then trust me when I say you will learn many programming languages. Your first programming language does not come close to defining you as a software engineer.

What matters as a software engineer is solving challenging problems, and you can do that regardless of the language you choose.


Hi, I'm Phillip. I'm a developer on the east coast who loves clean code and hacky solutions (ironic). You should follow me on Twitter, connect with me on LinkedIn, and check out my projects on GitHub.

© 2020 The Everyday Developer

Crafted with by Phillip