It's part of my job to interview new candidates and I came up with a test that pretty much measure the coding skills of the candidates. However I couldn't (yet) come up with a good question to measure the candidate's capacity to deal with abstraction.
Earlier I had the following question in my test:
Suppose a tree structure where each node stores an integer value. Draw the simplest Class Diagram using UML that represents the domain model described.
Then I'd ask:
Now change the model on question above to represent a leaf (i.e. a node that has no children).
Eventually, after several interviews, I realized those two questions were not giving me any clue if that candidate knew abstraction. Some people knew the answer but during the interview showed me they actually don't have a clue when it comes to abstract more complex subjects.
I can't really have a very deep complex question in this test because:
- The total time for the entire test is ~2h and they already spend about 1h to 1h30 in the first part (coding skills)
- A good candidate might fail in a specific complex question and that would not really prove they can't abstract at all
After reading this article I got intrigued when he says:
Inventing questions that force candidates to understand pointers without using C isn’t too hard. Nearly any question that forces candidates to invent a data structure (e.g., a hashtable, an AVL tree, or the like) will test how they handle indirection, the idea that having a thing is different from having a pointer to that thing. So I’ve picked a question that forces candidates to design a data structure. And, sure enough, I see candidates who have a lot of programming experience, but who don’t “get it”, completely bomb out in my interview.
The way I see it, inventing a data structure is a good way to measure abstraction skills.
So my question is, does anyone know a good question (or a set of small questions) that could measure for abstraction skills in a test?
I'm looking for those kind of questions that:
- Don't depend on any language in particular
- Can be answered by smart people
- Can't be answered by people who know all books by heart
- Will take average 40 min to solve
- Will not produce huge amount of pages as an answer