News for hackers. Stuff that matters.
Re:Front End Developer – Interview Questions by cozuya on Tuesday January 20, 2015 @12:18PM (#8917988)
Call and apply are core concepts to writing good javascript. I would not hire someone (at least for any sort of senior role) that could not tell you exactly how both of them work. Many of the other things on this page are certainly "trivia" that could be addressed by google when they come up, but not those.
Re:Front End Developer – Interview Questions by FLUX-YOU on Tuesday January 20, 2015 @12:44PM (#8918169)
>Call and apply are core concepts to writing good javascript.

But the biggest issue is the disagreement with the body of knowledge that everyone should have. Even in the body of knowledge, there's disagreements about what bits of knowledge go to which categories (Is it nice-to-know, or need-to-know?)

It's really no wonder you see such a broad range of candidate skills and knowledge. The sub-fields of the programming field can't even decide what everyone ought to know at various levels of experience!

Re:Front End Developer – Interview Questions by driverdan on Tuesday January 20, 2015 @01:41PM (#8918589)
How often do you use call and apply? I've been a JS developer for a long time, have written a lot of JS code, and rarely need to use call and apply.

Unless you're writing all your code from scratch and not using any frameworks / util libs (which you should) you won't need them very often.

Re:Front End Developer – Interview Questions by nogridbag on Tuesday January 20, 2015 @03:13PM (#8919195)
Agreed I can't even recall the last time I used call or apply. We might have only a handful of cases out of roughly 200,000 JS lines of code.
Re:Front End Developer – Interview Questions by dustingetz on Tuesday January 20, 2015 @06:09PM (#8920322)
Perhaps that is why y'all have 200k LOC of javascript :)
Re:Front End Developer – Interview Questions by cozuya on Tuesday January 20, 2015 @02:13PM (#8918810)
Fairly often. Since the selected DOM element is the value of this in any event handler callback, you can migrate out the function and use it for different things (i.e. validation of, say, autofill after a settimeout) and different contexts with call/apply.
Re:Front End Developer – Interview Questions by tericho on Tuesday January 20, 2015 @02:31PM (#8918927)
I don't see how this requires you to know the intricacies of call/apply or how it would even force you to use it frequently enough to understand the difference.
Re:Front End Developer – Interview Questions by cozuya on Tuesday January 20, 2015 @03:29PM (#8919308)
I guess I don't understand. There's a lot of ways to accomplish tasks in any programming language but in JS in particular there's a way to assign the value of this and you can use it to have clean, dry code, and I'd expect any sr. level people to know how to use it. jQuery source has over 100 uses of call and apply.
Re:Front End Developer – Interview Questions by driverdan on Tuesday January 20, 2015 @06:00PM (#8920272)
> jQuery source has over 100 uses of call and apply.

Right, jQuery does it for you. You usually don't need to do it yourself unless you're contributing to jQuery (or another lib/framework that needs them).

I might ask someone about call and apply but wouldn't be overly concerned if they didn't remember the exact syntax or mixed them up. I've done the same myself. I wouldn't expect someone to remember every little nuanced part of a language, especially if it's not something they use frequently.

Re:Front End Developer – Interview Questions by Touche on Tuesday January 20, 2015 @04:02PM (#8919541)
If you do meta-programming in JavaScript you use call/apply all of the time.
Re:Front End Developer – Interview Questions by lsdafjklsd on Tuesday January 20, 2015 @01:04PM (#8918326)
I agree, but I'll say that it wasn't until I started writing non-ember application code (switching to react + immutable.js + pure functions) that I needed things like call / apply / bind on the regular. So writing framework code can really insulate you from needing these things, not implying that that's a bad thing, but personally writing regular javascript has been a breathe of fresh air.
Re:Front End Developer – Interview Questions by serve_yay on Tuesday January 20, 2015 @12:28PM (#8918041)
Well, they are both exactly the same. The only difference is the particular way each accepts arguments, and it's easy to forget which is which. So yes you should know how they work, but the distinction between them is contingent and difficult to remember.
Re:Front End Developer – Interview Questions by tericho on Tuesday January 20, 2015 @12:34PM (#8918090)
Like most JS concepts, to me it's a "use it or lose it" situation. When I have to use them they are fresh in my head, when I move on to another project for 6 months that has no complex modules or uses a framework like Angular, there is no way I'll remember the intricacies. That being said, there is still a different between having used them and simply being aware of their existence, which I suppose could be made clear during an interview.
Re:Front End Developer – Interview Questions by alxndr on Tuesday January 20, 2015 @09:52PM (#8921207)
This sounds like a very good answer to that question.