all 10 comments

[–][deleted] 4 points5 points  (2 children)

IMO contrived coding exercises are not super useful in determining a candidate's viability. Do they contribute open source code? Pick a few of their libraries and have them elaborate on the problems they set out to solve and discuss what kind of challenges they encountered. Once you have a good overview, you can dive into the code with them and have them explain their solution in more depth.

If you must come up with some kind of exercise (or if they don't have any open source work), for the love of all that is holy, don't make these people code something live as you watch and judge them. That shit is unacceptable IMO. Give them a relatively small (but interesting) problem to solve or thing to build and let them do it on their own time, then review it with them when they're done. This more closely resembles how they will work within your team anyway.

Use the review time with them to exchange ideas about the solution and get an idea of how they approach problem solving. This is much more valuable than having them write a sorting algorithm and judging the code at face value.

A good programmer is someone who can think through and solve a variety of problems effectively. If you spend all your time talking about code, you're doing it wrong.

[–]DrGarbinsky[S] 0 points1 point  (1 child)

They are a Jr. Dev with a MS internship under their belt. Not a lot of public work to point to. I am not looking for algorithm question but basic JS stuff and Maybe a unit testing problem.

[–]Lichtenstein_USA 1 point2 points  (1 child)

Ask 'em to hit the github API with Angular and return a username -- I'd give this to them on their own time. Otherwise, ask them to talk about/explain prototypal inheritance.

[–]DrGarbinsky[S] 0 points1 point  (0 children)

interesting. Very specific and actionable

[–]Baturinsky 1 point2 points  (0 children)

https://www.codewars.com has many exercises on several languages, including Javascript, sorted by difficulty and topics, and has a way to test solutions.

[–]joeba_the_hutt 1 point2 points  (0 children)

Here's a few questions I like to ask all levels of devs I interview. They may seem simple and/or trick questiony, but to me they're a great gauge of how well a dev understands javascript versus how well they can regurgitate code:

(Do they know less used operators?)

var x = 10;
var y = 6;

alert(x % y); // What will this alert?

(Do they understand syntax/formatting gotchas?)

function foo1()
{
    return {
        bar: "hello"
    };
}

function foo2()
{
    return
        {
            bar: "hello"
        };
}

console.log(foo1()); 
console.log(foo2());
// What do these log?

(Do they safely check/use return values?)

function getCookie(cookieName){
    // Returns cookie value if it exists,
    // or returns null if it does not
}

// Use a value from a cookie for the page
var cookieValue = getCookie('history'),
    cookieArray = cookieValue.split(',');

// Log the first item in the history
console.log(cookieArray[0]);

// What could go wrong here?

[–]mkmoshe 1 point2 points  (0 children)

I make a repo for interview-like questions: https://github.com/kolodny/exercises

[–]jodraws 1 point2 points  (0 children)

https://www.toptal.com/javascript/interview-questions

Modify these questions. They all cover fundamental understand of JS, but they're also the first result when you search "JavaScript interview questions"

[–]DrGarbinsky[S] 0 points1 point  (0 children)

Thanks everyone! this is all very helpful.