DEV Community

Cover image for The BEST programming language to learn in 2022
Luis Juarez
Luis Juarez

Posted on

The BEST programming language to learn in 2022

We've all been there! Starting out, it's hard to know what's what with programming languages. And there's so much hype around this language or that, and it makes it seem like the language you are not learning has all the greatest features and will let you build 10x faster with no bugs. I'm hoping I can give some perspective on the 'why' behind all these programming languages.

There are so many languages, how do computers understand it all?

There is really only one language that matters, machine code. I am referring to binary, 0's and 1's, that a microprocessor computer chip utilizes to perform an action. That is the only thing computers really understand. But it isn't realistic to write out these 1's and 0's by hand. Instead researchers figured out a way to have functions that convert to binary.
ย 
This first layer between binary and programming language is called assembly and it is still very abstract to the programming languages you are probably used to. The next step of this evolution is what we consider "low level" programming languages. C++ for example is considered low level because it is closer to assembly than something like Objective-C or JavaScript.

These high level languages have to be translated from a function like

print("hello world") 
Enter fullscreen mode Exit fullscreen mode

to

mov  dx, msg      ; the address of or message in dx
mov  ah, 9        ; ah=9 - "print string" sub-function
int  0x21         ; call dos services

mov  ah, 0x4c     ; "terminate program" sub-function
int  0x21         ; call dos services

msg  db 'Hello, World!', 0x0d, 0x0a, '$'   ; $-terminated message
Enter fullscreen mode Exit fullscreen mode

and it would further break down to something like this

b8    21 0a 00 00   
a3    0c 10 00 06  
b8    6f 72 6c 64  
a3    08 10 00 06  
b8    6f 2c 20 57   
a3    04 10 00 06   
b8    48 65 6c 6c  
a3    00 10 00 06   
b9    00 10 00 06   
ba    10 00 00 00   
bb    01 00 00 00   
b8    04 00 00 00   
cd    80            
b8    01 00 00 00   
cd    80           
Enter fullscreen mode Exit fullscreen mode

All of this to illustrate the fact that there is no 'best language' overall. Just depends what you want to build.

You will get a lot better at programming if you spend more time coding than trying to optimize your learning, so try not to get hung up on the "best"

ย 

The Answer

It doesn't matter what language you learn, because it all gets converted to binary machine code anyway by the compiler or interpreter. My advice is to pick one language and stick with it as long as you can. It is very tempting to try new languages but syntax changes will only get in the way of gaining a deeper understanding of software architecture.

Lately though, JavaScript is becoming very popular because of new frameworks and compilers that allow you to write JavaScript and it gets converted to something else (see React Native for an example).

If you DO have an idea of what you want to build, here is my opinion of where to start

Building websites - JavaScript / PHP
Building Web Apps - React
Building iOS Mobile Apps - Swift
Building Android Apps - Java
Building Back End - Java / Spring

Top comments (0)