Live data from Hacker News

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

news.ycombinator.com

91–100 of 146 posts

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

#91

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…

Ah interviews; when you realize all your programs have been opening all the files they need to for months and you can't remember the exact syntax for opening files in any of the half-dozen+ languages you've written production code in.. :D

Fizz/buzz, graph traversal, and etc actually come much more easily for me haha.

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

#92
tl;dr Have a zen attitude about getting turned down. The best companies in the world are still spectacularly bad at technical interviews.

Whew, reading these answers is depressing. Not because of any of the answers that anyone has given (they are mostly good) but because it's a reminder of the state of both software engineering interviews and the state of the JS ecosystem.

I recently started a company but before that I was at a company that would be considered by most to be top-tier amongst places that create web based software. After leaving that job I interviewed at and received offers from several other places that are top tier by SV standards (think GooAmaFaceSoft and their similarly hyped but non-public peers).

One of the interviews was over coffee because networking really is the bees knees (there were further rounds involving actual programming). While it started as a fairly straightforward "tell me about…" interview, we eventually got to just chatting as peers in the industry. One of the points of discussion was the state of interviewing technical candidates. I've interviewed >150 candidates over the past 8 years. I'm opinionated about all sides of the process and I think I as well as the rest of the industry have a lot to learn.

In a moment of candor I said to the person across the table something along the lines of "I'm very confident in the fact that I'm a great engineer overall and that I'm particularly skilled and highly marketable as a JS dev because that's what I've been focused on for the past five years. That said, throughout these interviews, I wouldn't be surprised if I get an offer from about 50% of my interviews."

The person who has sat down to interview me and would later give me an amazing job offer mostly agreed with my statement. They tried to be comforting asserting that it would probably be a little more than half. In the end I got offers from 3 out of 5. All three of the offers were had a first year take home north of 2x my previous salary.

None of this is an indictment of the companies that turned me down, I just think it's worth saying to someone prepping for interviews that there's a strong chance that you'll get turned down. You might truly bomb and interview and you might walk away thinking you nailed it only to learn that they didn't feel the same way.

Don't let it get to your too much. Zen mode, enabled.

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

#93
post #12

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…

> 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'm confused. You've never even seen a hash table come up before? What sort of front-end work are you doing?

I just find this extremely unlikely if not borderline impossible. Hash tables are one of the most universal data structures in practical software development. This is just as true in JavaScript for front-end work as it is anywhere else.

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

#94

Earlier quoted context omitted.

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?

Depth-first and breadth-first graph traversal does come up. Example: you're implementing a task tracking system, where tasks can have dependencies. Boom, that's a graph. You want to display a whole graph of dependencies of a task (and dependencies of dependencies, etc.). Boom, there's graph traversal. You need to limit the number of tasks displayed in that graph, because someone added a thousand dependencies somewher…

> Now, about most of the other things that were mentioned… I'm not convinced.

Your graph example could just as well also be a tree example depending on the structure of the dependencies. Hash tables show up everywhere. Recursion is a natural and general programming technique. That only leaves linked lists, tries, and heaps from the original list. I'd agree that these are less likely to pop up in general front-end development, but it's not impossible to imagine them being useful.

I'd rank the concepts from the list in this order (obviously very subjective):

- Hash tables. Universal concept in programming. If you don't know this, you don't know how to program.

- Recursion. General technique for structuring code. Not understanding this indicates a severe lack of exposure to code in general.

- Graphs. Lots of data is naturally structured as a graph. I think it's natural to include trees in this category as well.

- Linked lists. Classic data structure. They're mainly worth knowing about in order to be aware of their performance shortcomings with lots of data. It's less about knowing when to use one and more about knowing when not to use one.

- Heaps. When useful, they tend to be incredibly useful. But they're not all that useful for front-end development.

- Tries. Similar to heaps in this regard.

Personally, I think for a purely front-end role that won't be focusing on the development of new libraries but just the usage of existing ones, I'd focus only on hash tables from this list and use the rest of the interview for more targeted questions.

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

#95
post #66

Earlier quoted context omitted.

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

I'd probably ask you to do the printouts from within the function itself. If you haven't already read them, I highly recommend the You Don't Know JS series of books. One of them covers this exact question.

neat series of books. thanks for the tip

https://github.com/getify/You-Dont-Know-JS

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

#96
post #12

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…

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

So, the first-half, no... never use. But depth/breadth first search, tries, recursion, hash tables... Absolutely use these as much in front-end as in back-end.

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

#97
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

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.

[deleted]

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

#98
Closures, specificity, home made getElementsBySelector, DOM traversal stuff, weird IE things, coding standards, an understanding of how jquery works, how to protect against npm poisoning/leftpad issues, lodash, semantic naming strategies, being opinionated (why is BEM shit/great?), box model, floats, flex box, centering techniques, an understanding of how plane old js works, cross origin/same origin stuff, basic design principles (spacing, fonts, information hierarchy, fitts law), react.

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

#99
post #54
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…

An interview shouldn't be purely theoretical, but I disagree that there's no place for this stuff. As an incredibly simple example that comes up all the time, if you get back a collection of items from an API do you store them in a hash keyed by id or in a list? If you can't reason about how e.g. lists are ordered but a hash has O(1) access, and use that to decide which is better in a particular case, you won't be a…

Expecting somebody to know the difference between a hash and an array is reasonable but you can hardly complain about a lack of qualified people if you disqualify JS applicants for not knowing what a trie is.

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

#100
post #93
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'm confused. You've never even seen a hash table come up before? What sort of front-end work are you doing? I just find this extremely unlikely if not borderline impossible. Hash tables are one of the most universal data structures in practical software development. This is just as true in JavaScript for front-end work as it is anywhere else.

Expecting somebody to know what a hash table is and understand the time complexity of inserting and looking up elements is fair. Expecting them to build one from scratch on a whiteboard is just ritualized hazing.
Post reply on HN