What would be a good sample project to ask a prospective programmer to code during the hiring process?
<p>My understanding is that asking for a work sample is a good way to determine if someone has the skillset you are looking for, as some people just interview well. So I want to ask potential developers to write some sample code for me.</p>

<p>I'm looking for ideas on what kind of small project would be something they could do in an hour or two, and would show that they have a good grasp of OOP, good coding practices, etc. And what to look for once they finish - how to evaluate it fairly and usefully.</p>

<p>For context, I'm a small business owner, interviewing prospective developers, for PHP development on internal projects. I can code PHP but am not an expert (some of the work is refactoring code I've written to be better structured and consistent), and so I'm also looking for what to look for when evaluating the samples, given that I'm not a trained or super experienced programmer.</p>

<p>Especially for people who have done hiring of this type before and used this method.</p>

<p>I was also thinking I could give them some code to refactor, and see how they do on it. Has anyone ever given a refactoring test as part of the hiring process?</p>

<p>Clarification: 
I'm not talking about coding during an interview. I'm talking about coding <em>instead</em> of an interview. For context the inspiration for this question came from this article in FastCompany about how work samples are better predictors of job success than interviews:</p>

<p>Why It May Be Wiser To Hire People Without Meeting Them 
<a href="http://www.fastcompany.com/magazine/136/made-to-stick-hold-the-interview.html" rel="nofollow">http://www.fastcompany.com/magazine/136/made-to-stick-hold-the-interview.html</a></p>
