Live data from Hacker News

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

news.ycombinator.com

21–30 of 146 posts

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

#21

You should at least be familiar with the major front-end libraries and frameworks - React, Angular and Ember. You don't necessarily need to "know" them, but at least know about them. You should be familiar with what ES6 is and what Babel does. These technologies probably won't be specific questions per se but if they come up and you can't speak about them, it'd be a red flag. Even for a front-end developer you should…

Can somebody provide a real example of where you'd need to use "linked lists, binary trees, min/max heaps, depth/breadth first search, tries, recursion, hash tables, etc" in your typical everyday front end angular/react/ember project?

I don't know if zzzmarcus means they're useful, but it sadly shouldn't be surprising that OP might be asked that anyway.

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

#22

In my experience, closures are a topic that always comes up. It is also important to know how to handle a closure inside of a for loop. I've been asked about "this" binding, coercion, and CSS specificity. I've had to solve problems that required me to know about how to use stacks, trees, and nested for loops. Other topics that have come up are how to architect an app, concurrency, memoization, building out and handli…

> In my experience, closures are a topic that always comes up.

Opinions will differ, but IMHO closure is a great concept to divide those who know JS at a conceptual level (or at least have crammed for the interview) from those who don't.

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

#23
post #12

Earlier quoted context omitted.

> Even for a front-end developer you should have a basic knowledge of data structures like linked lists, binary trees, min/max heaps, depth/breadth first search, tries, recursion, hash tables, etc. I would never care about these if I was specifically hiring a front-end dev. I've never once seen any of them come up in the context of front-end work in my entire career. And in fact an interviewer asking questions about…

I don't understand how that's possible. For example, in a recent project I needed to implement a path-finding algorithm to draw connections routed around arbitrarily-placed boxes. More recently, efficiently snap a line to the nearest edge from an in-memory set of (again, arbitrarily placed and changing) objects as the mouse moves. I'm having to use and think about some item from that list on a daily basis. Where's th…

Most frontend jobs are gluing React, Ember, or Angular to the backend and sometimes making the CSS look right.

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

#24
post #12

Earlier quoted context omitted.

> Even for a front-end developer you should have a basic knowledge of data structures like linked lists, binary trees, min/max heaps, depth/breadth first search, tries, recursion, hash tables, etc. I would never care about these if I was specifically hiring a front-end dev. I've never once seen any of them come up in the context of front-end work in my entire career. And in fact an interviewer asking questions about…

I don't understand how that's possible. For example, in a recent project I needed to implement a path-finding algorithm to draw connections routed around arbitrarily-placed boxes. More recently, efficiently snap a line to the nearest edge from an in-memory set of (again, arbitrarily placed and changing) objects as the mouse moves. I'm having to use and think about some item from that list on a daily basis. Where's th…

> 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 then, I'd argue that while your knowledge of when to apply those algorithms is important, you still shouldn't be writing them yourself. You should be finding a well-vetted library and taking the function from there.

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

#25
I usually supplement the interview with a take home project, because front end web dev (emphasis on web) is about building interfaces and managing state really well and that is hard to test in an hour!

Some of the more domain specific stuff is about building a scalable components library that your team can use, testing your code, building assets in the most elegant way possible (gulp, webpack, grunt). So make sure you're very honest with your resume!! (dishonesty is bad).

For the case of front end web, here is what I would ask from the top of my head (thinking aloud):

- A good interview will have some pair programming. I usually like to give a very simple mock. These mocks will have a simple task where I will ask you to implement me a two column layout, or a popup window. Therefore I'd like to see that you have strong fundamentals of CSS, HTML, and Basic DOM manipulation using JavaScript. Nice interviewers will allow the use of google!

- You should understand how a network request and response works. I'll probably ask you to teach me what an AJAX request is to start. I hope to have a good conversation because I forget things often and like to learn from others.

- I will probably ask you what are some ways to implement components that won't produce side effects in a large codebase.

- I will probably ask you questions about how you plan to work with Design and other product stakeholders to ensure that you're able to iterate quickly on the front end. This is because requirements and design changes frequently (more common with companies that are focused on product versus growth/retention).

- I will ask you how you approach testing, and how do you ensure your interface will work cross browser, cross device.

- If you're really a generalist and you have no front end experience but a lot of other programming experience, I'll probably ask you to serialize a network response with JSON, where you'll create a map of ids and their resources (for fast access!) and walk through an object tree to do this. We can probably pseudo code this if you've never touched JavaScript and know nothing about its data structures (this jon snow case is rare, like jon snow).

- If you're really junior I'll ask you a generic algorithm question because I'm probably going to train you on the job anyways. No one should be punishing junior people for being junior with stupidly difficult domain specific questions. Don't work somewhere where they punish you for being junior because they won't realize how much potential you have (you have a lot).

Last note: Good luck and have fun, remember to be yourself and try your best.

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

#26
post #12

Earlier quoted context omitted.

> Even for a front-end developer you should have a basic knowledge of data structures like linked lists, binary trees, min/max heaps, depth/breadth first search, tries, recursion, hash tables, etc. I would never care about these if I was specifically hiring a front-end dev. I've never once seen any of them come up in the context of front-end work in my entire career. And in fact an interviewer asking questions about…

I don't understand how that's possible. For example, in a recent project I needed to implement a path-finding algorithm to draw connections routed around arbitrarily-placed boxes. More recently, efficiently snap a line to the nearest edge from an in-memory set of (again, arbitrarily placed and changing) objects as the mouse moves. I'm having to use and think about some item from that list on a daily basis. Where's th…

> I needed to implement a path-finding algorithm to draw connections routed around arbitrarily-placed boxes.

linked list, binary tree, dijkstra's algo - which one did you use? Why did you not settle with a O(n^3) or worse brute force?

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

#27
Im not an expert in frontend but key concepts kind of remains same across frontend design: MV*, pub-sub patterns, what not to do in a UI-thread, lifecycle of a page/view load, talk through on how candidate goes about representing a given json/xml data to a web page - can candidate show his skills in choice-and-usage of UI elements here.

Data structures.

Then specifics about language and framework.

Knowledge based questions like comparing frameworks - pros and cons. Technical challenges overcome in previous roles.

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

#28
post #24

Earlier quoted context omitted.

I don't understand how that's possible. For example, in a recent project I needed to implement a path-finding algorithm to draw connections routed around arbitrarily-placed boxes. More recently, efficiently snap a line to the nearest edge from an in-memory set of (again, arbitrarily placed and changing) objects as the mouse moves. I'm having to use and think about some item from that list on a daily basis. Where's th…

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

Who vets those libraries? And who writes them in the first place?

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

#29
post #12

Earlier quoted context omitted.

> Even for a front-end developer you should have a basic knowledge of data structures like linked lists, binary trees, min/max heaps, depth/breadth first search, tries, recursion, hash tables, etc. I would never care about these if I was specifically hiring a front-end dev. I've never once seen any of them come up in the context of front-end work in my entire career. And in fact an interviewer asking questions about…

I don't understand how that's possible. For example, in a recent project I needed to implement a path-finding algorithm to draw connections routed around arbitrarily-placed boxes. More recently, efficiently snap a line to the nearest edge from an in-memory set of (again, arbitrarily placed and changing) objects as the mouse moves. I'm having to use and think about some item from that list on a daily basis. Where's th…

This is why SV needs to stop abusing the term "engineer" - because this is indeed work that can be done on the front end, but under no circumstances should you expect front end developers to know how to do this. If you have a specific need, or you're building something very complex, then you probably want an engineer -- most companies (including any of the big ones) typically only need developers. It's good to have engineers tinkering with stuff though, that's how you wind up with things like React.

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

#30
post #24

Earlier quoted context omitted.

I don't understand how that's possible. For example, in a recent project I needed to implement a path-finding algorithm to draw connections routed around arbitrarily-placed boxes. More recently, efficiently snap a line to the nearest edge from an in-memory set of (again, arbitrarily placed and changing) objects as the mouse moves. I'm having to use and think about some item from that list on a daily basis. Where's th…

> 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. But I don't think they should be quizzed for in an interview.

Post reply on HN