News for hackers. Stuff that matters.
Re:Interviewing a front-end developer by RyanZAG on Thursday January 30, 2014 @03:35AM (#7149623)
I don't think this kind of questioning is useful. Does it really matter if the dev knows all the strange intricacies of javascript, or does it matter if they can actually put together a well engineered application? I can easily see a more big-picture oriented dev who only uses the bare minimum javascript features fail this test yet create very well engineered code. I can also easily see a dev who likes to study manuals doing well on this test and then making code so difficult to understand he can't even fix it himself.
Re:Interviewing a front-end developer by fhd2 on Thursday January 30, 2014 @04:06AM (#7149693)
I tend to use a similar style of interviewing, but I'm not doing it to get right or wrong answers. I'm doing it to get a dialog going, to figure out if I can actually talk about programming with the candidate.

If that works out, I really don't care if they don't know or forgot some detail. As long as their level of knowledge roughly matches their claimed experience, that is.

People tend to be stressed in interviews, especially when faced with unfamiliar (if simple) problems, so I prefer to look through code they wrote on their own to get an idea of their skill, then verify in the interview that they understand their own code.

I suppose big tech companies don't have time for that.

Re:Interviewing a front-end developer by erikpukinskis on Thursday January 30, 2014 @03:48AM (#7149663)
That's my reaction too, but it's hard to know if OP is actually overzealous or I'm just not good enough for them. This line stood out to me:

> it's important that anyone you hire has a comprehensive knowledge of apply and call

To other Javascript developers: is this really true? I do use call every now and then, but it's pretty rare. Maybe that kind of stuff is more important if you're trying to functionally isolate components with richer interfaces between them? I tend to keep a pretty polluted namespace, so maybe that's where I'm going wrong.

That said, I have a "I could learn that but I have stuff to ship" mindset about Javascript. That has its ups and downs. Maybe I should work on that a bit more.

Re:Interviewing a front-end developer by timdown on Thursday January 30, 2014 @05:16AM (#7149887)
I'm not convinced. I think not knowing that apply() and call() exist would lead to unnecessarily clunky code, but even after over a decade of using them occasionally I still sometimes have to look up which is which. My use of them tends to end up deep in library code rather than everyday functions.
Re:Interviewing a front-end developer by davedx on Thursday January 30, 2014 @05:51AM (#7149988)
This is a crucial point. apply and call tend to be more useful for libraries than application level code, in my experience.

Even in the "front end development" subfield of web development, there are divisions. Do you want someone to produce lots of modular libraries that are reusable throughout your company/application suite, or perhaps to build a UI framework? Then knowledge of these parts of JavaScript will be very useful. Do you want someone to build a rich internet application in Meteor? Then knowledge of positioning, layouts, templates, UI effects and how to tie them into the Meteor framework is much more valuable.

Where I work we do a lot of 2D animations, so it's great if the people who work here know all about CSS transitions, requestAnimationFrame, and so on.

Re:Interviewing a front-end developer by bulatb on Thursday January 30, 2014 @04:02AM (#7149687)
You should know that they exist and what they do.

You can do a lot of things with higher-order functions just by making closures, but `apply` and `call` will give you flexibility and power there's no other way to get. For one thing, they're your ticket to manipulating `this`.

The worst part is keeping them straight. My mnemonic is that `call` is just a function call, so arguments go in as normal. `apply` is the other one, so arguments go in as an array. (Maybe "A" for array, or something.)

Re:Interviewing a front-end developer by berodam on Thursday January 30, 2014 @10:52AM (#7151263)
My usual mnemonic is "call list" and "apply array"
Re:Interviewing a front-end developer by menriquez on Thursday January 30, 2014 @08:39AM (#7150564)
"That said, I have a "I could learn that but I have stuff to ship" mindset about Javascript"

amen bro...amen.

Re:Interviewing a front-end developer by warfangle on Thursday January 30, 2014 @09:13AM (#7150719)
Knowing call and apply demonstrates a knowledge of how context, arguments, and function calls work. It's like demonstrating pointer knowledge in C. Absolute must for a non-junior candidate (and even then, depending on what you're hiring a front-end developer for).
Re:Interviewing a front-end developer by hcho on Thursday January 30, 2014 @05:13AM (#7149879)
Yes. I have 10 people working on a code base. It's been more than a year since we started. Your hunch is correct, keeping a neat namespace is the job.
Re:Interviewing a front-end developer by nairteashop on Thursday January 30, 2014 @04:05AM (#7149691)
I actually liked the questions because if you spend enough time writing web apps, I feel you will run into all of these situations, e.g. manipulating arguments, losing the "this" context, catching the wrong click event, etc. (You will however not run into puzzles, fibonacci heaps, or whatever else is unfortunately asked far too often IMO in front-end dev interviews.)

As a parallel, when I interview developers for a Java position, I ask them to list some methods in java.lang.Object off the top of their head. A few have objected to this, calling the question arcane, something they could look up in 5 mins, etc, which are all true, but the thing is if you've written enough Java, you would definitely have run into at least equals(), hashCode(), and toString(), and likely wait() and notify() as well. This one simple question has been a surprisingly good proxy to the developer's general level of proficiency and experience with Java.

Re:Interviewing a front-end developer by hrktb on Thursday January 30, 2014 @04:31AM (#7149758)
I tend to agree on a theoretical level.

At the same time, this approach assumes your candidate is currently working on the language you use in the interview. I think it's not rare to have people working on different stacks depending on the projects, and they can be expert in front-end dev for instance, but have been diving into BE APIs for weeks when you interview them. Some can be coding in any language they know in seconds at will, others will need a lot more time to switch context.

It's a valid approach I think, but not without it's pitfalls.

Re:Interviewing a front-end developer by wavefunction on Thursday January 30, 2014 @05:34AM (#7149944)
If they're a front-end developer and they don't know at least JavaScript, CSS and HTML, they shouldn't really be calling themselves a front-end dev.
Re:Interviewing a front-end developer by hrktb on Thursday January 30, 2014 @05:53AM (#7149993)
Of course. I was more thinking about the "hey, code me this now !" aspect
Re:Interviewing a front-end developer by Silhouette on Thursday January 30, 2014 @12:46PM (#7152026)
I actually liked the questions because if you spend enough time writing web apps, I feel you will run into all of these situations, e.g. manipulating arguments

I've been writing code for web sites since the web was a new thing, and I don't remember ever writing code that used the arguments pseudo-array in JavaScript. I'm sure I've probably used plenty of tools that relied on arguments for their implementations, but not reinventing wheels and all that.

I tend to think these kinds of questions are almost as flawed as brain teasers if you're trying to hire someone who's actually any good at programming. A long time ago, when I first started programming professionally and only used one main language, I was quite the language lawyer and new all kinds of arcane tricks. Today, I often look up how to find the length of a string/array/list/vector because I'm not sure whether it's x.length, x.size(), len(x), or any of another half-dozen variations that are used in different programming languages I know. I usually do get it right, but experience tells me it's faster to check anyway than to wait for a Lint tool to run or a compilation to fail if not.

Knowing the concepts in each language is important, so you know what to look up. If a JS developer doesn't understand what "this" means or how prototypes work, and by extension they don't have some awareness of why you'd need to use "call" or "apply", they might struggle. But we have IDEs and search engines and automatic style checking tools and all that good stuff today, and there are more important things to remember than details I really can and do look up in seconds when I need them from time to time.

The way I see it, asking an obviously experienced developer how many little details of a specific language they can remember is rather like asking them to take a typing speed test. In theory, the result might tell you something about how fast they can get work done, but in practice you're unlikely to learn anything very useful because the result won't be strongly correlated with writing good code that gets the job done well.

Re:Interviewing a front-end developer by fhd2 on Thursday January 30, 2014 @04:34AM (#7149765)
Not sure about the Java question actually. I'm pretty certain every Java programmer can answer this. Whether they can understand what you mean and recall it in a stressful interview situation is what you seem to be assessing here. Not sure if that's what you're after.

This question seems to be targeted at weeding out people who never had to do with Java. Have you tried asking for code samples? We always do, if someone has nothing relevant to show, we give them a simple task to solve at their leisure. Has been quite useful both for weeding out non-programmers as well as for getting a rough idea of someone's skill level.

Re:Interviewing a front-end developer by grey-area on Thursday January 30, 2014 @03:57AM (#7149678)
When it got to the variadic arguments one I had the same thought - it's important to know that it is possible, but less important to know the syntax for that in a particular language as you will I use it very rarely, and it can easily be looked up. There is a danger with this sort of questioning that it veers into esoteric corners of the language which are not a test of ability at the job, but a test of ability at language quizzes. The context questions I had more sympathy with, as it is a potential pitfall for js developers, but there are other ways to mitigate this, like not stripping object functions of their context in the first place (not sure why you would do that here?) - this kind of stuff is often handled by libraries, particularly the native shim.

Thankfully he does move on to problem solving later on, which strikes me as far more useful - an open-ended question will reveal lots about the candidate.

Re:Interviewing a front-end developer by onion2k on Thursday January 30, 2014 @03:57AM (#7149677)
If you're interviewing to find someone to build a new application, sure, big picture is more important. However, if you're interviewing at Twitter, chances are someone else is doing that. These questions are are for candidates who'll be building features defined by other people, and to that end, they are the sort of things you want to know about.
Re:Interviewing a front-end developer by meowface on Thursday January 30, 2014 @04:27AM (#7149750)
If you need someone who is experienced with Javascript, then I think those are reasonable questions to ask.
Re:Interviewing a front-end developer by lunarcave on Thursday January 30, 2014 @03:47AM (#7149657)
Not necessarily. While I may agree that a good candidate can be put off if the line of questioning was only about quirky parts, I noticed that the questions actually help judge a candidate's js proficiency. A large part of this interview was based on testing the candidate on essential parts of the language like contexts, prototypes, etc.