If my recent job-hunting experience taught me one thing, it’s that I’m never again doing whiteboard coding to try to get a job. Whiteboard coding is beyond stupid and companies that practice it – use it a core indicator of ability – are at best misguided, at worst broadly unconcerned with software quality.
There is an exception, I suppose: whiteboarding a block diagram of something – “design me an N-tier web service for foobar blah etc” – is a potentially useful exercise. It is entirely relevant to things programmers, devops, and others do every day. A conversation about lots of useful things can result from that.
But coding? Writing a reasonable facsimile of working code off the top of your head, without a single reference, without the ability to drop into a REPL or gin up a test case or 3? No man pages, no Stack Overflow, no quick convo in the Slack channel, no hallway meeting? That’s how code gets written in the real world. That’s what you’re testing in a candidate.
Give a take-home assignment that tests their actual ability to write code. Bring them in for a code review, discuss software quality and design. If you absolutely MUST make them do a live test, let them use their laptop and preferred environment. (You probably DON’T need to do this, though.)
I feel reasonably comfortable saying that the first thing I think I will ask a prospective employer is, “Do you require whiteboard coding in the interview?”. An affirmative answer is a clear sign not to move forward.
The whiteboard code test: not even once.