What do you do when you don't have any good code samples available when asked by a prospective employer? I like to consider myself a fairly capable developer but I can't share any of the software I've been writing for my company the last few years.

Unfortunately, I haven't been able to find the time to put much work in my personal projects either. Basically, I don't think I can find any code samples that are a good representative of my skills that I can share. Any ideas?

Thanks in advance.


4 Answers 4


If you can't share your employers code, and you have no personal code then you have two options, inform your prospective employer that you can't oblige them, or write a small project.

Your best bet would be to try to spend a weekend making a small application that uses a few common patterns, is TDD, and is built to the highest quality you can achieve. Perhaps a domain shortener or some such.

Presumably the employer doesn't want to trawl through thousands of lines of code, but is looking to see tests, well named methods and classes, and a general lack of spaghetti coding.

  • 3
    This was going to be my answer. In short, you need to make time to produce some sample code.
    – Pete
    Commented Jun 26, 2011 at 18:09
  • So, I want to start using GitHub, but for some reason I do not want others to see my progress. I only want to check in something that is pretty much complete. My reasons: my free time is scarce, and so there might be 2-3 months when I am too busy to make any changes. Whoever views my history would notice that. Am I too paranoid?
    – Job
    Commented Jun 26, 2011 at 18:14
  • Are Github repositories always public? I haven't used Github. In general, just make the repository private and only send people the latest code when they ask for a sample.
    – jhocking
    Commented Jun 26, 2011 at 18:32
  • 1
    @jhocking: Free Github repositories are always public but you can pay for private ones. Commented Jun 26, 2011 at 22:50
  • If the project is in a usable state, then I think it is totally acceptable not to have any changes in a longer stretch of time. Commented Jun 27, 2011 at 7:40

I agree with another answer, that you need to find time to write some code.

Another approach that requires less time in a row than writing a project is to do a series of catas and put them on a website (or flash drive you bring with you.) Catas are short and easy to do. If you spend 15-30 minutes a day, you'll have a bunch of code in a week or two.

How do you get to be a great musician? It helps to know the theory, and to understand the mechanics of your instrument. It helps to have talent. But ultimately, greatness comes from practicing; applying the theory over and over again, using feedback to get better every time.

How do you get to be an All-Star sports person? Obviously fitness and talent help. But the great athletes spend hours and hours every day, practicing.

But in the software industry we take developers trained in the theory and throw them straight in to the deep-end, working on a project. It’s like taking a group of fit kids and telling them that they have four quarters to beat the Redskins (hey, we manage by objectives, right?). In software we do our practicing on the job, and that’s why we make mistakes on the job. We need to find ways of splitting the practice from the profession. We need practice sessions...


Short answer : you need to do a side project.

Longer answer : pick something you want to do in current job. Can then show it to future employers as it's a prototype. It could be shown to current job if you think it'll earn some brownie points.


For this particular employer, explain that you don't have any code samples and explain why, then offer to write some code for them as a test. Ask them what they would like you to program.

For the long term, prepare some code samples. The question's going to come up (not every time, but a lot) so be ready for it.

Not the answer you're looking for? Browse other questions tagged or ask your own question.