Hacker News new | ask | show | jobs
by timbuckley 3288 days ago
I agree whiteboards are great for all those things. But they are terrible as a way to write actual code. The problem is that many whiteboard interviews have you write actual code on the board, and all of the inefficiencies involved in that.
2 comments

If the company/interviewer cannot tolerant small typos, wrong standard library function signatures, or similar small "bugs" on whiteboard coding, that's their problem.

If they are OK with things like "I cannot remember if the second parameter of Java's String.substring is end index or length, let's just assume it's length here", I don't see how inefficient whiteboard coding is (besides typing on the keyboard is usually faster than writing on the whiteboard).

Sorry, are you trolling, or do you not even code? You don't indent/dedent, cut-paste, or refactor? You know exactly how you will write an entire file before you begin? This is before we even get into ergonomics such as running out of vertical/horizontal space, or having bad handwriting.
indent/dedent: how is it less efficient using handwriting than using keyboard? If you mean the case like you realized that you need to add an if to add another level of indention, any interviewer/company requires you to wipe the whole thing and reindent properly on the whiteboard is not worthing working for anyway.

cut-paste: if you are doing this a lot, you are doing it wrong.

refactor: sure. but for whiteboard interviews, it's rarely needed, or it's small enough that you can just wipe and rewrite it again on another part of the whiteboard.

Of course, all these points are assuming that the interview question is "suitable" for whiteboard interview. If you find yourself need to write more than 100 lines of code on a whiteboard during for an interview question, at least one of the interviewer and interviewee is doing it wrong.

seriously?

it's just code on a whiteboard. none of that stuff matters.

I've never had a whiteboard interview where they cared about the syntax. I used pseudo code every time and they've always accepted it without problem. I can imagine places where this isn't the case, but they are just bad interviewers. The point is to talk through a problem, not write working code.