• Mike is spot on - I myself have been in exactly that situation where I was given an hour to sit at a PC with a spec and code a database solution. However, the company interviewing me had a different IDE to what I was used to, and although in the feedback I was told I was the better candidate of the 2 people they shortlisted, the other guy got the job because he had worked on the IDE the company used. A year later, I got a call from the company asking me if I was still interested, as the guy they recruited did not fit in and had left them......

    If you are going to do something like that - and I agree it does give a good indication of technical ability - then the idea of something less formal like sitting round a workstation and discussing possible defects and solutions is definitely preferable; people tend to be nervous at interviews and being put on the spot in a formal way does nothing to relax candidates and endear them to you!