JavaScript & Node.js Interview Experience

Recently I have been interviewing a lot of people for JavaScript and Node.js developer position. I, unfortunately, had to reject all the people I interviewed till now. Honestly, it was like interacting with someone in English, who actually doesn’t know English but quite convinced that they know English. (I just used “English” as an example and I am not a native English speaker myself) So this post is basically rant + whatever thoughts hit my mind when I thought about the interviews.

When people say they have worked in JavaScript or Node.js, many of them don’t mean that they know the language or the framework. They have developed applications on popular frameworks, thanks to the very good examples in documentations. (Seriously, all the projects are spending a great deal of time improving their documentations these days. For example, Node.js has a dedicated docs Working Group to improve the quality). But I feel that they have failed to spend time on understanding them. For instance, following are the responses I got for the question, “what is Node.js”

  • A programming language (there are only very few who didn’t say this)
  • A tool
  • A server, like NGINX

This made me think that many people don’t even know what they are dealing with. I would say, when we start learning a language or a framework, we should spend at least some time in reading, understanding, and writing code to confirm our understanding. “Writing code” part is also important because when we write code, obviously we need to build/execute the code. Few people might choose to use an IDE and few might choose to use command line tools. But the important thing is, keeping ourselves familiar with the tools and common practices which are used in developing, testing and building processes, would help us get involved in a project, in no time.

Back to my interview experience, in almost all of the interview sessions, I asked “what would be the output of the following program”

function MyFunction() {
console.log(a);
var a = 10;
console.log(a);
}
MyFunction();

As most of them have begun their programming career with C++ or Java, the common response I get was, “the program will throw an error”. And when asked “why”, the response was “you are trying to access a variable before it is declared”. At this point, I really have no clue if I should continue interviewing them or not. Thanks to the linters like jslint, I assume many people have never written such code. I am not going to say if the language should have allowed this or not. But if we claim that we have worked on JavaScript, then we are at least expected to know the scope of the variables. At this moment, the addition of “let” and “const” to ECMAScript 2015 made much sense to me. It would be a big help for the people transitioning from C++ or Java.

My point is, even if we don’t know various frameworks, if we are pretty comfortable with the language itself, learning them won’t be a big deal and less time consuming. If I am running a company, I am sure I wouldn’t want to spend a hell lot of money to train somebody from the scratch in JavaScript, after hiring them as a “JavaScript developer”.

So, I would strongly recommend reading up on the basics of the language or frameworks in which we are working on. Spending some time with them should be a part of our daily life. For JavaScript, I am sure “JavaScript: The Good Parts” by “Douglas Crockford” would be a very good starting point. Its not even such a big book like complete references of other languages.