http://skife.org/interviews/design/2010/10/27/favorite-interview-question.html<p /><div>Saw this one on Hacker News, and figured I'd write up my favorite interview questions.</div> <p /><div>My favorite basic coding question is asking our applicant to write a log parser. Here at Quid we collect a ton of data, and have a huge number of logs to sort through and check for problems, so it's something we're pretty familiar with. It's also a short program that can be done in an interview, with test cases from live data, in whatever the candidate's preferred language is, and quickly demonstrates familiarity with basic development techniques. You can see if the candidate breaks out regular expressions, yacc, or tries to do it some other way. It also shows you what kind of code you can expect delivered in a live environment.</div> <p /><div>For design problems (that is, whiteboard or over-the-phone stuff, not something that produces actual code), I like asking candidates to design a web crawler to index text from web pages. It's a great exercise because it allows you to start simple (we only want these 100 sites, collected every day), and then expand in virtually any direction (we only want this text, we now have 100,000 sites to collect, we need to do text processing and indexing). You can expand the problem to encompass many machines, advanced logic, multiple databases, and other application-level design decisions that are realistic. Gives you a great sense of how a candidate responds to increasing challenges.</div> <div>
For brain teasers; well, I hate brain teasers. I don't think they're especially relevant to application development, and I think arbitrary puzzles most accurately test how many assumptions a candidate makes. I also don't like situations where I, as an interviewer, have a "right answer" in mind that the candidate needs to hit. In business, there's rarely a single right answer that a hacker needs to output; why should interviews behave that way? If I had to give a brain teaser, though, I'd probably go with the penny problem. You're blindfolded and handed ten pennies. Some number of them are tails-up. You have to divide the pennies into two piles with an equal number of tails-up coins. No tricks to determine which coins are which. Solution here: http://skepticsplay.blogspot.com/2007/12/blind-coin-sorting-solution.html</div> <p /><div>Anyway, that's all I've got for now. Hopefully we'll see more interesting interview questions around HN. Or maybe better interview methods that don't just check whether you've read the answers to the right questions on Hacker News.</div>