A company that I work with has asked me to do candidate phone screenings to make
ID: 642467 • Letter: A
Question
A company that I work with has asked me to do candidate phone screenings to make sure they aren't completely embarrassed when sending over someone to a potential client.
It turns out that a fair number of people were being placed for a C++ developer role. I don't spend much time in C++, but I have done a few trivial and non-trivial projects in the language. I figured that "Explain the RAII idiom" would be a nice softball question that most serious C++ developers could answer while half asleep, and would allow me to move on to more interesting questions about experience. But it turns out people who have 10+ years C++ experience don't recognize the term, even if I expand the acronym to "Resource Acquisition is Initialization." One candidate went so far as to say he felt it wasn't always practical to apply the technique in Windows development, which I thought was an odd sentiment, but I could see a couple of examples that arguably support that line of thought. (But really only arguably).
Even a couple of C++ developers I know well enough to judge their competence said they didn't recognize the term, but upon reading a summary of the technique, said "Oh, yeah, I didn't know that had a name. I just thought of those things as something you just have to do." I remember the term from the second edition of Stroustrup's book, even though the full impact didn't sink in at the time.
So, is "Can you explain the RAII idiom to me?" a fair screening question? Is it reasonable to expect all competent C++ developers to understand it? Is the term more esoteric than I would think? Assuming a candidate doesn't know the term, are there follow up questions that could help me tease out whether they have at least internalized the practices that make RAII work? Are there better alternative "weeder" questions that give the candidate some latitude in answering, and help the candidate demonstrate their understanding of C++ development?
Explanation / Answer
You seem to have found that C++ developers you know from experience are competent are unfamiliar with that acronym or even the full expression. That alone would seem to indicate that the question is not suitable as a screening question during a phone call.
On the other hand, you could get to the same point via a more roundabout way by posing a scenario. Something like: "You are implementing a Log class that will write logging information to a file. Obviously, you will need to have a member variable that is a file handle (std::FILE*). Where do you allocate and free this file handle?" If the candidate starts talking about creating an open() and a close() method rather than allocating the file handle in the constructor and deallocating the handle in the destructor, you can follow up by asking about things like how their class would behave if the calling code raised exceptions, etc.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.