For years, companies have "proven" that they hire only the best and brightest by putting interviewees through rigorous algorithmic puzzle solving on the whiteboard.
It's kind of dumb. Here's why:
Judging a developer by their ability to code on a whiteboard is like deciding to draft an NFL quarterback because of how many points he can rack up on his Xbox playing Madden.
But daily coding rarely involves writing functions longhand in a high-pressure situation.
On her laptop, using her favorite code editor, Stack Overflow open, with a glass of coffee/wine/tea next to her, headphones cranking.
Whiteboard coding, on the other hand, enforces top-to-bottom coding, and makes refactoring and refining (incredibly important skills for devs) terribly difficult.
If you need a coding exercise as part of your interview process, consider a take-home that lets people code in a way that shows their best self.
It is a totally artificial skill, and like any skill, if you practice it a bunch of times you'll get unnaturally good at it.
✅ Reverse a linked list
✅ Compute the nth Fibonacci number
✅ etc. etc. etc. sigh
If all you need is devs to reverse linked lists longhand, OTOH, this might be great!
The candidate trembles at the blank whiteboard in a silent room, watched by the smug interviewer waiting to see if she quickly codes his "preferred" solution. Tick, tick, tick.
Eyes on the back of the head. Flop sweat drips.
It makes the candidate feel small and the interviewer feel powerful. (No wonder it's so popular.)
Reading code together or sketching out pseudocode is often less intense.
While algorithms are important, typical coding puzzles are always about reinventing the wheel (coding things that other very smart people already figured out the definitive version of decades ago.)
Understanding when to use open source. Learning how to compose modules together in a cohesive way. Reading other people's code. Finding bugs through introspection. Knowing what to optimize (and what not to.)
"Why did you choose this solution?"
"Tell me about the trade-offs here."
"Could you sketch how the parts work together?"
The discussion is where you do your real learning.
Let's relegate whiteboard coding to the dustbin.