DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for What Programming Language to Learn First πŸŽ“
Youssef-mic
Youssef-mic

Posted on • Updated on

What Programming Language to Learn First πŸŽ“

What programming language to learn first?
This question has haunted philosophers since the dawn of man, hundreds of options, and there is no best one.
So today I’m gonna take you on a tour to decide.

So, to simplify let's see programming languages that you should never learn as your first language:

  • C/C++

Yes, yes... I know you may tell me:
But those are the best languages to learn because you learn how to operate with memory and bla bla bla. But isn't it too complicated for beginners, it’s also dangerous, stuff like memory leaks can cause hazards, so for my sake please look for alternatives.

  • Java/C#

So as a beginner why the hell would you learn a boilerplate-driven language that relies on OOP which (for me is complete nonsense) life is too short to code with these languages. C# is hard to avoid for game development but throw Java in the trash ok?

  • Rust

Rust is a gorgeous language in my opinion but for beginners learning it is truly a crime like C/C++ it provides so much low-level control and also the way it deals with memory is complicated.

Now we remain with a few that you should choose from in my opinion:

  • Python

One of the most popular, but you might be surprised why it’s not the best. You can see why in this article JavaScript vs Python

  • Lua It’s the most underrated language, in my opinion, it is easier than python with 21 keywords and is pretty powerful, but still not the best choice.

You have been waiting for this are you ready?
πŸ₯πŸ₯
Don’t hate me for that but it’s

  • JavaScript:

It’s the language of the web and has a way of doing everything with no excuses also JavaScript has a classical curly brace syntax and needs no setup at all.
It might be a bit tough to debug but this is better to use it without a full IDE like Pycharm or IntelliJ

I'm okay with other opinions so what do you suggest no I am not a professional guy so take my words with a grain of salt.

Top comments (21)

Collapse
maylau profile image
May Lau

I will say depends on what you want to do. If you just want to play around web or you dont know why you learn it, then go for js. If you want to play with mobile, then kotlin or swift or dart. If you want to make you life harder, then go for C++.

After all, you will find that their syntax are geting more and more similar in recent years. You know one language well, you can pick up another's basic knowledge very fast. The most important thing is given you a reason why you have to keep learning it.

PS: I have started with js when i was 12 and the reason was I just suddently wanted to make a website to show off to my brothers. πŸ˜‚

Collapse
youssefmic profile image
Youssef-mic Author

Good, also it's easy to build your first project fast with JavaScript

Collapse
lexiebkm profile image
Alexander B.K.

If Pascal were still alive....
It was once the best one for introducing programming language.

Collapse
youssefmic profile image
Youssef-mic Author

It looks like Python. I have never tried it!

Collapse
lexiebkm profile image
Alexander B.K.

I dislike the use of indentation for code block in Python. It is one of the reasons that hinder me to continue on learning it. The other one is people use reptile for the mascot/logo for the language. Guido von Rossum said that the name of Python he picked was inspired by a circus figure called Monty Python; it had nothing to do with any kind of reptiles. I would like to see the logo be replaced by that circus figure.

Pascal uses begin....end statement for that purpose, which is also used in SQL. From Pascal, it wouldn't be too hard to proceed to C/C++ or Java/C#.

Collapse
christiankozalla profile image
Christian Kozalla • Edited on

Love that you had the courage to choose JavaScript! It truly is a great choice for starting to code.

I'd like to add to this by pointing out that starting to code for me was more like trying different languages on a very easy level.. Not trying to find the perfect language right away...

Just learning the syntax and write some basic (math and string ) functions. I remember I dealt a couple of weeks with Python, C and Go before I settled for JavaScript and got hooked :D

To judge a language you may even try it before!

Collapse
youssefmic profile image
Youssef-mic Author

True, happy you finally found peace with Javascript.😁

Collapse
smlka profile image
Andrey Smolko

Any language with static type system

Collapse
youssefmic profile image
Youssef-mic Author

Do you mean to learn first or to avoid learning

Collapse
smlka profile image
Andrey Smolko

Definitely learn first=)

Thread Thread
youssefmic profile image
Youssef-mic Author

No, but here I disagree!
Starting with something like typescript which is so strict is not that good, why don’t you start with a dynamically typed one and then go learn those????

Collapse
outofideasexception profile image
Ken

I've played around with C++, C#, and Python before I got into JavaScript. I was just thinking that if I had to start over, I would have gotten good with HTML and CSS, then focused heavily on JavaScript. Then I'd probably move to something like C#.

It feels more like a "Starting with the corner pieces and edges" way of building a puzzle than my previous way of just getting as many pieces as I can and sporadically trying to put it together.

Collapse
youssefmic profile image
Youssef-mic Author

Appreciate your opinion.

Collapse
cappe987 profile image
Casper

I knew this was gonna be a controversial post when I opened it. I'm not gonna hate you for choosing JavaScript. But your arguments for good and bad are very subjective, you don't even provide any arguments for why that makes them good/bad. And you only bring up the "bad points" of the bad languages and "good points" for the good languages.

I agree that Python is a good beginner language, JavaScript is fine as well if you're interested in web development. I don't have enough experience with Lua to comment, but using keywords as a measurement seems absurd. That actually places Python and C on the same place at 33 keywords. Most of the languages you mentioned works well for beginners, but it depends on ambition and to some extent how stubborn you are to learn it. A hobbyist might be better off learning Python, while someone who actually aims to get a job in embedded system would be better off working a little harder to learn C.

Reasons for why Python is good is that it has a simple syntax, making it feel beginner friendly. It being dynamically typed may be considered good in some cases, but it also has a bad side. Good is that it's flexible and not as strict. Bad is that it may create hard to track down bugs and results in code that is harder to read. Statically typed languages on the other hand may be a bit more daunting to start with, getting yelled at by the compiler. But it teaches you to plan out your code and structure it well. Statically and dynamically typed are two sides of the same coin. Different benefits and drawbacks.

OOP which (for me is complete nonsense) life is too short to code with these languages. C# is hard to avoid for game development but throw Java in the trash ok?

Don't base opinion on lack of understanding.

And finally, memory leaks are not an immediate hazard. It's usually only an issue for long-running programs. Leaked memory is freed safely when a process finishes. Plus there are programs (e.g., Valgrind) to check for leaks.

Collapse
youssefmic profile image
Youssef-mic Author • Edited on

Thanks for your opinions. And most of the time I write here my opinions and I don’t force anybody to use them πŸ˜‰

I'm okay with other opinions so what do you suggest no I am not a professional guy so take my words with a grain of salt.

Collapse
omar_dev profile image
omar.dev

javascript is like a tomato, it fits with everything.

random dude on dev.to community

Collapse
youssefmic profile image
Youssef-mic Author

Facts!!

Collapse
peteole profile image
Ole Petersen

I would actually like to know how things would have gone if I had learned Rust as my first language. It could have been overwhelming or I would have learned the right concepts from the beginning...

Collapse
youssefmic profile image
Youssef-mic Author

It will have made you hate your entire life and question your existence!

Collapse
danielcristho profile image
Daniel Pepuho

True!

Collapse
youssefmic profile image
Youssef-mic Author

πŸ˜‰

🌚 Browsing with dark mode makes you a better developer.

It's a scientific fact.