DEV Community

Cover image for How to Choose Your First Programming Language?
Amr Saeed
Amr Saeed

Posted on • Originally published at amrsaeed.com

How to Choose Your First Programming Language?

One of the questions that are frequently asked by new programmers is:

There are tons of programming languages, how to make sure I am starting with the most appropriate one?

The answer to this question has been a debate for a long time. Some experts may tell you to start with C++. Other experts may prefer Python over C++ for beginners. You also may hear different opinions from people in the industry to start with a programming language like C# or Java.

“I’m confused, is there only one correct approach?”

The answer is no. The fact is that most experts prefer some approaches based on their personalities and perspectives. You’ll find that most of the people who suggest C++ tend to start with the details first. Learning C++ first is like trying to drive a manual car. On the contrary, python is very easy to learn, so some people prefer to start with it for that reason. It’s like trying to drive an automatic car. Some other people like to learn programming through projects as they get bored so quickly. So, they try to start with a language like Java to create Android applications or start with a language like PHP to create web applications.

Now, after knowing the secret behind those different opinions, we’ve to choose your first programming language. To do that, we’re going to divide people into three groups. You’ve to determine which group you fall into and start with one of the suggested languages under this group.

The three groups are:

  1. You’re a computer science student or have a long-term plan.
  2. You want to get a job as soon as possible or have a short-term plan.
  3. You want to do programming as a hobby or to teach your child.

You’re a Computer Science Student or Have a Long-Term Plan

If you’re a computer science student or a person who decided to enter this field with a long-term plan that can take more than one year, your objective has to become focusing on the basics of computer science. You’ve to become a person who can learn any technology easily regardless of its complexity. The languages that help you to achieve that objective are languages like C++, Java, and C#. Those languages help you to learn the basics of computer science such as Object-Oriented Programming, Data Structures, and Algorithms in a detailed manner. Learning those types of programming languages makes it very easy for you to learn modern programming languages such as Python in the future. That’s because you’ve already started with the hardest and most detailed ones.

Personally, I prefer C++, and it’s the one I’ve started with when I was in college. It’s fast, flexible, and has some important features that don’t exist in many languages. It also teaches you several concepts that are related to memory. But it’s okay if you’re a student whose college decided to start with Java or C#, you won’t miss a lot as they have similar syntax.

You Want to Get a Job as Soon as Possible or Have a Short-Term Plan

If your first priority is to get a job as soon as possible or you have a very tight time plan which may take less than a year, the best option for you is to study a language which is related to some track of your interest.

For example, if you’re interested in Mobile Development, you can learn languages like Java or Kotiln. If you’re interested in Web Development, you can learn languages like JavaScript, PHP, Python, or Ruby. Notice that languages like JavaScript or PHP are not the most suitable languages to learn programming concepts such as OOP and Data Structures comparing to C++ or Java. So, when you start learning any one of them, you’ve to make sure you’re following the best practices and not writing a bad code.

Also, you’ve to know that even if you’re focusing on a specific track, you’ve to focus on the programming concepts as much as you can. The difference between you and the person who decided to follow a long-term plan is that you’re learning the concepts through your specialization directly. You may not face all the programming concepts they will but, you’ve to make sure you understand the concepts you study. And if you have time in the future, try to learn those concepts separately.

You Want to Do Programming as a Hobby or to Teach Your Child

If you want to do programming as a hobby or you want to teach your child programming, python is the clear winner for that purpose. The basics of this programming language are very easy to grasp. It will help you to learn the fundamentals of programming without facing the syntax complexity of other programming languages such as C++.

This is an example of a code written in C++ which prints “Hello World” on the screen:

#include <iostream>

using namespace std;

int main()
{
    cout << "Hello World";

    return 0;
}
Enter fullscreen mode Exit fullscreen mode

This is the equivalent code but written in python:

print("Hello World")
Enter fullscreen mode Exit fullscreen mode

You can see that the Python code is very short compared to the C++ one.

Now, we’ve reached the end of this article. But, you’ve to know that It’s always preferable to have a long-term plan so that you can practice the different concepts. But if you don’t have this option, try to pick one of the two other plans and work hard to achieve what you want.

One last note, these are some useful resources I personally tried. They can help you to learn the programming language you want:

And always remember that “practice makes perfect”.

Top comments (4)

 
shadowtime2000 profile image
shadowtime2000

One of the worst things with it is that and integer set to 1 equals a string set to "1" and vise versa.

Maybe you should look into stuff like that because === instead of == is a better practice because even though 1 == "1" is true 1 === "1" is not true. Many people use === instead of == so your point doesn't really work there.

Collapse
 
amrsaeedhosny profile image
Amr Saeed • Edited

Totally agree with you. JavaScript isn't the most suitable language to start programming with. New programmers can fall into bad practices using it without even knowing that. So, my personal recommendation is always to start with C++.

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
bias profile image
Tobias Nickel

or you just pick JavaScript.