6 ms·
Writing code by hand reveals far more than you give it credit for. Someone omits a semicolon? Bam, conversation about semicolons or ASI. It's not about the fa
by niggler 14y ago
Writing code by hand reveals far more than you give it credit for. Someone omits a semicolon? Bam, conversation about semicolons or ASI.
It's not about the fanciest solution. And anyone who does it that way is foolish. It's the purest test of Language facility, and a really good springboard for all kinds of questions.
Downvoters: have you actually tried to hire someone?
- gambler 14y agoI didn't downvote, but I disagree and I did try to hire someone. Whiteboard questions are next to useless because they are, essentially, a guessing game. The candidates need to guess what behavior the interviewer wants them to exert. Some interviewers simply use it as an idiot filter, while others want the person to explain their reasoning, wile yet another group is stupid enough to think it's representative of real coding habits of the candidate. If the candidates guess incorrectly, they will fail the question, regardless of who they are or how good they know their trade. In short, interpretation of whiteboard questions is too damn subjective.
- lessnonymous 14y agoThat's bad interviewing, not bad practice. Get rid of the guessing. Make sure you explain to the candidate exactly what you're looking for. I use whiteboard coding .. and it's not to catch you out on semi colons. I even tell my candidates that they can use any language they want or even mix them together or make up their own. What I want to see on the whiteboard is a logical, working solution to a simple problem. And if your brain freezes up because it's an "interview", I'm going to push you in the right direction. Once you have an initial working solution, we're going to chat about how it works. If there are cases where it would fail. What assumptions we've made about input. Maybe we'll (both) even jump over to another whiteboard and write a new version based on our discussion. (Do your eyes light up when we've found a cool optimization??) The only language caveat I use: you can't have a call a function called doitforme() (If you or anyone you know is looking for a senior PHP job in Melbourne.AU, I'm hiring. Hit me up and I'll send you to the ad on Seek)
- niggler 14y ago"others want the person to explain their reasoning," I think far more people use whiteboard questions in that context than the article's author thinks. " If the candidates guess incorrectly, they will fail the question, regardless of who they are or how good they know their trade." I don't know about your experience, but in my experience candidates actually ask questions if you properly set up the problem and present an inviting atmosphere. And in my experience the best programmers are those that aren't afraid to ask good questions.
- xyzzyz 14y agoConversation about semicolons? During a job interview? I'm sorry, but this is a waste of time. Why don't you talk about, you know, algorithms? Concurrency? Databases? Testing? Or anything that is more than remotely relevant to the job?
- niggler 14y ago"It's the purest test of Language facility" None of your alternatives "algorithms? Concurrency? Databases? Testing?" really test language facility. Those are important, and they have their place in the interview process, but so does language awareness.
- lessnonymous 14y agoYour whiteboard doesn't have an inbuilt syntax highlighter or linter that points out when I miss a semicolon. It's such a contrived situation that to expect perfectly written code is madness.
- niggler 14y agoWhile it makes no sense in a language like C, in languages that do have automatic semicolon insertion (like JS) the question is far more interesting
- nollidge 14y agoPersonally, I'm vaguely aware that JS does ASI, but rather than waste brain space trying to understand it, I just use semicolons with everything. And anyway, what better test of language facility is there than having the person code something? Or looking at code they've written? Whiteboarding is a weird, artificial environment that's not going to represent the coder's natural behavior in the wild.
- niggler 14y agoPutting someone in front of a computer gives them the freedom to google (true story: I used to do a paper exam, and then I found one person was googling when I was in the bathroom and left the guy unattended for a few minutes). "Whiteboarding is a weird, artificial environment that's not going to represent the coder's natural behavior in the wild." You don't use a whiteboard when you code? I love them. The whiteboard is a nice tool for doodling and free exploration. I used to print out code and write on it, but I found that process to be much slower than the whiteboard.
- mgkimsal 14y agoI'll go one further. I had an interview several years ago. Talking with the owners, small shop (6 people? 8?). We get to a "let's code something on the white board" segment. Fair enough. "Write me some code that does XYZ" (I honestly don't remember what it was - something basic but not trivial). I took the marker, went to the board, put the marker to the board, then turned around and asked a couple questions. They answered, I sketched out a few lines of code, and that was that. I sat down and one of them said that I was the first person ever to ask a question before writing. Everyone else had started writing, got part way through, then asked for clarification on the ambiguous parts (or worse yet, never realized part of it was up for interpretation). Everyone handles whiteboard tests differently, but it was interesting to me to get that perspective shared with me about asking questions before writing on the board.
- lessnonymous 14y agoI wonder if I interviewed you. I've only ever had one or two people ask for clarification or want more detail about inputs BEFORE they start writing code.
- bcbrown 14y agoI find that surprising. The advice I've gotten from everyone when interviewing at the big tech companies in Seattle is always "make sure you clarify ambiguity before writing any code". I always assume that part of the evaluation is on my ability to resolve ambiguity, and always try to clarify anything I can, sometimes including writing out an example or two and verifying we agree what the expected output should be.
- mgkimsal 14y agoto be sure it wasn't writing code - whiteboarding code/pseudocode. it was a bit of an ego stroke, i think, but given the state of their company at the time, and how they advertised the position, i don't suspect they were getting many sr-level developers applying. i applied mostly cause it was close to home.