views:

1678

answers:

11

I'm interviewing for programmers at the moment, and in one case, we've a chap who comes across extremely well but admits there are gaps in his knowledge. This isn't a problem for us, because we've allowed time for a training period, but we're curious to see how quickly he can pick up new concepts.

We've agreed to conduct a sort of "homework interview", where I'll send him a programming spec for a short piece of code on Monday, he'll work on it in his own time with whatever books/websites he'd normally refer to, and then bring his solution to an interview the following morning to explain his solution and talk through how he reached it.

The job is C# / .NET / MVC / SQL stuff; the candidate's experience is primarily .NET 2.0 WebForms stuff.

I'm after suggestions for small programming, OO design or architecture problems that could be solved by someone smart in a couple of hours, using books & the Web for reference. Something like modifying the basic ASP.NET MVC template site to do X (including unit tests) - some learning, some coding, some design, and good opportunities for follow-up discussion about the results.

Any good ideas out there?

PS: "Implement Jon Skeet in COBOL" is probably a bit too hard...

+1  A: 

I don't know any COBOL, but Jon Skeet is just "for(;;) rep++;"

Will Dean
I had marked this down until I saw the PS at the end of the question. This answer isn't completely out of nowhere, and in context is slightly funny. (On a scale of 0=Tim Conway as Dorf and 10=Kathleen Madigan, it's about a 6.)
Jeffrey L Whitledge
+1  A: 

I have asked candidate to implement at simple bulletin board or web forum type system. I only ask for a minimal solution but allow them to take it as far as they like. This allows you to see how much of the work they can bite off in a minimal amount of time as well as detect the areas that they like by recognizing which areas they focus on the most. You can either ask them to design their own db tables or provide them. You could provide them with web page templates to use or simply a list of requirements. It all depends on the candidate.

One thing to keep in mind if you allow them to do this at home is that they may copy/paste existing code and claim it as their own. You should grab a few sections of their code and do a google search for them to be sure.

Logicalmind
+2  A: 

I had an interview once where they wanted me (onsite) to implement an operational spreadsheet in Swing. It's irritating but doable.

If I were going to do this, I might be tempted to hand them a fairly bad piece of code and some failing tests and have them fix and refactor it and complete the test suite.

You can tell a hell of a lot by the way people refactor, and it will probably more closely resemble what they will be doing for you. Anyone who stops with working code and doesn't refactor is right out!

Detecting a harder refactor, like factoring two anonymous inner classes (swing listeners) with different data constants into a concrete class would be sweet--somehow people seem to think that the only way to implement swing listeners is as anonymous inner classes--I almost think that anynomous inner classes did more harm than good because of this.

Bill K
Give them bad code, tell them it's bad code, and ask them to fix it. I like it.
Joel Coehoorn
Don't make it so bad that he'll wonder what he's getting into unless it's clear that it isn't real code from your app. :-)
tvanfosson
@tvanfosson I thought about your reply and it occurred to me--If I'm offering bad code to someone to refactor and they don't enjoy it, I don't wan them. The only bad coding job is where they ask you to fix but NOT refactor. Not enjoying this would be the best indication not to hire someone ever.
Bill K
I wouldn't tell them it is bad code, merely sub-optimal code and could they optimize it and see if they ask questions about which kind of optimizations are wanted as one could optimize for speed or space.
JB King
A: 

You guys are doing the same thing that my company did when I was interviewing with them. They had me in for the first interview and then sent me home for the day with a small programming project. The goal was to see how fast I could get it done and the style of architecture and OO Design I would use. Except for my job interview I had to whip up a WinForm app to do CRUD operations against Outlook contacts alongside displaying the contacts in an Infragistics Grid control (something I never worked with until that day as part of the challenge presented to me)

Going the ASP.net MVC route, what if you had them implement a quick and dirty contact/customer CRUD app with unit tests. This should be able to provide a good gauge of their programming methods and architecture style.

Matthew Ruston
+3  A: 

Seems a little harsh expecting someone to be conversant with beta technologies. I know that there are a lot of web sites out there with tutorials, but they're all over the place with different versions and the product has changed significantly as the versions have evolved. I'd probably stick with something simpler.

Maybe you could ask for a LINQ sample -- assume you have these entities with such and such properties in this data context. How would you return the third page of results as a list if the page size is 20? These two entities are related by this property. How would you retrieve a collection of all the second entities that are related to entities x, y, and z in the first set.

You could also have him implement simple extension methods for various classes. Perhaps something like string.Collapse() or table helpers for HtmlHelper, with unit tests. You'd need to be very clear on what was expected.

Both of the above are newer technologies that he may not have experience with and would show you how well he learns (or has kept up, either of which is okay).

If you do have him design or modify a web site, I would do it in the technology that is comfortable for him. Testing his design skills in an environment that he is familiar with will give you a better idea of how well he structures a solution. If you go with a technology that he is unfamiliar with, you'll be left wondering whether his design skills are bad or he's just less familiar with the technology.

tvanfosson
+4  A: 

I've got surprisingly far with a very simple set of questions:

  1. A method to determine whether a supplied number is a power of 2.
  2. A method to reverse a string (given "Hello", return "olleH").
  3. A method to duplicate a string a given number of times (given ("Hi", 3) return "HiHiHi")
  4. A method to print all the odd numbers between 0 and 100.

Given a few minutes, anyone should be able to throw these together. These were homework questions, so I'd assume they'd use a computer.

The surprising thing about the results was that, although exceedingly simple, they told a tremendous story about the people who submitted the results. Few people submitted answers that I wouldn't've been embarrassed to represent me. Many of them didn't compile, just didn't work correctly, didn't meet the specs, had various edge cases they didn't cover, had edge cases they did cover poorly, were really poorly formatted, etc...

I couldn't imagine it taking more than 20 minutes to do all of them in a well documented way and with a full unit test suite. Didn't hire anyone who couldn't be bothered to try.

Dustin
I wouldn't add a full test suite although I'd run a test for each one. I don't think I'd send in the tests unless you asked though since the problems are all trivial. Not sure if I'd add comments either, some teams take serious offense to comments cluttering their code.
Bill K
There wasn't really much I required other than a good feeling from reading the code. Every bit I got back told me something. Any guidance more than the list of questions biases the results. Because they were so simple, it took little effort to write and little effort to read.
Dustin
I am pretty sure all of these are covered by built in API functions in most languages. Could they just pass the parameters to the built in functions? That would probably be the most reliable way.
Jeff Davis
If they were aware of that, ideally they would demonstrate this knowledge by showing their answer provided the same results in a test suite. Obviously built-in is better, but as I said, you would be quite surprised with the answers that were given.
Dustin
A: 

I don't know if this is the best way to test the candidate's knowledge of the subject, since doing it "remotely" doesn't guarantee that someone else is doing his "homework".

I'd go for a much smaller assignment, but a "live" one, like:

  • basic knowledge of c#, sql
  • developing a simple .asp page

something doable in one or two hours, that is.

friol
A: 

My advice is to keep it very simple, but not obviously google-able. Also, solve the problem yourself before giving it to anyone else.

For PHP job candidates, I had them create a web application that lets you create an account and then greets you by name when you logged in. That's it. Should take perhaps 1/2 an hour, tops.

Eli
+4  A: 

Also, I'll just throw out that asking job candidates to do any sort of "homework" for free is inherently unfair. Ideally you'd pay them for their time taking the test, though I realize that isn't usually realistic.

Eli
is it the same as asking employees to stay longer every day for free, because project is ending? i think this guy have a lot of experience with that.
01
Do we then pay them for attending the interview, too? Interviewing is a speculation on the part of both the employer and the employee. They both stand to gain and they both bear the cost in time.
Schwern
If the interviewee has to travel a considerable distance (plane or train), then yes, I think you should compensate them. In fact, that's exactly what my current employer did when I interviewed. It gave me a lot more confidence that mgmt cares about its employees.
Eli
@Eli I agree, but I don't think it's in the same league. I suppose the key difference being that long-distance travel costs significant money whereas most other interview tasks just cost time, and if you're going to draw a line somewhere that's a pretty good one.
Schwern
+3  A: 

I once interviewed at a job where they gave me about a half hour to an hour to solve a problem. But they deliberately set the problem in a language that I didn't know, and simply provided the manual to the language (this was pre-internet days). It had something to do with synching two databases.

What they were trying to find out was not only how I went about solving a problem, but also if I was willing to even try. Some people just sat there for that time, because they didn't know the language, and didn't even try. (I was unaware at the time that they'd chosen a language I didn't know.)

Knowing if a person is willing to try solving a problem, even when they don't know the language, is telling. Especially if they don't know the language. I don't care if you already know all the ins and outs the language we use, because you certainly won't know our system and business: are you willing to jump in and learn anyway?

thursdaysgeek
A: 

Asking people to do work for free is a bit over the top. If a key competency you are looking for is whether or not they are a quick learner, use probing questions about past experiences to find a situation where they had to learn something quickl, or where they learned something on their own initiative.

If you need examples of such questions, grab a book like "High Impact Interview Questions", it lists questions by competency.

Frank Schwieterman