Recently I had several job interviews, some for a Rails developer role and some for management roles. It was an interesting experience and there were a handful of things I noticed.
First, a lot of interviewers want to ask about specific syntax issues…regardless of whether that skill was in any way relevant to the role. For example, I was talking to one place about a “project manager contract” role. Basic stuff, manage the schedule for the R&D Manager. It wasn’t something that I was interested in once I understood the role, but even less so after the questions kept coming back to things like “how would you implement something like Java’s Final class in C++?”.
There are two fallacies at play here. The obvious is that for the role we were talking about ANY kind of development skills were pretty much irrelevant. The other is the idea that knowing specific syntactical oddities of a language equate to knowing how to write good code. If the job is about writing C++ code, ask how you override an operator, what the challenges with multiple inheritance are and how you can avoid them, or ask the candidate to read a bit of code and explain what it does.
A second item I noticed is the “logic puzzle” question. I think this was really popularized by Google. Properly applied this can help an interviewer see how a candidate thinks about a problem separate from a specific language. One example is the Light Bulb Drop Problem. It can also help an interviewer evaluate how a candidate reacts to stress. I have two issues with this though. First, the problem usually has absolutely nothing to do with the job requirements except in the vague sense of “problem solving”.
The other problem I have is that every time I’ve been asked a question like this the interviewer doesn’t really understand how to solve it themselves. The question is something they read on the ‘net. They can repeat the solution they read but they don’t understand how to solve it themselves. I ask you, what is the point?
Another technique that is popular is to show the interviewer some snippets of code and ask them what they do. This can be really useful for evaluating candidates as long as the code isn’t written purposefully obfuscated. For example, one place had an extremely convoluted line of Ruby code — maybe 8 or 10 expressions all run together with a literal array of characters, regex, character substitution and so forth — and the question was “what will this return?” The, uhm, Canonical, way would be to drop into IRB and evaluate it. The return value from the expression was “Ruby Ninja”, honestly if I saw that kind of code in a real world scenario I would run (not walk) in the opposite direction! I wish I’d saved a copy of the snippet — it was a great example of BAD code.
More useful snippets for review would be things like these:
a = [1,2,3] def a.[] (i) super(i-1) end
What does that do? It’s basic Ruby code and it shouldn’t pose any problem to a developer that understands the basics of the Ruby object model.
class Foo
def self.m (&block)
class << self
self
end.instance_eval(&block)
end
def initialize
self.class.m { @foo = 1 }
end
def foo
self.class.m { @foo }
end
end
This one is a bit more advanced, and you have to know something about Ruby Meta Programming to make sense of it.
In part 2 I’ll post a few of the programming tests I came across.
Posted by joemcglynn 







