views:

538

answers:

9

background info...

When interviewing candidates we do the usual round up of questions (both coding and not) and we follow with a particular scenario where we ask the interviewee to code a given problem. We then follow the work with such questions as why did you do this, why not this, how would you handle the exception here, why did you setup the GUI as such, where would you go from here, got any additional features for this app?

the problem...

I need a few questions for the interviewees; practical coding questions/tasks to actually work on for 1-2 hours. However I do not want them to be able to finish the task.

The question needs to be complex enough for them not to finish in 2 hours, but not complex enough for them not to be able to start right away (15 minutes on the internet is fine). It has to involve database, GUI and an algorithm of sorts (patterns are fine).

One such example is:

Random torrent song downloader - Download songs from popular torrents (mp3), but a few from each torrent with the input of certain keywords. (e.g. electronica, metallica, red hot, new, etc.)

The exercise is purely intellectual, and no app is actually produced or distributed, we just like to keep the question interesting.

+6  A: 

I would suggest that you're better off asking several questions that they can complete rather than one they can't. One of the best things you can do in an interview is select people who can finish their work rather than be perpetually "80% done".

But if you insist on longer problems, one I've seen before is to ask the classic "reverse a C string in place" question. Then when they get that, ask them to do it again this time with the caveat that the string is UTF-8. Be willing to explain UTF-8 in detail, although I guess it's bonus points if they're already familiar with it. They may be able to finish this one in an hour, but be prepared for a bonanza of off-by-one errors.

Clyde
we do all the smaller problems/questions as well.this longer problem is see how people do when they have to do almost everything by themselves and it is only done before a final hiring decision. also we like to watch while they do it ;) remotely ;) we tell them that as well. they 'love' that ;) haha but we establish a personal and fun atmosphere beforehand so nobody complained.
b0x0rz
What do you mean by "almost everything by themselves?" I hope they're allowed to interface with other developers and get feedback on their ideas--that ability is as or more important than being able to reverse a string.
Eric
+4  A: 

Joel and Jeff have both posted fantastic manifestos on interviewing, which I highly recommend.

That being said, 2 hours of coding seems like an awful lot. I usually do quick coding questions (15-20 minutes) with questions while they work, which seems to work out really well. This way, I can ask two or three more targeted questions.

Anyway, to answer your question, one of the architecture questions I often ask is a cousin of one of Jeff's: Assume the mechanics of the game (e.g.-dice rolling, moving pieces, etc.) are taken care of and build the AI for a computer player of Monopoly. I generally do this to get a sense of their high level design, and may have them code a method or two of their design.

Eric
oh, read about that one yeah. works great indeed. i also LOVE monopoly so i am never one to ask that (any more) since i have been known to invite the participant for a monopoly game to 'work on the rules and regulations'.
b0x0rz
+3  A: 

Your goal is to observe the thought process of candidates, so almost any relatively open ended question will work. I would ask them to design their 'ideal' system for a (insert problem domain). Be specific: ask them for their thoughts on algorithms, data structures, UI design, etc.

For example: Design your 'ideal' system for sharing dinner and dessert recipes online; Design your 'ideal' system for notifying commuters of traffic jams in the city; etc...

tehblanx
awesome ideas, both. especially nice is the ability to change the idea every time. :)
b0x0rz
+1  A: 

It totally depends on the position. If you interview a recent grad, then you'd probably ask fundamental questions rather than questions that relate to specific technologies (check out "Programming Interviews Exposed" for some good samples to get you started).

Interviewing a senior engineer is a bit different. You could (hopefully) assume a good knowledge of fundamentals, so you'd skip to questions that assess creativity and advanced problem-solving.

Garrett
we get (and hire) both grads and seniors, yeah.
b0x0rz
+3  A: 

If you want to do this, you should tell them they have 2 hrs to do it and pull the plug on them at 1.5.

Here's the problem.

You're giving them an impossible task. There is a lot of stress doing an impossible task under a crushing deadline.

Is that what you want to know? How they handle impossible tasks with impossible deadlines?

I mean, they see "Gee, all I have to do is perform the impossible to get this job".

If you give them a realistic task and cut them off early, there's no stress. They're just moving along working at their pace and you see how far they got early in the process.

If they KNOW it's an impossible task, and they know YOU don't expect them to finish, then, what does that show? They know they don't have to finish. They know they can focus on different things.

I'm no psychologist. I'm a programmer and I like stuff pretty straightforward. So, I think it's better to simply tell them what you want and what you want to see rather than tell them one thing and expect another. This isn't the Special Forces Escape and Evasion school or anything.

Will Hartung
perhaps i was unclear. yeah i was. sorry. we do the last thing you suggested. we tell them we want them to start doing it like they expect to finish eventually. no stress involved, there is no 'amount of code' or functionality to satisfy. whatever they do will be good to see how they are doing. if they start doing really well we do stop them after an hour, hour and a half.
b0x0rz
+2  A: 

Just in general, I'd keep it generic, like the dinner recipes. I know plenty of good programmers who don't know a thing about bit torrent.

Chris
right. we gauge the task to give them from the interview previously. they say / show what they know best and we come up with an idea that uses their best skills. i never gave anyone a task and have them not know how to start, but it has been known to happen. we just give them another one, in one case we even let them pick among those we had prepared before.
b0x0rz
+1  A: 

i cant see that you can fairly give somebody a task that complex

either send them the assignment in advance (I have had this happen to me) or you have to give simpler tasks. But make the post task discussion the departure point for lots of interesting questions. The string reverse is great for this. I would do it not in place, cos this makes them thing about where the result goes, who owns the memory etc (assuming C code)

if you want to be sure they can do databases ask them to design a simple 2 or 3 table DB. This sortst he idiots out real fast

we do explain that they are not expected to finish, just start working on it like thy will eventually. not sure if it is unfair!? will ask around among those colleagues who did it to get hired.
b0x0rz
+1  A: 

Something involving database, GUI, and algorithms: that suggests an interactive data analysis app of some kind. Maybe explore a social network graph and compute interesting features of it, like distance between two people. (I don't have much GUI experience, but it ought to be easy to ask for too much to be done in two hours, but possible to slap something up with an existing graph-layout control, I suppose.)

Darius Bacon
perhaps, also some 'crazy' idea from the 'six degrees of separation' can be found here...
b0x0rz
+1  A: 

I agree with Eric: "Joel and Jeff have both posted fantastic manifestos on interviewing, which I highly recommend". Some examples:

1) Find local tweets (input: location, sort order)

  1. get geo location (example: California) http://maps.google.com/maps/geo?output=csv&q=California
  2. get data http://search.twitter.com/search.json?geocode=36.7782610,-119.4179324,10km
  3. sort and display results

2) Currency conversion chart (input: currency a, currency b)

  1. get cvs data for over some period
  2. make a chart
Margus
like #1, #2 seems very stock-markety :P but not as fun as #1
b0x0rz