Man, I really hope people contribute to this. It would be great to see the list of challenges with supposed difficulty level and expected amount of time needed to finish.
Someone should make a repo for testing designer skills as well. Thanks for sharing! This is really well done.
I'm interviewing for JS devs and trust me, none of ones I interviewed could write a _.debounce function. Async throttle for promises?! If we find someone who can understand the question she/he will be hired. They don't need to solve it!
I'm looking for work as a programmer, and I think I understand the throttle question and approximately what a solution would look like, although I would need research to actually write one. Debounce sounds easy though. I'd love to talk about your company and any opportunities you might have open, my email address is bcoburn3@gmail.com
Are you hiring frontend JS devs or backend Node.js devs? If a backend dev doesn't understand the question and can't implement a basic debounce function then you are setting yourself up for a completely broken backend.
I've found that JS hiring in particular is very tricky because every frontend dev that has used a little jquery suddenly thinks they can create a server, which is completely inaccurate.
Interview questions like this can help you trim it down to the .5% who are actually capable Node.js devs.
I did an interview where they asked me exactly that. I got to a solution, but it took over a half hour which was too long and I wasn't hired. I barely understood closures at that time though! Today I could some thing like that so quick...
I like their interface a lot, but I'm not sure how I feel about the challenges they actually have for JS. It seems like there's a lot of challenges that are trivially solvable with Array.prototype.map, and then a bunch more that are super complex and (for me at least) unsolvable. I wish there were more challenges in the middle :(
It's cool that these challenges are so functional programming oriented, but I'd be a little bit concerned that the terminology might throw off some otherwise-skilled web developers who aren't used to operating at such a theoretical level. That problem would be compounded with definitions like "A thunk is basically a function that you call with just the callback as a parameter," in the challenge instructions (IMO that's a very layman definition for such a technical question).
Hey those are pretty neat challenges! Personally I like tackling a project I'm interested in that requires many of these aspects but these are pretty handy if you want to quickly study or test a particular idea.
Edit: Glad to see an implementation of async.js in there as well; I feel like writing your own version is practically a rite of passage in JavaScript.
You can make an interesting challenge out any one of the bigger (in LOC) functions of underscore.js or any promise library. You get a profound "a-ha" moment the first time you implement `deepClone` or `Promise.all`
JavaScript objects are always pass reference by value (i.e. you're passing around addresses copied by value which are then dereferenced when needed). Copying objects at all in JavaScript is therefore somewhat non-trivial, especially if you need good performance. Typically, the most performant way to deep-copy an object with an unknown structure is to do:
var objCopy = JSON.parse(JSON.stringify(obj));
But that 1) is a rather disgusting hack and 2) can potentially break on certain native JS Objects (like Date, for example). The most straightforward way would be to use a for-in loop with a guard for Object.hasOwnProperty(), but in practice, that's very slow by comparison.
Thanks for sharing. Does anyone have an extra copies of the Hack Reactor challenges/lessons? Would love to brush up on my JS skills and I hear they're the best.
Think there's an issue with the throttle challenge
For tests 3 and 4, you expect the context and args to be determined by the last callback. But according to the first 2 tests, the last callbacks should never be invoked.
Are these challenges supposed to be solvable within a reasonable amount of time in an interview (15-30 minutes)? Looking through the problems they are all things I could do, but I don't think I would be able to solve any of the harder ones in under an hour - and that would be on my own, not in a high-stress interview.
Is solving a problem like this in 15-30 minutes under a good deal of stress and likely without reference likely on a whiteboard something someone in the position you're hiring for would ever need to do?
Another nice task that fits in here is to convert an integer to a decimal string and back. Obviously without using the native functions that do the same.
Or to make a histogram of the letters that occur in some file.
https://github.com/rmurphey/js-assessment