Programming_Language
Fastest Way to Learn ANY Programming Language

Fastest And Easy Way to Learn ANY Programming Language

This is how I learned to code in JavaScript, Python, and C++ by spending only a few weeks on each of them. But learning a new programming language was not always as easy as this. When I learned my first programming language which was Java, I spent months watching online tutorials and following along.

But when I joined Amazon, I delivered a project in Python within the first two weeks. I had never written a single line of code in Python before working on this project. Later when I joined Google, I quickly picked C++ to become useful to my team, and I have done this over and over again to learn languages like JavaScript, Go, and Dart.

But how am I able to do all this? Did I take some pill that made me a Python whiz overnight? Truth be told, it’s actually very simple. For thousands of years, great civilizations and powerful leaders have tried to uncover the secrets of learning a new programming language. To find the answer, we have to go all the way back to 1945.

World War II has just ended, and after winning the war, British want to spread English throughout the world. As you might already know, English is not exactly a very easy language to learn as a non-native speaker. So they created this simplified version of English called Basic English.

Basic English had only 850 words. For comparison, there are around 170,000 total words in English. In addition to fewer words, Basic English also had simplified grammar rules with a focus on basic sentence structures.

To popularize the language, British chose the state-owned radio called British Broadcasting Company or BBC, which created a show called English by Radio. This show taught basic English vocabulary and pronunciation to non-native speakers and was a huge success. But how could just 850 words and a few basic grammar constructs help people learn English? And can we use the same principles to learn a new programming language? To answer that, we need to know a few things about how the languages exactly work.

Imagine a circle that contains top 10% most popular words among the 170,000 total words in English. This circle contains words like I, Me, You, Eat, Drink, etc. And then we have another circle around it that contains the next 10% most popular words.

This would contain words like Overpaid and Programmer, which makes sense. And we can keep making these 10% circles until we cover all 170,000 words. In case you are curious, the outermost circle contains words like Ningampu and Teetotaller.

For simplicity, let’s combine the innermost two circles together and rest of the circles together. Now imagine that you start reading one of the best novels of our time called 50 Shades of Grey, which has a total of 150,000 words. What you’ll find is that 80% of these 150,000 words in the book come from the inner circle and rest of the 20% words lie in the outer circle.

For those who don’t know, this is also called Pareto principle. Pareto principle states that 20% of your effort results in 80% of your outcomes. And this is a very powerful principle.

This powerful principle is the main idea behind the basic English, as well as learning any new programming language really fast. I applied the same principle to learn French and now, je peux parler en Francais même en 100 marrons. Learning a new spoken language is one thing, but learning a language that computer understands is totally different.

Well, that’s not true. Let’s build the same 10% circles for the vocabulary of a programming language. What would be the top 10% most popular concepts here? I believe it would include different data types like int, float, strings, or array, etc.

Maybe if else statements and for loops would also be part of this circle. Maybe writing functions and classes would also be here. If you move outside to the next circle, you might have concepts like polymorphism and inheritance, etc.

And you can keep drawing these circles until you reach the outermost circle that might contain some very specialized libraries. Now, if you pick all the GitHub repos in the language of your choice, what you’ll find is that 80% of the code would come from this inner 20% circle. And following what we learned from basic English example, we’ll focus on this 20% circle first.

But as we do this, we need to be careful about two things. Number one, this 20% circle might vary a little bit depending on the language you choose. For example, in Java, you might have ArrayList, but we’ll call it just List in Python.

Or in JavaScript, you might have AsyncAwait, which might be very different from other languages. The point is, the top 20% circle might vary, and you would want to do your own research to find the top concepts in the language of your choice. Number two, when you’re learning these concepts, you need to change your method of learning.

If you were trying to learn a new spoken language, let’s say French for example, no matter how many movies or TV series you watch in French, you will not be able to speak in French unless you actually try to talk in French. In the same way, no matter how many lectures or video tutorials you watch in Python, you will not be able to learn Python unless you actually try to code in Python. In a video tutorial, you usually get the code that already works, and if you copy it, sure enough, it will work for you as well.

But programming is the art of breaking and fixing things. That’s why I recommend interactive learning instead of casual learning. For example, if you want to learn Python, you can go to learnpython.org and do exercises, break things, and fix them as you learn new concepts.

Similarly, for JavaScript, you can go to w3schools. I’m sure you can find this kind of platform in other languages as well. Now that you know what to learn and how to learn it, there are two problems left for us to solve.

How to remember what we are learning, and how to learn the rest of the 80% concepts in the after circle. To solve the first problem, we need to understand the Ebbinghaus forgetting curve. Hermann Ebbinghaus was a German psychologist who is well known for his work on memory and learning.

He conducted experiments where he would give himself some nonsense words to remember, and then test himself at various intervals to see how many of these words he could actually remember. What he found became the backbone of how we teach children in the modern school system. What you’re seeing is the famous Ebbinghaus forgetting curve.

This graph is a classical exponential decay graph. What this means is that right after we learn something new, we start forgetting it very quickly. The rate of forgetting slows down over time, and in the end, we only remember a fraction of what we learnt.

But what if I told you that there is a way to retain more of what we learnt? Ebbinghaus also studied the impact of revision on our retention. What he found was that if you review the words again, you can increase the number of words you remember in the end. And if you repeat this multiple times, your retention can keep increasing.

And this is called spaced repetition, which many of you might have already heard about. This is the reason why if you try to learn a new language using an app like Duolingo, they keep repeating the same words again and again in the exercises. But how do we apply spaced repetition to learning a new programming language? The answer to this question is also the answer to the second problem that we still need to solve.

So let’s quickly cover the second problem and then we’ll talk about the solution. The other pending problem that we have is that we have still not figured out how to learn the remaining 80% of the concepts. For this, we need to take a breadth-first approach to our learning.

What this means is that instead of taking some random long deep path from the inner circle to the outer boundary, we just keep enlarging our inner circle. In other words, we slowly keep increasing the breadth of our knowledge. The biggest advantage of doing this is that we are only learning new things that are very close to what we already know.

And this makes learning them very easy. But how exactly do we do this? To remember more of what we have learned so far and to learn the remaining 80% concepts, all we need to do is build projects. But not just any projects.

We need projects with increasing difficulty. I’ll tell you which exact projects to build in a moment. But building projects helps you in two ways.

When you build projects, you encounter the top 20% concepts again and again. And this helps you achieve spaced repetition. When you build projects, you will need to learn some new concepts on the go.

If you choose your projects carefully and slowly increase the difficulty, you can constantly expand your inner circle to become the same size as the outer circle. One thing to be aware of, though, is that you will never be able to learn 100% of what there is to learn. But look at you, you don’t know everything about the language that you speak.

And you are doing just fine. So don’t obsess over learning everything. As I mentioned, choosing the right projects is extremely important.

Doing this will not only help you learn faster, it will provide you a portfolio of projects that you can write on your resume to impress the hiring managers.

Love To Share Knowledge.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *