Learning Programming is Never a Straight Road

09 February 2021

Disclaimer: This article won't discuss the property of a road (as straight is sometimes envisaged to being flat and smooth), but only the shape of it.

Alt text here

The image was originally designed for the Vietnamese version of the post

Learning programming is never a straight road

Why? This is because we always need to "revisit" every old concept that we learnt. It's not like one step at a time, but like going back and forward repeatedly, on a higher and deeper level.

Do you have in mind what shape does this pattern look like? That's right, it's a spiral! I have always perceived spirals as a splendid pattern of nature: a spiral of a snail, a storm or the eyes of the pineapple. Even the Fibonacci golden ratio is a spiral!

But how can learning programming and a spiral have something to do with each other? For me, yes they do.

I just realized this recently when I took a course from FreeCodeCamp on Data Structure and Algorithms in Javascript.

Before I can step into the main parts, I need to revise every corner of Javascript fundamentals (how to declare a variable, write a function, or learn about Object, Array, etc). Those are the things that I came into contact when I first started learning Javascript. Yet, revisiting them still brings up a refreshing and familiar feeling. Of course, I did skip several parts that I have high confidence in. Still I went through every exercise one by one.

I realize that the more we revisit a fundamental concept, the better we grasp its underlying meaning. It helps us write better code and know how to apply the concepts in practice even more skillfully. It’s like climbing a spiral staircase: we always return to the same place, but on a higher level.

Programming does not start from A and go all the way to Z

Previously, when somebody asked me to relearn or reread a piece of concept C, even though I’m currently working on the concept D, E, F, I did take offence. It feels like somebody asks you to go back to elementary school. As a matter of fact, we did step up from 1st grade to 2nd, 3rd, 4th, and then to 11th, and 12th grade. Learning Vietnamese always starts from single sentences to complex sentences. Learning English always starts from simple present to present perfect tense.

That’s why I always had an impression that when you are asked to continuously revisit something you have far been through, it means that you have lost your fundamentals. Everything needs to start from A and go all the way to Z.

Well, it’s no longer like that when I learn programming…

In programming, of course, there is also an incremental order of what needs to be learnt, which is quite straightforward since everything usually depends on and relates to one another. It’s like in English, if you don’t understand about singular/plural pronouns, you probably will have a hard time to grasp when to use am/is/are. And the same thing in programming, for example in Javascript, learning callback is required before you can grasp the idea of Promise.

But, and I have to emphasize the “but” here, the probability of an occasion when you need to revise everything you have learnt, seems to be unexpectedly high! Take it as a matter of fact of this field. To make something work in programming requires you to acquire a vast amount of knowledge in a limited amount of time. Sometimes we don’t even have time to go back and contemplate how it works in the first place. We just know: ah write several lines of code like this, then setup like that, calling this function here and there, and et voilà , it works! Tests run without any issue, and then we are done, let’s format the code and push it! ✌️

In the future, somehow a source of a bug requires us to revisit an old fundamental concept, then it’s time we brush it up. It is not because we have missed our fundamentals, but just programming is not that simple to comprehend. It’s not only syntax, but also how the language operates behind the scene, being through many processes to turn those lines of code into binary bit of 0 and 1 for the computer to understand, then run a pile of commands to return the result to us. Everything, everything of it, cannot just be grasped at one sitting.

It's OK to revisit fundamental concepts

Previously, I have always blamed myself for not being able to remember or understand every problem that I have learnt, and then end up revisiting it several times. Of course, repeatedly doing so for such a fundamental concept is not a good thing. But then, how fundamental a concept depends on different phases of different people. Gradually, I learn how to feel comfortable with things that I don’t remember. It’s okay, as long as I know how to find the answers from Google, or take reference from an official documentation like MDN. My old friend has a saying:

It’s better to admit that you don’t know and don’t remember, so that somebody can still give you a (re-)explanation of a concept, but maybe in a higher level or in a different angle. Other than being embarrassed, and lose your chance of learning new things.

Repetition does bring out better understanding

So, I hope that if any of you guys are being confused whether or not you have lost your fundamentals, or why everything is so complicated, why it takes so long to learn a single thing, you can feel safe. Because programming does force us to bump into a problem multiple times, fix the same bug all over again. But remember, repetition does bring out better understanding. And yeah, it’s not coincident that when talking about programming, we always talk about loop, right? Then, just loop comfortably, but remember to not let yourself too overflowed (or it will be stackoverflow 😉). Cheers! 🔥