What is a good simple problem to throw at Jr. and Mid level developers to to find out given the opportunity to Program to an Interface (like a simple Factory pattern) if they will do it?
views:
479answers:
7Get him to log different custom messages (he can hard code them) into different types of files (he can choose an interface or not).
It's simple, and shouldn't take that long. You could help with implementing the methods if that's not the focus of the interview.
Don't limit yourself to that either/or. Give something big enough that a few patterns might emerge.
How about: I want to display a dashboard of some data feeds. The date comes in messages arriving on queues. Some messages being XML, some being a binary format.
Plenty of chance for them to ask questions about the contents. See how they approach that fuzzy requriement.
For Jr. level developer: I would consider the example of abstract factory pattern as used by DBProviderFactory in ADO.net. Then build a similar example and see how the candidate approaches the problem.
I don't see why there is a growing need for the use of Design Patterns. They help, but they are not a panacea. "Given the opportunity, if they will" can be construed as both a good or a bad thing on some circunstances. Besides, if they are juniors, they probably do NOT have enough experience to look at a problem and recognize that a pattern may be applicable there.
If you want a challenge for your junior and mid, then pick real challenges. There are plenty at the Valladolid website, and they have an online judge. That was what was done to me when I was at the College.
Stick with what you know. What are typical problems that you/your development team encounter? Since you have recently worked through them, you can compare his approach to your team's.
If he approaches the problem creatively or differently he'll probably be a good fit. If he comes up with the same solution or has the same thought patterns as the rest of your team, you might not want him on board. The best development teams tend to be made up of programmers who have greatly different ways of solving problems.
If having the candidate create, from scratch, code that could benefit from a factory pattern/interfaces etc. It may be easier to have a working model up and running and ask them to refactor it as they would like to see it. Might be a quicker means to the end.
You could then bundle some other "less-than-perfect" practices in with the sample to see if they pick up on it: exception handling, disposing etc.
I had a pretty good question during a technical test just the other day.
Generate the Fibonacci sequence upto N, create an XML document appropriately to store the individual numbers and save the XML document.
This was a Web Developer interview so there were the extras of creating a user interface to allow the user to specifiy the save location and the number of itterations (N).
If you're doing TDD you can also include unit tests of the appropariate methods for generating the Fib sequence etc.