Programming is not Performance Art
I’ve been writing code since I was 12 years old, which is a very long time. In that time I’ve seen professional software engineering go from bands of artists to hacker collectives to exclusive MENSA clubs.
It’s the latter that I want to address here, particularly the notion that one must have the most unnatural of talents to prove beyond a shadow of a doubt that one can write code.
The unnatural talent in question is writing code, but not as we think of it in the traditional way: on a computer. Rather, the code writing that I’m talking about is the most backward possible way to approach the problem - on a whiteboard.
I have nothing against white boards. They have served us well for a variety of scribbling and group communication that generally falls under one of a few categories such as boxes and arrows, lists, and art.
You’ll notice that I didn’t include code in that list, because people don’t generally write code on a whiteboard. That is, unless they’ve become slaves to the cargo cult of programming interviews.
Writing code on a white board has only become de rigueur through the triumph of tech companies and the also-rans that follow them into the banal future that this portends. A simple search on Amazon demonstrates just how bad this has gotten. It’s hatched an entire cottage industry of books promising to deliver you a job at google as if Ed McMahon were delivering it on television. Sigh.
I’ve spent enough time on both sides of professional software engineering interviews to know that I can identify talent without issue. I do this through the oldest technique in the book: conversation.
If I want to go deeper than a conversation affords, I’m happy to have a candidate bring the computer of their choice with the software of their choice to demonstrate their art and science, as it’s practiced with their chosen tools.
I don’t actually care whether someone can layout syntax on a whiteboard. What I do care about is whether they can write an algorithm around a particular idea.
for each person in persons if person.age > 21 person.allow_alcohol_consumption = true else person.allow_alcohol_consumption = false person.save
At that point, I know that they can reason about everyday problems the way a chef reasons about recipes. Algorithmic pseudocode is a reasonable thing to do on a whiteboard, much like architectural boxes and arrows or venn diagrams.
But to expect someone to do this on a whiteboard:
from itertools import chain all = list(range(1, 101)) divisible_by_3 = dict((x, 'Fizz') for x in filter(lambda x: x % 3 == 0, all)) divisible_by_5 = dict((x, 'Buzz') for x in filter(lambda x: x % 5 == 0, all)) divisible_by_3_and_5 = dict((x, 'FizzBuzz') for x in filter(lambda x: x % 3 == 0 and x % 5 == 0, all)) remainder = dict((x, x) for x in [x for x in all if not x in divisible_by_3 and not x in divisible_by_5 and not x in divisible_by_3_and_5]) all_dict = dict(chain(divisible_by_3.items(), divisible_by_5.items(), divisible_by_3_and_5.items(), remainder.items())) for x in all: print(all_dict[x])
is silly, because a whiteboard has no ability to convey the fundamental nature of programming: interactivity. A whiteboard is not a responsive medium. It has no idea what is being written upon it, nor can it respond whether the input it receives is right or wrong. That’s all left to the interpretation of humans staring at the whiteboard, and that interpretation is often wrong.
Anyone who’s written code long enough comes to understand that the practice of programming is a conversation between the programmer and the software cum brain prosthetics that interprets typed commands and enables the computer to carry out your wishes.
You don’t have to take my word for it. Just read what David Heinemeier Hansson had to say when asked by an interviewer about whiteboard coding:
Yeah that is the worst thing ever. Artificial coding sessions at the whiteboard are the devil, and companies that follow them deserve what they get. If you pulled me out and made me write Bubble sort or something on the whiteboard, I’d probably fail that miserably. I would fail the majority of these whiteboard tests.
Basecamp CTO and Rails founder
If you were tooling up the next great rock band in the world, would you invite Dave Grohl and Eddie Van Halen over and ask them to write music on a whiteboard? Of course not, because they’d be laughing so hard, you wouldn’t have to worry about your next career choice, because it wouldn’t be music. Nope, they’d expect to bring their kit and axe, respectively and get on with it. Why we haven’t figured this out in software is beyond me.
Google can afford false negatives, you cannot.
The next time someone asks you to go through a whiteboard coding exercise, whether you are the interviewer or the interviewee, think different: try using your own computer with software tools that you choose. The results are frequently better and an interviewer can also have the experience of talking through problems collaboratively the way you would in pairs programming, which is actually the way many of the best coders in the world work.