catalins.tech with Gatsby

How I learnt Python versus how I learnt JavaScript

2020 Jan 28th

There is a lot of debate regarding what is the best way to learn how to program. Or the best way to learn in general. Should you watch other people do it, like online tutorials? Trial and error by building/trying stuff yourself? A combination of both? In my opinion, there is no formula for learning new things. Some people learn better by watching other people, others learn by trying stuff. One thing is certain though: active learning is better than passive learning. It should be common sense, but it is not always the case; as I have found through my experience. 

HOW I LEARNT PYTHON

In the final year of University, we studied Python in one of the modules, and I have also chosen to build my final year project in Python. More specifically, in Django. Before that, I did not write a single line of code in Python. Thus, the challenge was to get up to speed with Python and Django in the least amount of time. That meant I had no time to watch hours of tutorials, and I had to jump straight into coding. During that year, I became best friend with Google, StackOverflow, Django documentation and an online tutorial on how to build a web application with Django. Those were all my resources. Whenever I wanted to add a new feature or to make any change, I would go on Google and start typing “How to….”. And then consult the documentation of Django. When I got stuck, and I could not find any way out, I would post on StackOverflow. I would get an answer, and then I would repeat the cycle. 

What do you think was the outcome? I became very comfortable with Python and Django. I could write Python code from the top of my head comfortably, I could quickly deploy my Django application on Heroku; you get the idea. I was learning actively; I was implementing stuff myself, and I did not simply watch other people do it. That helped me tremendously. As a matter of fact, because I learnt actively, I still remember Python and Django.

HOW I LEARNT JAVASCRIPT

On the other side, when it comes to JavaScript, I did precisely the opposite. Instead of writing code and implementing stuff, I constantly watched tutorials. With JavaScript, I always had the impression that I need to learn all the concepts and obscurities before writing code. That’s a big misjudgment. While it is good to learn the concepts and all the stuff, you need to build things to learn it properly. It is like trying to learn all the words in a new language before you starting speaking it. Just speak it and discover new words along the way!

So, this is how I was trapped in the tutorial hell. What do you think the outcome was? Even though I watched and finished countless of online tutorials, I could barely create a NodeJS server from the top of my head. Or I could barely write basic JavaScript. Now re-read how I learnt Python and compare the two approaches.

CONCLUSION

In conclusion, even though it may seem like common sense, many people are learning passively. And do you know why that happens? Because it does not take you out of the comfort zone. You have everything handed to you; you have to copy what the instructor does, and it gives you the feel-good feeling, you feel productive. 

However, knowledge comes with hard work and sweat. Nobody became a (top) programmer by being a professional tutorial watcher. Being able to compare the two approaches gave me a wake-up call!