|How would you test a coin-operated Coke machine?
||[Oct. 31st, 2012|08:21 pm]
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.
* 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.
2012-11-01 07:05 am (UTC)
I think you gave me a version of the coke machine, but added that it took credit cards and connected via wifi to the internet to process sales... and it was interesting, this got me thinking about the different issues one could encounter with different versions of 802.11x... not only did that fill our time up but when Steve came in for his leg of the interview it spilled over into that as well. :D
The most fun I had with the MS interview was the brain teasers, back when they still did it. Most of the time I would get a strange look and they'd ask me if I'd heard that one before. Some, more than others, just seem so obvious they weren't worth writing down and labeling as a brain teaser. There was one about two bags of marbles blue and red... equal amounts of marbles in each bag. They are all mixed together and put back without regard to color into the bags in equal amounts again. How do you tell from the contents of bag 1 how many blue marbles are in bag 2. Seriously? The only brain teasing aspect of that question is how someone thought it merited being called a brain teaser.
But one that stumped me recently is... how do you walk a string and identify the first character in the string to occur twice? I gave three answers and they took away all those abilities I used to do it, then I was officially stumped. And they were noticeably disappointed. :(
Some of the constraints on the problem are:
1. You don't have enough memory to put the entire contents of the string in another variable
2. You can't use the built in InStr function in VB
3. You don't have enough memory to build an array, much less a multidimensional array
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.
Oh, that was another constraint, you can only walk through the string once.
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?"
While I'll tend to throw a puzzle question near the end of the interview* my favorite questions often were project planning and organization ones - here's a vague outline of a project, you have just been hired in such and such a role, with such and such headcount, tell me what you do. And then I keep asking questions about various areas as they come up. (But then I was usually looking for people with project management skills in addition to their technical skills. And yet, I'd totally have them coding on a board in the middle of the question. Fun times.)
* "How would you design an alarm clock for members of the ARRP - keep in mind that a lot of people might be having vision or hearing problems, so it should be accessible without insulting them by implying they need something accessible?"
Let's see, big numbers with adjustable brightness (and maybe an auto-dim feature that accounts for ambient light), a higher-quality speaker(s) with a decent amplifier (remembering that this is an alarm clock, not a hifi), and a volume control that goes up to eleven. Big, friendly buttons and dials. Sturdy, because alarms clocks get hit hard by half-awake people.
Then market it to the general public, not to seniors specifically. Because those are all features I was looking for in an alarm clock when I was twenty-five.
2012-11-01 04:41 pm (UTC)
I used to ask the soda machine question as well in test interviews and it does reveal a lot. Nowadays I often ask people to test an elevator. I frame it similar to "New building with a new elevator. You work for the building owner. You don't know what testing the manufacturer or contractors did, if any. Prior to letting anyone ride in it, how would you test it and what would you test for?" There are lots of different dimensions that could be covered which is why I like it.
Hmm. I generally prefer a problem where the tester works for the manufacturer; the user-acceptance test scenario blocks off too many interesting classes of test--I want to see destructive stress tests, too. :)