by Damian
22. July 2011 11:18
I've been trying to hire several .net developers for a number of roles over the last couple of years. I've seen some fantastic CV's but they don't tell you if the candidate is actually able to program. If the candidate doesn't have any public source code or portfolio, and most of them don't, we ask them complete the below assessment when they apply. They can do this in their own time, with whatever tool they wish to use.
95% of the candidates are unable to satisfactorily complete this assessment. I am now at the point where I look at the code first before I look at the CV. If the code doesn't pass, the CV is in the bin without me even opening it. I've had assessments submitted as word documents. I've had others that don't compile. I've even had one gent even submit a full blown, browser hosted, silverlight app that performed UI automation on a button.
I don't know if this is an indication of the average .net developer (I hope not), a lack talent in the Dublin area (I suspect so), or poor targeting by me (probably). Either way it's pretty depressing.
Am I asking for too much?
Unit Test Assesment
Given an account service contract:
public interface IAccountService
{
double GetAccountAmount(int accountId);
}
..and a class that has a dependency on this service:
public class AccountInfo
{
private readonly int _accountId;
private readonly IAccountService _accountService;
public AccountInfo(int accountId, IAccountService accountService)
{
_accountId = accountId;
_accountService = accountService;
}
public double Amount { get; private set; }
public void RefreshAmount()
{
Amount = _accountService.GetAccountAmount(_accountId);
}
}
Write a unit test to test the behaviour of the RefreshAmount method.