October 1, 2009
The question “Why?” can be interpreted to mean “What’s the cause?” or “What’s the purpose?” Why do you go to work every day? The cause is the employment agreement, the purpose is to make money. Some questions have only a cause (“Why do you like spinach?” “Why did the sun rise this morning?”).
In everyday conversations I try to ask the unambiguous form of the question, but when interviewing job candidates I’ve found it useful to keep it ambiguous to see which one they’ll pick. It reflects something about the way they think.
For example, I’ll ask a senior database administrator (DBA) candidate what style he uses to name tables (capitalization, prefixes, underscores, pluralization). I have a preferred answer to this, but whatever answer they give I’ll ask, “Why?” Most candidates will interpret this to mean, “What’s the cause?” and will answer “Because that’s what the style guidelines say at my company.”
At this point the interview is pretty much over, but I’ll usually ask something like, “Well what if you worked here?” The answer is usually, “I’d follow your guidelines.”
“What if you had to write the guidelines?”
“I’d use the same ones.”
“Cause that’s what’s in the guidelines of the company I work for now.”
At no point is the candidate considering the purpose interpretation, which is the interpretation I’d expect from a senior candidate. He should be thinking about the benefits of the style he’s using over the alternatives. Not doing so shows a lack of introspection, and someone who doesn’t introspect won’t improve and isn’t senior.
My ideal conversation would go something like this:
“What style do you use for table names?”
“All lower case, with underscores between words, singular.”
“Uppercase can cause problems in some dialects because of the case-insensitive nature of the parsers, and you’ll get different results on Windows and Unix with MySQL because they use the table name for filenames. Underscores make it more readable, and singular reads better in most places (though not in the actual join clause).”
At that point the interview is also over, but in a good way.