What should my "code sample" look like?

Posted by thesunneversets on Programmers See other posts from Programmers or by thesunneversets
Published on 2011-02-23T22:24:49Z Indexed on 2011/02/23 23:33 UTC
Read the original article Hit count: 312

I've just had quite a good phone interview (for a CakePHP-related position, not that it's especially important to the question). The interviewer seemed to be impressed with my resume and personality. At the end, though, he asked me to email him a code sample from my existing work project, "to check you're not secretly a terrible programmer, ha ha!"

I'm not too worried that my code can't stand on its own two feet, but I'm very much an intermediate programmer rather than an expert. What obvious pitfalls should I make sure my code sample doesn't fall into, in case they rule me out on the spot? Secondly, and this is probably the harder part of the question to answer, what features in a code sample would be so impressive that they would instantly make you much more favourably inclined towards the programmer?

All ideas or suggestions welcomed!

© Programmers or respective owner

Related posts about interview

Related posts about code-quality