News for hackers. Stuff that matters.
Re:How I Interview by ryandrake on Thursday December 17, 2015 @07:08PM (#10755696)
What? "Implement as much of Minesweeper as you can in an hour?" If you're going to build something--evens something as simple as Minesweeper, you're still going to need time to plan it out, diagram it, decide which modules call into which other ones, decide on the data structures, etc. Diving right into writing code so you can get _something_ done in an hour is probably the worst strategy if your goal is to do it right.

I'd rather work with the person who would approach that by taking 3 hours to plan, 3 hours to code, and 2 hours to bug fix, rather than the "Ready, Fire, Aim" person who took 1 hour to code, 4 hours to fix what he did, 8 more hours to find his design was totally wrong and re-do major portions of it, 8 more fixing the bugs in that version........

Unless you plan to filter out the people who just jumped into the code, in which the exercise is just a trick question.

Re:How I Interview by invalidfunction on Thursday December 17, 2015 @09:41PM (#10756275)
It's minesweeper, not an enterprise storage server. Spending 3 hours planning minesweeper would be insane. Heck even planning for more than 20 minutes, in my personal opinion, is overkill. You should be able to at least get started before the 30 minute mark and if you spent half the time planning should be close to being done before the end of the hour. At the end of the hour, just explain what you have left to do.
Re:How I Interview by yeukhon on Friday December 18, 2015 @01:08AM (#10756937)
I don't know how to play minesweeper, so how on earth am I supposed to solve it in 30 minutes? Looking up the rule in 30 minutes? I don't know how to play Sudoku either. DO you know how to play Go? Can you implement that in 30 minuets? Do you know how to play Mofoka? Of course you don't know Mofoka I just made it up. Please think about how ridiculous it is to ask someone to implement a game in an interview.
Re:How I Interview by emerongi on Friday December 18, 2015 @04:03AM (#10757472)
I'd expect the interviewer to explain the rules beforehand, probably even show the game quickly. That way everyone starts off with the same amount of knowledge about the game and then it's all about programming.
Re:How I Interview by RKoutnik on Thursday December 17, 2015 @07:26PM (#10755782)
I've had folks who just jump into the code without any planning. It usually bites them about 20-30 minutes in. On the other hand, I remember one guy who spent the first 20 minutes planning and only 40 coding and ended up doing better than most.

The point here is not "Write as many lines of code as you can". I want the candidate to plan - it's a crucial part of the job. FizzBuzz, sorts and the like don't require much planning. Minesweeper does.

Re:How I Interview by infraruby on Thursday December 17, 2015 @07:46PM (#10755851)
> I want the candidate to plan

Then ask for that, and assess the plan, otherwise you're expecting Carnac the Magnificent: http://raganwald.com/2015/05/08/carnac-the-magnificent.html

Re:How I Interview by tzs on Friday December 18, 2015 @09:33AM (#10758612)
I decided to have a go at this, even though I am at best a JavaScript dabbler.

I did plan...but if you were watching me you would not have seen me planning.

I decided right away that my display was going to be a table with one table cell per Minesweeper cell, with the table cell's ID of the form "X_Y" where X and Y are the coordinates of the corresponding Minesweeper cell. I did the rest of my planning while getting that HTML written (first in vim, and then when that was going too slow even with macro assistance by writing a little Perl script to generate the HTML).

I was not able to do it in an hour. At the end of one hour, I had everything for a rudimentary Minesweeper coded, but had a bug in the code that reveals the cells around a clicked empty cell, and it took another 20 minutes to find and fix that.

Here is what I came up with: https://github.com/tzs/interview_minesweeper

The initial commit was made at the one hour point, so that would have been what I would have turned in during an interview.

Re:How I Interview by collyw on Thursday December 17, 2015 @08:34PM (#10756035)
8 hours is a lot of time for the candidate.