Yes, something like that.
We were interviewing for Java devs so basically a method with this signature:
public static String concatenate(List<String> strings)
And I have a StringUtils class ready to go with an example method and say "imagine there are a bunch of methods in this class and we want production ready code"
There's a lot you can learn.
- do they decide to write unit tests up front (note that our questionnaire asks about their testing experience and everyone rhapsodizes about their strong testing background)
- if not, once they've written the method, how do they respond to the question "How do we know if it works?" (cue people writing main methods within the StringUtils class)
- what kind of unit tests do they write? Can they come up with good tests that cover all cases
- what names do they give to their methods/parameters/variables. (One guy called his method bangThemTogether)
- what bugs do they have - what cases do they miss
- if a unit test fails how do they go about fixing it (interestingly only 2 people fired up the debugger)
- do they ask questions if they need clarification
Minor things
- keyboard/IDE skills - do they laboriously type everything or have they taken the time to learn their preferred tool
- can they explain what they're doing - do they speak at all...
There's a second part to the practical - a bit of a code review/refactoring exercise. Sometimes I skip it because they've taken more than 30 minutes on the first part or their just so bad it's not worth continuing.
BTW we've interviewed about 30 people with this technique. They first meet with the dev manager for culture fit and general knowledge of dev processes. Then they meet with a tech lead for a more technical interview - explain your last project etc. Then I do the practical. Many people get through the first two just fine but fail badly on the practical.