Live data from Hacker News

Front End Developer – Interview Questions

github.com

111–120 of 152 posts

Re: Front End Developer – Interview Questions

#111
post #17

Earlier quoted context omitted.

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.

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.

If you do meta-programming in JavaScript you use call/apply all of the time.

Re: Front End Developer – Interview Questions

#112

Earlier quoted context omitted.

"A startup I worked for made the applicants do pair programming for two days. Needless to say, the people getting hired were very good." How is this even possible for people that already have a job? Are they supposed to take two days vacation or do it in the weekend?

Good question. I really don't know because I was only an intern, but I guess they took vacation days (law mandates minimum 20/year). But I also recall a discussion here on HN on this topic, where applicants (at a different company) were in invited to work on a weekend. 2 days is probably overkill for US-companies, but a bit of pair-programming on real problems seems a lot better than "Let's see if you memorized this…

Yes it's good to collaborate of course, but two days of(non-paid?) work seems quite much for a candidate with a few years experience

Re: Front End Developer – Interview Questions

#113

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…

> So, would it really matter if you are hiring someone who doesn't remember the difference between .call and .apply off the top of their head?

Though this posting has a lot of suggested questions, it's missing this: What should the interviewer be looking for in the answers?

In my experience interviewing candidates (not usually for dev roles), the "correct" answer isn't the only good answer. Sometimes "I don't know, but this is how I would find out" is just as valid -- and usually more telling.

Re: Front End Developer – Interview Questions

#114
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…

Here's another one. Probably not very performant function foo(count) { var ret = [] for (var i=0; i

Just fyi indexOf is O(n), which means if you tried to do:

  var count = 1000000;
  var arr = foo(count);
  for (var i = 0; i 
It will take O(n^2) and will probably never complete whereas all the other solutions here will probably take ~1second.

Re: Front End Developer – Interview Questions

#115
post #71
post #60

Earlier quoted context omitted.

Employment probation. We fired a few people right off the bat within 3 months because they very clearly bullshitted us. One guy fucking used notepad to code. I'm not joking.

What exactly is wrong with using notepad to code? No syntax highlighting?

You're obviously not a programmer.

Re: Front End Developer – Interview Questions

#116
post #71
post #60

Earlier quoted context omitted.

Employment probation. We fired a few people right off the bat within 3 months because they very clearly bullshitted us. One guy fucking used notepad to code. I'm not joking.

What exactly is wrong with using notepad to code? No syntax highlighting?

Does Notepad still randomly destroy line breaks and not let you undo more than once? If so, those are two good reasons.

That aside, Notepad is bad because every single other text editor is probably better. Syntax highlighting, macros, plugins, ftp, language based autocomplete, etc. You can build projects directly from a lot of them with a couple of keystrokes.

Re: Front End Developer – Interview Questions

#118
post #35

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…

There are some good questions, on there, but as you say, a lot of them read like "Front End Developer Trivial Pursuit". For example, bad questions: * How is responsive design different from adaptive design? - there's no formal definition of either. While it might prompt a discussion, it will probably just make the interviewee feel nervous, when you should be trying to get them to relax. * Why is it called a Ternary e…

"If you can do that effectively, you should probably be presenting and writing books on JavaScript."

If I hire someone as an experienced frontend dev, I want them to be able to explain how stuff works to other people - especially to non-frontend developers, and junior developers. I want them to be able to train others up. So yes, I want them to be able to present on JavaScript. If their answer to the question tells me they're good enough at explaining things that they could write a book on the subject? Fantastic! Put that in plus column.

Re: Front End Developer – Interview Questions

#119
post #106
post #95

Earlier quoted context omitted.

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.

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.

> 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

#120

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…

imo the tech lead just has to know this stuff, if he is learning on the job, you're going to end up "throwing the first one away" whether you plan to or not (http://c2.com/cgi/wiki?PlanToThrowOneAway).

I know the answers to 90% of these questions and I am not a frontend specialist, I'm just a guy who had to do frontend for two years because that's the role that was needed. If I were making hiring decisions, I would want a frontend specialist to be better at it than I am. If a sr level candidate isn't breezing through this, something is wrong, or he builds very different applications than I do.

Post reply on HN