|
|
|
|
|
by NhanH
4022 days ago
|
|
> I ask whiteboard coding questions not because I care if the applicant can do some trivial task, but basically to gauge familiarity. Someone who writes code in a language every day for their current job should not have any trouble expressing a simple algorithm on a whiteboard. It's a screening question, and for someone who knows what they're doing, it shouldn't take more than 5-10 minutes. It's not that simple for people who really can't interview. I am one. Last week, I did an interview with Triplebyte, and I got to pick essentially an AI for Tic-tac-toe game. I know that I can brute force the game state with a recursion. I know how to write a recursive function: an exit condition, a loop for recursive along with rollback and retry. The problem is when I'm actually writing the code, my mind blank out on any and all details: I know there is an "if" there, what it should check out, but I can't put the actual condition in my mind (is it "x == y" or "x!=y" or "x==1"). So I'm screwed I know I can write the actual code, because I was able to do that right after the interview is done. |
|
The problem with the task is that you can demonstrate decrementing counters, recursive functions, and familiarity with the language, but if you don't solve the specified problem in a constrained timeframe, you fail. (My feedback was basically "You clearly know how to code, but you didn't solve the problem.")
One of the problems with the Tic-Tac-Toe AI scenario is that you have to figure out an algorithm to win at Tic-Tac-Toe. (If I recall correctly, one of the requirements is that it beats you.) I know how to play -- but to win every time? I'd have to formalize an algorithm, then convert it into working code, within a strict time limit with someone watching over my shoulder. I can do it, but probably not in 30 minutes. It'd take me 30 minutes to set up my 2D array and accept input to populate the board.
That's not how my day job works. That's not how any programming job works.
When I get a problem at my day job, I know the entire domain. I know who my customers are, I know the problems they have. If my day job were Tic-Tac-Toe, I'd know everything there is to know about how to play and win, and then it's a formality to convert that into code.
If you really want to go with the coding exercise thing, you can't focus on the "right answer." Whether their tic-tac-toe program wins every time is irrelevant. What's relevant is that they jump straight to the notion of a 2D array, that they know how to do recursion or for-loops. What's relevant is that they can write code without too many syntax errors, that they're comfortable, and that they make progress throughout the time alotted. Whether they actually cross the finish line is irrelevant at best. It's a red herring.
In the end, do you want to know if I can code, or do you want to know if I can write a winning Tic-Tac-Toe algorithm in 30 minutes? Those are two different answers -- just because I can't do the latter doesn't mean I'm not qualified. I just means I didn't pass your test.