In Personality Traits of the Best Software Developers we looked at four key personality traits of the best corporate software developers.
One of the comments, posted by Paul Norrie, raised an important question about interviewing: How can we test for attention to detail?
Attention to Detail
Someone who pays attention to detail stands less of a chance of forgetting to check their code into source control, checking their code into the wrong place, misspelling method, variable, or column names, having poor quality or missing comments, etc…
Here are a few interview questions to get you off in the right direction, realizing you should ask multiple of this type to avoid false negatives:
- Data Model – Provide a simple, two table data model with two column names spelled slightly differently (e.g., UserKey and UsrKey). Ask the candidate to write an inner join using the misspelled column. Most candidates will notice right away that something is wrong, but if they write the query and match the spellings to the data model you have to give them the benefit of the doubt and assume they didn’t want to offend you by pointing out a mistake. If they write the entire query and spell both columns the same (UserKey and UserKey), you have a problem.
- Paper Form – Give the candidate a very brief paper form asking for their contact information, but instead of asking for their current address ask only for their previous address. The candidate should raise a question about this. If they don’t, ask them if the address they wrote down is their current or previous address.
- Scenario – Give the candidate a scenario: you’re developing software at an enterprise software shop. You have all the standard tools: an IDE, database, source control, unit testing suite and bug tracker. Ask the candidate to provide every step in the process of creating a “Hello World!” application and getting it into QA. Note: There are no right or wrong answers to this question, but some commonly missed steps are: checking the code into source control, labeling the code, creating and checking in unit tests, emailing the appropriate person in QA or Change Management to move the code to QA, checking compiled assemblies into source control (some companies don’t perform this step), and creating and checking in documentation (some companies don’t perform this step – try not to work at those companies).
- Comments – Provide the candidate with a non-trivial function and ask them to write a comment block describing what it does. If at all possible give the candidate a laptop or workstation so they don’t have to write longhand on paper. Misspellings are not the issue here – a succinct, informative description is key. If their comment describes the method line by line that should raise a red flag. A C# sample method I’ve used in the past is:
private void X(Control parent)
{
Label lbl;
foreach (Control ctl in parent.Controls) {
if ((ctl) is Label) {
lbl = ((Label)(ctl));
if (lbl.CssClass == “error”) {
lbl.CssClass = “formlabel“;
}
} else if (ctl.Controls.Count > 0) {
X(ctl);
}
}
}
If you have other ideas please post them in the comments.