Codementor Events

A Senior Engineer at Google Reveals “The Best Programming Language To Learn in 2022”

Published Jan 26, 2022
A Senior Engineer at Google Reveals “The Best Programming Language To Learn in 2022”

I am a senior software engineer at Google Singapore and very often I am asked about which programming language to learn.

Import notice: This article has been imported from my medium blog article: The Best Programming Language To Learn in 2022 - read the article here for full info

Sometimes this question manifests as “Should I learn Java, Python or JavaScript?”
To be completely honest, I decided to write this article after reading a take on the same question by Eric Von Reinhard in the article

The Best Programming Language To Learn in 2022? — Google Lead Developer Explains.

In fact, I decided to write about this because I have a very different opinion about this question, so please don’t mind the inspired title.

So, Which One?

I recommend “no specific one”.

It doesn’t matter if you start with C++ or Java or Python or Javascript or any other language for that matter. Learning a new language doesn’t take long and it shouldn’t be a #1 priority either.

Programming languages are means to the end (there I said it, again!) and in practice we tend to keep switching to one or the other which gets our work done.

I started my journey with C++ in high school, spent a lot of time doing Javascript in university. My job at Microsoft required me to do a lot of C#/.Net and Typescript and when I switched over to Google I started working on Android Camera App — so I started to work with Java. Soon I switched over to computational photography aspect of the camera and these days I write a lot more C++ (production code) and Python for prototyping.

And throughout this journey the cost of learning a new language was never high.

I have to admit over time we have built different “kinds” of programming languages in terms of how they are used. A few languages are used purely for markup like HTML or XML, while others are purely for scriptings like shell script or bat scripts, some are functional in nature others are not, and so on.
There might be a certain learning cost involved when switching over from one “kind” to other. Having the fundamental understanding of these “kind” will make this barrier to learning a new language very thin.

Wait…Then What Do We Focus On?

In my honest opinion, the most important skill to work on is —the ability to address any given problem statement

  • If it’s supposed to be a web application, can you build it?
  • You have an Android App, can you improve performance?
  • You have a problem that’s potentially addressable with a trained neural network — can you go ahead and do it all?

Even if you have “never” worked on it before! And what ever programming language it takes to get done!

In the end, it’d all feel the same, so go ahead and focus on learning new technologies, try to dig deeper into concepts that look like magic, in the beginning, try to explore many different genres until it all starts to look the same. Eventually, pick something that you really like and go deep!

Ok, But Some Specific Recommendations Would Have Been Great!


For the readers who bothered to read all the way up-till here, I feel like I should give more direct recommendations! (I am not sorry!)

If you are just starting to learn programming

I would recommend picking up a kind of technology you want to work on — it could be web, it could be mobile (Android / iOS), it could be game development, it could other app development, it could be training ML models, building desktop apps and so on.

But the crux is to pick up a technology and learn the relevant languages there. Learn by building random software if possible and spend a good time at it.

If possible continue to question how different magic you see are actually working.
Eventually, start digging around more fundamental concepts that are being abstracted by the libraries you are using like concurrency or multithreading, databases, graphics rendering, image processing, networking etc.

You see, a program we write in any language is either directly compiled to assembly instructions or to intermediate byte-codes which eventually again gets compiled to assembly instructions for the hardware to execute. If you accept this fact, syntaxes across the languages will start to look very similar.

A certain requirement, say “Increase every value of the array by 1” can be handled in different syntaxes:

In Python:

y = [i + 1 for i in x]

## or

for i in range(0, len(x)):
  x[i] = x[i] + 1

In Javascript:

for (var i = 0; i < x.length; ++i) x[i]++;

// Or

var y = x.map(val => ++val);

// Or

var y = Array.from(x, val => ++val);

Or in Go:

for i:= range x {
  x[i]++
}

All of these more or less compiles to something like:

increment(int*, int):
  cmp     w1, 0
  ble     .L1
  mov     x2, x0
  add     x1, x0, w1, sxtw 2
.L3:
  ldr     w0, [x2]
  add     w0, w0, 1
  str     w0, [x2], 4
  cmp     x2, x1
  bne     .L3
.L1:
  ret

What's more interesting here in the series of examples is that a certain few of them lead to array copy while others don’t — and I’d recommend focussing on learning more about those types of issues and their impact on the program.

If you are experienced and proficient in certain programming languages but feel that you are missing out

I’d still recommend the same —take a step back and think of the kind of problem statements that excite you. Then think of what are new means to the end you need to learn.

For example, while working on the Camera App I got opportunity to work on a “Night Mode” in the Camera App, which requires us to capture a burst of images and merge them in robust fashion to produce a well exposed and low noise image. This is computationally very expensive and we needed our algorithms to run on resource-constrained hardware within a certain latency budget.

This was a very exciting problem statement for me and required me to re-learn modern C++, image processing concepts etc.

But it was so much fun, that the effort spent on learning didn’t feel like a bother. I’d recommend finding such directions and start learning what ever it takes.

TL;DR; Don’t bother to find one programming language that would be your bet for 2022.

Want to Connect With the Author?

This article was originally published at The Best Programming Language To Learn in 2022 - read the article here for full info.

Subscribe to Medium using my membership link (I'll earn a small commission).

Discover and read more posts from minhaz
get started
post commentsBe the first to share your opinion
Show more replies