News Ticker

Dev Note – 20170419 – Skill To Master: Looking Up The Documentations

بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ

In the name of Allah, the Most Beneficient, the Most Merciful

When I first learned to code, I thought that I have to devour and memorize all of the documentations, and type on 600 wpm like on movies. But hey, I couldn’t be more wrong. The later part is not entirely false, but rather than type like 600 wpm, the more important part is to type on the medium to fast speed, and navigate inside and between the files quickly (and vim/vim keybinding help me tremendously with that). But for the memorization of the documentations? Well, I have to say we will not need it.

So then, what do we need? What we need are:

  1. the knowledge of formulating good questions, and

  2. the knowledge of where to find and navigate through the documentations

Ok, so, really? I don’t have to memorize the code? or anything? Isn’t it like cheating? To see the documentations? Isn’t it slow? Well, I am glad that you ask. You can read this article to find the answer of your questions. That article is written by Andrew Chalkley, one of the Team Treehouse’s JavaScript teacher.

  1. The knowledge of formulating good questions

Gone are the days that the one of the most important things in the world is having the answer of a lot of questions. Nowadays, we can always open up the google and find the answer of our questions (assuming we have working computer/device and a good internet connection). The main catch is we need to ask a good questions to the search engine. In short, if we want to know about how to cook a delicious egg benedict, type “how to cook egg benedict” or “egg benedict recipe”, and not something else. And then the answer will “magically” appears.

  1. The knowledge of where to find and navigate through the documentations

This is one of the main skills that a programmer have to ~know~ master! I was once saw a pop quiz that interviewed a real life developer in Portland food market, and they were asked some questions about their favorite programming language that they use day by day, it turned out that they don’t event memorize the common methods that they often use (time function). And guess what? They always look up to the documentations of the things they don’t know periodically! Three developers that use three different programming languages were asked, and three of them perform the same.

Another example I can give you came from my own experience. Before I started to learn JavaScript seriously, I learned to code with Python first. In Python, a simple if-elif-else block will look like this:

if x < 0:
    print("negative")
elif x > 0:
    print("more than zero")
else:
    print("might be exactly zero")

The if-elif-else in python is so clean and beautiful (for my taste), but when I first came to the JavaScript world, all of it were gone to dust, I have to deal with an (arguably) “ugly” version of if-else-if-else block. And I can shake the feeling that it is kinda weird! How come a variable and a command line have to end with semicolon (;):

var a = 0;

console.log(a);

But the if-else-if-else block should not? The equivalent JavaScript code from the Python code above are:

if (x < 0){
    console.log("negative");
} else if (x > 0) {
    console.log("more than zero");
} else {
    console.log("might be exactly zero");
}

See? Gone are the beautiful pseudo-code-like if-then-else blocks! And the worse part is: I have a hard time to remember it! There were times when I forgot to place a semicolon after the command line, or even typed an extra semicolon to the if-then-else block. Hence, I need to look up the JavaScript documentations to make sure I typed the block correctly. And hey, after a few hundreds lines, I don’t have to see the documentation at all! Including when I wrote this article. It just came to me naturally, like a native language.

So what can we conclude here? The take home message is we don’t have to memorize the documentations at all! In real life, we can see the documentations wherever we want! And how many times we want! And it is not considered as a cheating! We can copy paste all we want (except for “explicitely” proprietary codes)! And if we do that, the memorization will insha Allah come automatically to us.

Advertisements
About wahidyankf (186 Articles)
JavaScript Developer. His life-motto is "Learning, Dreaming, and Enjoying life".

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: