?

Log in

How would you test a coin-operated Coke machine? - Wanderings and Maunderings [entries|archive|friends|userinfo]
georgmi

[ website | My Website ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

How would you test a coin-operated Coke machine? [Oct. 31st, 2012|08:21 pm]
georgmi
What is your favorite interview question*? Could be one you love to ask candidates, could be one you've been asked yourself.

I'm particularly interested in the real curve balls, the questions that stop the candidate short and make them think.

For funsies (did I really just type "funsies"?), I will answer your questions**, provided I see the relevance. If I don't see the relevance, I will ask you about it until I get it, and then answer it.

Because Facebook does not support message threading, please respond here if possible. Anonymous comments are enabled, but if you do post anonymously, I ask (but do not require) that you identify yourself in your comment.

Feel free to comment on other people's questions as well.

Thanks much!

* Mine is the one in the subject line. Coke machines are ubiquitous enough that I don't have to argue back and forth about the spec, they're simple enough in concept that the test planning isn't too daunting, and there's enough discoverable complexity that this one question can keep a good candidate busy for pretty much the whole hour. I learn a lot about a potential tester from how they approach the Coke machine problem.

** Full disclosure: With hopefully a raft of interviews upcoming, I'm hoping to encounter the difficult questions here where I have a chance to rehearse my response, rather than being blindsided on the day. I call this "due diligence preparation", by the way, not "cheating". :) So feel free to tell me how I did with my answer!

This entry was originally posted at http://georgmi.dreamwidth.org/231994.html; please feel free to comment below or at Dreamwidth.

Link

Comments:
[User Picture]From: georgmi
2012-11-01 04:23 pm (UTC)

Re: Brain Teasers...

Hmm. What do they mean by "the first character to appear twice"? Is it the first character that has a duplicate, or the first character that is a duplicate?

For example, in the string "abba", 'a' would meet the first case and 'b' would meet the second.

For the first case, declare a temporary variable, 'search'. For each character in the string in order, put the character in 'search' and walk the rest of the string looking for a match. When you find the match, Robert is your parent's male sibling.

For the second case, declare two temporary variables, 'search' and 'found'. For each character in the string in reverse order (start with the last one), put the character in 'search' and walk the rest of the string backwards looking for a match. When you find a match, put the character in 'found' and move to the next character. When you have finished the entire string, the character in 'found' is your answer.

Obviously, you'll have to account for the case where no match is found, but that's pretty trivial.
(Replies frozen) (Parent) (Thread)
[User Picture]From: Onyline Lawbstre
2012-11-01 04:54 pm (UTC)

Re: Brain Teasers...

Oh, that was another constraint, you can only walk through the string once.
(Replies frozen) (Parent) (Thread)
[User Picture]From: georgmi
2012-11-01 05:07 pm (UTC)

Re: Brain Teasers...

So basically they're looking to see if you happen to have the one arcane piece of knowledge that lets you perform a useless operation in a degenerate environment. Assuming that piece of knowledge exists.

At the point where they had closed off the last thing I could think of, I would say, "that's the best I can do, but it's going to be distracting me the rest of the day if I don't get closure. How would you do it?"
(Replies frozen) (Parent) (Thread)