Hacker News new | ask | show | jobs
by RogerL 4022 days ago
How is it fair to ask somebody to program tic tac toe? I promise you you'd shit your pants it you tried to do the programming I am currently doing (matrices with 1/2 million element diagonals, optimal estimation, and more linear algebra goodness), yet I haven't got a clue how to start a tic tac toe problem.

Now I realise it must be something fairly trivially obvious, but it is not coming to mind at the moment. So, I'm screwed. I don't write tic tac toe games at work, I don't write them for fun, and I don't write that sort of thing for the most part. I'd probably try for a backtracking algorithm, but that is easy enough to mess up in an interview situation.

Throw in a 'helpful' comment or two if I seem to be off track and now I'm sitting there trying to figure out if my idea is wrong, if it is right but the interviewer is not looking for that approach or perhaps doesn't understand it, and so on. It just sounds miserable. Of course, if I had just done another interview with tic tac toe, failed, then googled it, I could probably just write it letter perfect for you, but I'd act like I was puzzling it out to impress you. What have you learned from that charade? Or another person just graduated from a boot camp where they programmed nim, towers of hanoi, and other stuff, and quickly scratch out a half working example. That person is going to do better than somebody that can read research papers, implement them, prove the correctness of their implementation, work with hardware, design circuit boards, develop a robust software suite that is testable, extensible, and fast, delivers on time, and doesn't waste time over-engineering things. Who do you want on your team? And who is 'tic tac toe' going to select for?

1 comments

Ah, and I googled it. Perhaps it isn't that intrinsically hard, you don't need a decision tree or anything, but here also is a 28 page (28 page!) chapter from a book from a Professor at Berkeley on implementing tic tac toe.

https://www.cs.berkeley.edu/~bh/pdf/v1ch06.pdf

Well now I can pass your interview. Did I become a different person in 30 minutes?