Great Interview Task

time to read 4 min | 765 words

A couple of days ago I had a really great interview, I figure that I am due one after the long series of horrible candidates that I had recently. Anyway, I did a couple things there that I think that I will carry on to the future interviews. I gave the guy a laptop, and the following excersise, given the follwoing object model:

public class Customer
  public List<Order> Orders = new List<Order>();
  public string CompanyName;
  public string Id;
public class Order
  public int Id;
  public Customer Customer;
  DateTime ShippedAt;
  DateTime OrderedAt;

And the following SQL Statement:

SELECT  Customers.CustomerID,





FROM    Customers

INNER JOIN Orders ON Orders.CustomerID = Customers.CustomerID

The task is to give me a list of Customers with their orders collection filled. No duplicate customers are allowed. I think that you can see why this is a subject that is near & dear to my heart ;-) Anyway, this is a task that test several distinct parts of the candidate's knowledge, SQL/Database, ADO.Net, minor data structure, logic, etc. It also says a lot about the background of the candidated as they approach it.

Another thing that I thing that I'll keep is asking them what they don't know and then give a task in that area. The task is neccecarily trivial, but it shows how the candidate can learn and think. I don't want co-workers that needs step-by-step instructions.