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…
I agree that it's far from what is needed in everyday tasks, but in defense of that process: if you are unable to implement fizzbuzz, Fibonacci numbers, etc., I am almost sure you can't understand react sagas or dependency injection properly. Mixed with more open-ended questions (why was React built? how does it compare to Angular? What's a generator function?), I believe this isn't the worst type of interview. See t…
Ask HN: How to prepare for a Front-end Developer interview?
121–130 of 146 posts
Re: Ask HN: How to prepare for a Front-end Developer interview?
#122Generally, 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/Unde…
Pointers on how to improve this (while maintaining your API) would be great :) var createOlympian = function() { return (function() { var attrs = []; // private variable for our olympian attributes var olympian = { name: function(name){ attrs['name'] = name; return this; }, sport: function(sport) { attrs['sport'] = sport; return this; }, country: function(country) { attrs['country'] = country; return this; }, log: fu…
function createOlympian() {
let props = ['name', 'sport', 'country']
let olympian = {
log() {
console.log(props.map(prop => this[prop]).join(', '))
}
}
props.forEach(prop => {
olympian[prop] = function(value) {
this[prop] = value
return this
}
})
return olympian
}Re: Ask HN: How to prepare for a Front-end Developer interview?
#123Earlier quoted context omitted.
Try writing that same thing without ES6.
Try writing the same thing without a computer why don't ya. As an interviewer I can see why you would want to force someone to jump through arbitrary hoops like that but if someone can show me `() => i` and explain why that works, that would be good enough for me.
Re: Ask HN: How to prepare for a Front-end Developer interview?
#124Earlier quoted context omitted.
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?
#125Earlier 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…
Then sometimes you see a "front-end developer" role and you find out it's actually a designer role.
I don't have a ton of actual front-end dev experience but when I get to do it in my consulting role I like it. So I'm trying to move into a role like that but the comments here make me think I don't have those skills. I don't have a strong CS background but was hoping I could still do front-end dev work. Then people are talking about algorithms and being a math minor and I'm not sure I could do that.
Re: Ask HN: How to prepare for a Front-end Developer interview?
#126Earlier 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
Tip: You can stick to `const` when declaring `i` in the loop header (at least as far as the ES spec is concerned -- mileage may vary on current implementations / transpilers).
Re: Ask HN: How to prepare for a Front-end Developer interview?
#127Generally, 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/Unde…
I might have experience but that still looks totally trivial for me... is many people not passing the first test?
Re: Ask HN: How to prepare for a Front-end Developer interview?
#128Earlier 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.
Would I hire a front-end developer who didn't know that, or didn't know that they had O(1) lookup time? Very possibly. Because there are so many things that are more important than that knowledge when you are actually building software for a business. Things like experience with usability testing, JS/CSS build tools, unit testing and refactoring, a decent eye for graphic design (even if they won't be doing that work themselves), an open-mind and lack of ego -- just off the top of my head, these are all things I'd consider orders of magnitude more important than knowing technical details about hash tables.
Re: Ask HN: How to prepare for a Front-end Developer interview?
#129Most 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…
I agree that it's far from what is needed in everyday tasks, but in defense of that process: if you are unable to implement fizzbuzz, Fibonacci numbers, etc., I am almost sure you can't understand react sagas or dependency injection properly. Mixed with more open-ended questions (why was React built? how does it compare to Angular? What's a generator function?), I believe this isn't the worst type of interview. See t…
I don't understand this phrase. What do you mean by borrowed plumes?
Re: Ask HN: How to prepare for a Front-end Developer interview?
#130Earlier quoted context omitted.
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 dev…