Live data from Hacker News

Ask HN: How to prepare for a Front-end Developer interview?

news.ycombinator.com

61–70 of 146 posts

Re: Ask HN: How to prepare for a Front-end Developer interview?

#61
post #58

Earlier quoted context omitted.

I agree. We always put the little 'for loop that creates a list of functions that spit out the current number of the iteration' exercise first in all of our interviews. Generally, when people solved that one fast, they also did well in the rest of the interview and if they struggled there, they also had a hard time coming up with an elegant solution for most of the other tasks. What I also like about it is that a clo…

Would that exercise be the following? I'm not sure I understand what's being tested. const f = (k) => { const funcs = []; for(let i = 0; i i); } return funcs; } const test = f(4); console.log(test[0]()); // 0 console.log(test[1]()); // 1 console.log(test[2]()); // 2 console.log(test[3]()); // 3

Try writing that same thing without ES6.

Re: Ask HN: How to prepare for a Front-end Developer interview?

#62
post #58

Earlier quoted context omitted.

I agree. We always put the little 'for loop that creates a list of functions that spit out the current number of the iteration' exercise first in all of our interviews. Generally, when people solved that one fast, they also did well in the rest of the interview and if they struggled there, they also had a hard time coming up with an elegant solution for most of the other tasks. What I also like about it is that a clo…

Would that exercise be the following? I'm not sure I understand what's being tested. const f = (k) => { const funcs = []; for(let i = 0; i i); } return funcs; } const test = f(4); console.log(test[0]()); // 0 console.log(test[1]()); // 1 console.log(test[2]()); // 2 console.log(test[3]()); // 3

If you did that without first asking about what Ecmascript version you should support I would prompt the question myself, and if you didn't find a different way then I would consider it a very bad sign.

Re: Ask HN: How to prepare for a Front-end Developer interview?

#63
Here are a few questions/problems I was asked in from-end interviews a couple months ago:

Write a function that accepts an array of ints and a target number. If two of the numbers in the array can add up to the target, return their indices. (aka Two Sum)

Write a function that accepts an int x and prints a spiral of "#"s so that the number of "arms" in the spiral equals x.

Write a function that accepts a month and a year, and draws a calendar view of that month.

Given a non-negative int x, repeatedly add all its digits until the result has only one digit.

I think I was also asked something that involved a tree structure, but I can't remember the specific problem.

I thought all of those questions were fucking stupid. The good interviewers, IMO, gave me a "take-home" problem of building some mini front-end app that hit an API, and the really fun one involved reverse engineering an unpublished API - that's how I got my current job.

I spent a lot of time studying the h5bp Front End Interview Questions[1], and the only front-end specific question I was asked was, "What is an SVG sprite?" during an initial phone chat with a CEO.

1. https://github.com/h5bp/Front-end-Developer-Interview-Questi...

Re: Ask HN: How to prepare for a Front-end Developer interview?

#64

Most modern production quality software systems there days are implementing fibonacci algorithms as part of their core business rules, controlled via a red/black tree. Usually it's held together by a fizzbuzz architecture so as a minimum you should be able to whiteboard fizzbuzz. You should understand all these things well, and really if you are doing modern software development these things hould be day to day tasks…

You had me there for a split second.

Re: Ask HN: How to prepare for a Front-end Developer interview?

#65
post #24

Earlier quoted context omitted.

> Where's the disconnect here - are we talking about different kinds of front-end work? Yeah I would assume so. Of course if know the job requires such knowledge, you should interview for it. But I'm thinking of more average front-end work, where you'd be building forms or dashboards or ordinary websites. It sounds like you're building a complex application that just happens to be hosted in a browser. Although even t…

We may be on the same page here. I don't like the way dev interviews are run and I think the focus on textbook algorithms is misplaced. I would say if your interview process can be aced by somebody hitting the books for a month, you're not testing for hard enough things. I was just a little surprised about those particular items because I feel like they're such an essential background for all software development. Bu…

So, so many people do things the hard and reliable way, or don't do them at all and sacrifice some desired feature, because they don't recognize a well understood computer science problem lurking underneath a business problem or a UI implementation.

I'm not saying that's what anyone in this discussion is doing, just that I see it everywhere (and have done it myself). 1000s of lines of incomprehensible code because no one realized that this drag and drop flow chart creation interface can be understood as a graph.

Re: Ask HN: How to prepare for a Front-end Developer interview?

#66
post #58

Earlier quoted context omitted.

Would that exercise be the following? I'm not sure I understand what's being tested. const f = (k) => { const funcs = []; for(let i = 0; i i); } return funcs; } const test = f(4); console.log(test[0]()); // 0 console.log(test[1]()); // 1 console.log(test[2]()); // 2 console.log(test[3]()); // 3

Try writing that same thing without ES6.

I'm also in the process of interviewing for a front-end engineer position, so thank you for replying and providing feedback. I'm assuming it has to be written this way because the function being pushed was referencing i, which was within the scope of the closure. Turning it into an IIFE breaks out of that. Thoughts?

  // Assuming pre-ES6
  function iterate(k) {
    var funcs = [];
    for(var i = 0; i 

Re: Ask HN: How to prepare for a Front-end Developer interview?

#67
Generally, I start by getting an idea of how well a candidate understands JavaScript with a problem like this:

Write a function that enables the following API...

    createOlympian()
      .name('Katie Ledecky')
      .sport('Swimming')
      .country('USA')
      .log()

    // Katie Ledecky, Swimming, USA
Next, if things are going well, I have the candidate transform a JSON collection response to match some arbitrary requirements using Lodash/Underscore.

After that, I focus on the candidate's experience and talk about projects they've worked on, their process and what they're looking for in their next position.

If you're a front-end candidate that's solid at design, visualizations or complex layouts, I'd encourage you to bring your personal laptop and show off some of the work you've done on your own.

Re: Ask HN: How to prepare for a Front-end Developer interview?

#68

Most modern production quality software systems there days are implementing fibonacci algorithms as part of their core business rules, controlled via a red/black tree. Usually it's held together by a fizzbuzz architecture so as a minimum you should be able to whiteboard fizzbuzz. You should understand all these things well, and really if you are doing modern software development these things hould be day to day tasks…

best answer ever.

Re: Ask HN: How to prepare for a Front-end Developer interview?

#69

Most modern production quality software systems there days are implementing fibonacci algorithms as part of their core business rules, controlled via a red/black tree. Usually it's held together by a fizzbuzz architecture so as a minimum you should be able to whiteboard fizzbuzz. You should understand all these things well, and really if you are doing modern software development these things hould be day to day tasks…

[deleted]

Re: Ask HN: How to prepare for a Front-end Developer interview?

#70

Most modern production quality software systems there days are implementing fibonacci algorithms as part of their core business rules, controlled via a red/black tree. Usually it's held together by a fizzbuzz architecture so as a minimum you should be able to whiteboard fizzbuzz. You should understand all these things well, and really if you are doing modern software development these things hould be day to day tasks…

You sound like an idiot, "bro". Sad your buddies had to downvote in validation... your reality remains the same.
Post reply on HN