My company is hiring a junior front end dev to do my FE bitch work. I want them to pass a programming test (javascript). Something that shows me that they won't fuck up anything if I leave them alone but not too hard that it scares away qualified candidates. What are good programming questions to ask on a test?
What I have so far: 1. fizzbuzz 2. reverse a string 3. value of this when it's in a function inside of a function
I don't think there's a convention for this kind of test, fizzbuzz for example is considered a very poor avaliation exercice, but people use it anyway because no one can reach a consensus.
I'd go to freeCodeCamp and grab some tests from there, or Codewars if you think that's too trivial.
fizzbuzz is a "do you know the mod operator"/"can you read" type of problem it's funny though, if you make a fizzbuzz thread you'll see many people will fail, for instance missing the range (say, not printing 100), and just make small mistakes
Aiden Fisher
1. Char-fizzbuzz. The program should print "a b Fizz d Buzz Fizz g h Fizz Buzz ..." 2. Reverse a string recursively. 3. What does (x=>x=>x)((x=>x=>x)()(this))() evaluate to and why?
Landon Brown
White board
Jackson Campbell
Give them one easy, one harder, one relevant architecture type question.
>Reverse a string >Find all palindromes in a string >"Pretend I'm the client and I'd like a web page to contain x, y, z information. Ask me questions and tell me how you'd go about designing it."
The idea with these things is not to have right answers, but compare the applicants and get a sense of who did the best. Think about speed, how much help they needed, attention to detail, process etc.
Jack Hughes
> front end design > don't test them on css grid or anything front end
Matthew Perry
reverse a non-binary tree
Wyatt Gutierrez
Not only just on a test, ask about how they would overcome a problem where they are unsure of anything. Helpful websites, documentation sources.
For a junior, I never really see a problem with their answers, but it does let you paint a picture on how well they might cope
Caleb Flores
God fucking damn when will this faggot minimalist vector art style die already? Pic related
John Wilson
Brainlet here.
In the first one, would the 'best' way of achieving this be to index each character of the string and then print the index in reverse?
And would the second involve naturally occurring palindromes or constructed? As in, rearrange characters to find all possible versus whatever is already there.
Jackson Torres
There is no "best" way. You could use split, reverse and join to show you know JS. You could write a decrementing for loop to show you know basic programming logic. Both are acceptable.
Justin Murphy
>avaliation get out pajeet
Adam Perry
use a real laguage (the one that has a switch case statement)
Julian Gomez
how about practical ones: 1. fizzbuzz 2. sieve all primes below 500 3. take some data from A.xml, parse and process it in a specified way, and store it in B.xml 4. reverse every second sentence in a given paragraph, ex: test me. test this. test that. = em tset. siht tset. taht tset. 5. write your own grep 6. make a snazzy website UI from some scraps of code i give you.
this should all be doable in 4Hrs max.
Carson Wright
>avaliation
OP, just make the dude spell a few words in english. If they can spell words in english, they can read english. If they can read english, they can copy and paste from StackOverflow. And if they can copy and past from StackOverflow they are over qualified for front end web shit development anyway.
Caleb Jones
I don't have many ideas for you but string reversal is good. Except ask them to implement a .reverse() method for the String type. Shows they know that a prototype is.
Look at their portfolio, particularly the JavaScript, accessibility and use if modern tooling, html5/css3. Are they getting a front end developer because you suck or are overworked? If the former delegate this to someone smarter.. really though, fizzbuzz for front end is dumb.
Wyatt Sanders
If they can't explain how prototypes work don't hire them
Ask them to iterate over the properties in an object.
Christopher Powell
>3. What does (x=>x=>x)((x=>x=>x)()(this))() evaluate to and why?
It evaluates to whoever wrote that being fired
Evan Campbell
>all these language-specific assumptions
Jordan Reed
there isn't a single intelligent suggestion in this entire fucking thread
Jeremiah Gonzalez
>Ultra easy #2. 50% of Jow Forums will fail here you're kidding, aren't you?
Bentley Lopez
Don't give them shitty unrelated programming brain tesears. Ask them what websites they have made and look at the code.
Anthony Garcia
Easy.10 is pretty imprecise. What does it mean to select the furthest away state? The one where the closest cinema is furthest away? The one where the mean distance between it and all other cinemas is the smallest? Some memery with a convex hull?
Tyler Allen
Do you seriously ask these during interview ? How much would you pay someone that coast through them ?
Wyatt Wood
I would stop halfway through the easy questions because too much effort.