Live data from Hacker News

Front End Developer – Interview Questions

github.com

41–50 of 152 posts

Re: Front End Developer – Interview Questions

#41

As an interviewee: "This is what I've in my career. If you'd like to give me money then I can do those things for you." As an interviewer: "Tell me what you've done in your career. We'd like to give you money to do those things for us." That's all I really want or need for either side of the table.

Without asking technical questions, how would an interviewer weed out the people who say the former but can't actually back it up? Because if the above is the entire hiring process, your junior developers aren't going to have to be concerned about their imposter syndromes, because they'll be working along side actual imposters.

Re: Front End Developer – Interview Questions

#42
post #5

I really like this js question (whiteboarding): Implement function foo which takes an integer size, and returns an array of that size where each element in that array is a function that returns the index of that function in the array. Testcase: 42 === foo(1000)[42]() There are 3 different correct solutions. Discuss which solution is better, worse... etc (if they get there) (could probably be worded better, I'm not an…

It's a good question, and a pretty fair one for a Javascript developer to know, given the role that closures play in the language.

That said, I'm not thinking of a 3rd solution. Closures(best?), a global(worse), what else?

Edit: As Daiz points out, the bind I was thinking of doesn't even have to even be to a global. But we still have seen only two solutions: variations of binding and closures. What's the third? Inquiring minds want to know!

Re: Front End Developer – Interview Questions

#43
post #8

Anyone else feel like there is a lot of esoteric information here? For instance: > Are there any problems with serving pages as application/xhtml+xml? I've never had to or considered serving pages as application/xhtml+xml, there's no reason for me to know the answer to this question and I've been working on the front end for ages. If I ever had reason to serve a page application/xhtml+xml I would thoroughly research…

The context of the questions is important - they can tell you what someone knows and what they don't. I don't think the idea is "don't hire anyone who is unaware of the consequences of serving pages as application/xhtml+xml".

Plus if you are secure in your abilities you should be able to say "no, I'm not quite sure why that could be bad" without feeling like the world is ending. We all have stuff to learn.

Re: Front End Developer – Interview Questions

#44

This looks like a giant list of trivia that has almost no bearing on the day-to-day effectiveness of the candidate. For example, I don't have the slightest clue what the answer is to probably half of these and a lot of my job is to write javascript that gets run millions to billions of times a day. The "code questions", by contrast, were all ridiculously easy. So, would it really matter if you are hiring someone who…

just being vaguely aware of the existence of call and apply should put you ahead of many fizbuz dropouts.

Re: Front End Developer – Interview Questions

#45
post #32
post #5

I really like this js question (whiteboarding): Implement function foo which takes an integer size, and returns an array of that size where each element in that array is a function that returns the index of that function in the array. Testcase: 42 === foo(1000)[42]() There are 3 different correct solutions. Discuss which solution is better, worse... etc (if they get there) (could probably be worded better, I'm not an…

I feel bad, because as I was writing a solution to this I knew why it wouldn't work and why (returning my counter variable returns the value at the end of the count) but I still couldn't come up with a fix :( Edit: A good Google seems to suggest using JSON.stringify and JSON.parse to copy the value. Edit 2: But even that doesn't seem to work :( Edit 3: Got it, using a generator function. Which makes sense. I guess I'…

Here's a solution using closure: http://codepen.io/anon/pen/KwmQam

Re: Front End Developer – Interview Questions

#46

Lets imagine the two worst case scenarios here: 1st: A company asks those questions because they don’t know better. Someone is good at remembering stuff and does so. He gets the job. 2nd: A company asks those questions because they don’t know better. Someone is a good developer but fails at these questions – with no specific reason. He doesn’t get the job.

> Someone is a good developer but fails at these questions

There probably aren't that many people who can confidently answer 90%+ of these questions, but if someone were to call themselves a good developer, surely they should be able to accurately answer most (>50%) of them.

Re: Front End Developer – Interview Questions

#47

This looks like a giant list of trivia that has almost no bearing on the day-to-day effectiveness of the candidate. For example, I don't have the slightest clue what the answer is to probably half of these and a lot of my job is to write javascript that gets run millions to billions of times a day. The "code questions", by contrast, were all ridiculously easy. So, would it really matter if you are hiring someone who…

Ok so what would you recommend be changed? Different trivia? No trivia? Harder code challenges? I tend to agree with your sentiment, however I'm not sure how you'd go about evaluating skills short of an on-the-job test.

[deleted]

Re: Front End Developer – Interview Questions

#48
post #12
post #8

Anyone else feel like there is a lot of esoteric information here? For instance: > Are there any problems with serving pages as application/xhtml+xml? I've never had to or considered serving pages as application/xhtml+xml, there's no reason for me to know the answer to this question and I've been working on the front end for ages. If I ever had reason to serve a page application/xhtml+xml I would thoroughly research…

What it needs is the explanation why. Preface with I'm not a front end guy, but I get the impression this was a major discussion topic around a decade ago. So this specific question is a resume tester, you claim 15 yrs experience on the resume, lets talk about a major gossip or controversial topic from 10 yrs ago that is pretty much irrelevant or uncontroversial today so someone with only 5 "real" years experience wo…

This is a bit unrealistic... asking someone what spacer.gif was used for could in theory work the way you describe, because it was something wide-spread and doesn't require you to recall too much details, just a general idea. On the other hand, issues like this xml mime-type thing are just too specific to recall after all that time. Frankly I don't remember half of the things that I've read last week and this was decades ago...

On the other hand, asking theback-end programmer what is a shebang line is totally legit in my opinion, nothing BS about it.

Re: Front End Developer – Interview Questions

#50
post #32
post #5

I really like this js question (whiteboarding): Implement function foo which takes an integer size, and returns an array of that size where each element in that array is a function that returns the index of that function in the array. Testcase: 42 === foo(1000)[42]() There are 3 different correct solutions. Discuss which solution is better, worse... etc (if they get there) (could probably be worded better, I'm not an…

I feel bad, because as I was writing a solution to this I knew why it wouldn't work and why (returning my counter variable returns the value at the end of the count) but I still couldn't come up with a fix :( Edit: A good Google seems to suggest using JSON.stringify and JSON.parse to copy the value. Edit 2: But even that doesn't seem to work :( Edit 3: Got it, using a generator function. Which makes sense. I guess I'…

Using a closure:

  function foo(s) {
    function generator(i) {
      return function () {
        return i;
      };
    }

    var r = new Array(s);
    
    for (var i = 0; i 
Using Function.prototype.bind():

  function foo(s) {
    function generator(i) {
      return i;
    }

    var r = new Array(s);
    
    for (var i = 0; i 
Post reply on HN