I'm looking for some small programming projects that I can give potential employees to gauge their programming abilities. These will be programmers straight out of college. I'm looking for projects that would take someone a couple of hours and they would email back their answers post-interview.

One example would be to take this paragraph of text and return a list of alphabetized unique words. After each word tell me how many times the word appeared and in what sentance(s) the word appreared in.

Anyone have any good suggestions?


I've long-since concluded that nothing someone can do in a short time can tell me anything useful about that person. But every good candidate has personal projects already written which can tell you a lot. So I've replaced specific challenges with "give me a piece of code which you're proud of and happy to stamp your name to."

Their choice of project tells you more than any hour-long task. And then you can spend an hour discussing it to learn even more.

| improve this answer | |
  • 4
    I remember interviewing at a company and being given a fairly simple (15-20 line) function and being asked "What does this do?" I told them, then asked "Does anyone get that wrong?". I was told that the majority of people they had interviewed couldn't answer. Maybe that's a quick alternative (I don't know anyone who can read code that can't write it, but maybe I just haven't met the wrong people). – TMN Mar 18 '11 at 16:41
  • 4
    @TMN - Oh, we do that a bit as well. But I have met people who can read code and not write it well. – pdr Mar 18 '11 at 16:45
  • @TMN Being self taught, I spent a significant amount of time reading code early on to the point of being far better at reading it than writing it. It can and does happen, it just takes time and practice to bring the writing it skill up. – Jimmy Hoffa Aug 22 '13 at 2:31

I get so tired of this mind-gamey crap. I've been at places that asked me for code samples, ripped them apart, and then asked me to explain example code from their systems that looked like it was written by cracked out 2 year olds. I've been asked to implement obscure sort algorythms, network services, guis, data structures (always either a tree or a linked list). Every flavor of fiddling annoying question about whatever the interviewer thinks is the most important part of programming.

In the end it's all pretty much useless. The best way to evaluate an employee is to hire him for 30 days, and see how well he does the work. Spend all the time you want developing tests, and it won't tell you a thing about how someone works on a day-to-day basis.

| improve this answer | |
  • 8
    Coding a simple algorithm like the one bigtang described is not "mind-gamey" in the least. Being able to do something like that should be a prerequisite to even getting an interview (and it is, at my company). It's very useful for screening out candidates who otherwise look great on paper. The last thing I want to do is spend hours interviewing someone who can't write a function to tell if a string is a palindrome. You'd be amazed at the number of CS PhDs from top schools who can't do bigtang's test. In short, being able to complete a test like this is necessary but not sufficient. – Jer Oct 18 '11 at 18:56
  • +1 @Jer. Last time I interviewed for a programmer, six out of eight candidates couldn't complete the most basic tasks (even with Google and SO). There's no way I would let them near my real codebase for five minutes, let alone 30 days. – Julia Hayward Mar 2 '15 at 10:40
  • 2
    @JuliaHayward: I would expect anyone to be able to complete a project with access given to web/documentation. The problem crops up when someone starts throwing buzzwords and obscure sort algorhythms at you without access to the internet, under the false assumption that having memorized various sort techniques or whatever is critical to every day job performance. – Satanicpuppy Mar 2 '15 at 15:52

Allowing someone to do a practical project on their own time doesn't necessarily mean it is them who does it.

Everyone arrives early for an interview (well, should at least). We have a 'while you wait' sheet for them to work on until we are ready to see them. It has eight (8) questions that test an applicants knowledge in the language we primarily use.

We are not looking for the answers to all be right, as anyone can get them right with a computer in front of them. We are looking for process, do they even attempt the question, how do they come to their answers.

When we come into the interview we go over it with them and answer any questions they may have which can also lead them to getting the correct answer. It also allows us to ask how they got the answers they came up with.

This combined with previous work, we find, are the best ways to filter out candidates.

UPDATE 2016/06/15

We have significantly changed our process in how we hire developers.

Phase 1: A 15 minute phone interview where we ask 7 questions. The first 2 are "What is the most fun thing you've worked on?" (doesn't have to be programming related) and "What do you code for fun in your free time?".

Phase 2: A mini project that they complete on their own time. We then do a screen share with them and they show us what they have built. During the screen share we also get them to make two changes to their project and then watch them work through it and get it working.

Phase 3: In person interview.

This process allows us to figure out culture fit right away (phase 1). If they can do the work and actually walk their talk (phase 2). Finally, ensure their values are inline with what we are looking for (phase 3).

| improve this answer | |
  • 1
    This is sort of brilliant. I like it! – davidhaskins Mar 18 '11 at 15:41
  • 3
    although i have been in many interviews that turn into trivia. Be careful not to get bogged down on this particular bit of sysntax and get onto their large scale understanding. Especially if they are alleged to have a bit of talent or interest. the result was i didnt want to work for them, and im sure it was mutual. – John Nicholas Mar 18 '11 at 15:49
  • "Allowing someone to do a practical project on their own time doesn't necessarily mean it is them who does it" - True, but I've not yet come across someone brave enough to come into an interview and be questioned on code they haven't written. Should it happen, they're not going to get through the interview and their probation, but I may reconsider my approach. – pdr Mar 18 '11 at 15:50
  • @John. Agreed, it can't be "oh, you forgot a comma there". As I mentioned it is to get an understanding on how the approach things and if they understand the language. If they know their stuff definitely move on to the bigger things. – RDL Mar 18 '11 at 17:32
  • 2
    @RDL, Most of our interview process is designed to be kinda fun to the kind of developer we're looking for and hell for the rest. You know how good devs can't resist a challenge. – pdr Mar 18 '11 at 18:00

You might want to check out Jon Jagger's fantastic Cyber-Dojo.

It's a web based integrated environment designed for doing deliberate practice of Test Driven Development and learning about team dynamics. It has lots of small programming tasks (kata's) and supports a range of languages, from Python and Ruby to Java and C++.

Unlike IDE's designed for productivity, there is no code-completion, syntax highlighting or auto-refactoring, so you get to see what your interviewee can do without these.

The best thing is, after doing a kata you can then go back and look at the red/green progression (or maybe not if they don't do TDD *8') of each of kata. Every compile/test commits the changes to a git repository along with the results of the test.

I think using this for interview coding tests could tell you a lot about not only a candidates ability to solve a problem, but also their approach to problem solving and the process they use when not constrained by external factors, just select a kata appropriate to the time you want the candidate spend on it.

If you want your own CyberDojo server, the whole project can be found at github and there is even a Turnkey Linux appliance virtual machine linked from there, which means that assuming you already have VMware player or VirtualBox installed, you can be up and running within a few minutes of downloading the appliance!

| improve this answer | |

I've only interviewed with once company that has done this. They gave a question sheet of 6 or 7 problems. The instructions were to make a method to solve each problem.

One part of the task was to realize that you could reuse code. Problems could use code from other solutions. It wasn't sequential either. For example, question 3 could be written using the method used for question 5.

I would suggest trying something like that.

As for the questions? Some of the starting questions on the Project Euler site are good.

You could also try a simple game if you want to see how they can put a project together.

Or, if you don't want to come up with something, ask them to send you in some code from a final project.

| improve this answer | |

In order to ask people to complete a project, you should have a specific set of skills that you want to evaluate in mind and design the project to test those skills.

One example would be to take this paragraph of text and return a list of alphabetized unique words. After each word tell me how many times the word appeared and in what sentance(s) the word appreared in.

What are you looking for with this question? How many ways are there to solve it, and what does each approach tell you about the person that wrote the answer? Are the skills demonstrated by an effective answer to this question the same skills that are most important to your business?

I don't want the answers to these questions; I just want you to have thought about the answers before you subject a group of candidates to your process. If you know what skills you're looking for, creating a question to look for those skills isn't hard. If you use someone else's question without a thorough understanding of what it was designed to evaluate (if anything), you're really just fooling yourself and wasting everybody's time.

| improve this answer | |
  • Sorry to have wasted your time. – bigtang Sep 9 '11 at 20:47
  • 1
    @bigtang, it's not that at all. Sorry if the above comes off as a rant -- I can see how it might -- but my goal was to build a case for creating your own project based on the skills you're looking for in new hires. You can make a little project out of almost anything, but to make it worthwhile for both you and the interviewees, the requirements should be driven by the skills you value most. – Caleb Sep 9 '11 at 21:13
  • Removed the first sentence entirely (Respectfully, if you're not clever enough to come up with a decent project on your own, what makes you think you're clever enough to evaluate candidates' submissions?"). Wasn't really adding any value and did seem a bit rantish. – Michael Durrant Mar 9 '15 at 12:50

One example would be to take this paragraph of text and return a list of alphabetized unique words. After each word tell me how many times the word appeared and in what sentance(s) the word appreared in.

What language would they write this in? If they are coming out of a school that focuses heavily on C, this wouldn't be quite as quick to write as one that teaches Python/Perl/Ruby etc... Or even Java or C#. Nonetheless, it is a good little test.

I suggest some easier ones actually during the interview. No trick questions. I'm with TMN on this one. Give them a couple of functions that do basic tasks and ask what they do (reading other people's code). Then give them a couple of basic tasks (<20 lines) to write in a language of their choice. That should be enough for an entry level to know if they can code or not (at an entry level position). That along with the interview and GPA should give you a good idea on what you need to know.

| improve this answer | |
  • 1
    I don't find the language critical, it can even be done with pseudo-code. The main idea is to see if the presumptive employee "gets in there" and shows good signs of problem solving. – Jonas Byström Sep 7 '12 at 11:16
  • Frankly, any language with split() and arrays/lists (with push/append) would make this trivial. Allow a C programmer to 'assume' split() and list, and it becomes just as trivial :-) – ChuckCottrill Oct 29 '14 at 0:40

Have them implement Conway's Game of Life for whatever language you're looking at, using that language's design paradigms.

A Java or C# Conway's Game of Life should be object oriented, LISP or F# would be functional, etc.

| improve this answer | |
  • 2
    How long would you give them to complete this? – Job Mar 18 '11 at 15:44
  • It takes me about 4 hours to get through a whole OO implementation of it, but I've done it about a dozen times now. If you want to see how they think and how far they get (and whether or not they write testable code), give them less time than that. If you do it in person, then give them 45 minutes and see how far they get and why they chose the path they did. It's one of those problems that you want them to know about ahead of time so they aren't totally lost, even encourage them to try it on their own. It reveals a lot about a programmer. – George Stocker Mar 18 '11 at 15:49
  • 8
    Asking a candidate to write Conway's Game of Life tests how recently they were in college, or written and studied that problem. You would hire @George Stocker because he has written it a dozen times. How highly correlated is the Game of Life to any real-world development work? – ChuckCottrill Oct 29 '14 at 0:36

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