Live data from Hacker News

Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

news.ycombinator.com

271–280 of 363 posts

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#271
post #99
post #28

Earlier quoted context omitted.

Do you have any example problem to share? I've taken a numerical analysis class and this interview-like questions are appealing.

These are rough guidelines based on current best-practices that I know of, and shouldn't be treated as doctrine obviously. Numerical analysis/linear algebra is actually a pretty fast evolving field as far as applied math goes. Though statistics is a bit less dynamic at the moment, I'd say. Honestly, after a certain amount of time, I'd expect a new hire would be able to teach me what is state-of-the-art in the field b…

Thanks for such extended reply!

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#272

Earlier quoted context omitted.

That probability was determined the moment you picked the coin out of the jar. It makes no difference what you do to it after the pick. Hold it in your hand for a day, flip it 10 times, sit on it, whatever - the end result is that p(heads) for that particular coin has not changed . p(heads) will be either 0.5 for a real coin or 1.0 for the rigged one. The probability then comes down to what coin you picked at the sta…

OK, What if I flipped it 10,000,000 times and got all heads? What is the probability that I have the non-fair coin? What is the probability for the next toss?

Another way to look at it - one coin has two heads, the other 999 have two tails. You flip the coin and get one heads. What is the possibility that the next will be heads?

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#273

Earlier quoted context omitted.

The probability of which coin you have affects the probability of the next toss coming up heads, so having this knowledge is implicit in determining the solution.

That probability was determined the moment you picked the coin out of the jar. It makes no difference what you do to it after the pick. Hold it in your hand for a day, flip it 10 times, sit on it, whatever - the end result is that p(heads) for that particular coin has not changed . p(heads) will be either 0.5 for a real coin or 1.0 for the rigged one. The probability then comes down to what coin you picked at the sta…

I think you are discussing different interpretations of probability (classical vs bayesian), which is causing the disconnect.

http://en.wikipedia.org/wiki/Probability_interpretations

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#274

I have been unable to think of one for Linux system administrators. :-(

1 - How to connect to a server using SSH without a password 2 - How would you check if $DATABASE is running and how would you start it if it wasn't. Bonus points: how do you make it start automatically at next reboot 3 - Show me the processes using the most CPU

Is 1. really that trivial? If I recall there's some really weird convention about usernames across both platforms (assuming *nix) having to be identical, in addition to fiddling around with the RSA keys.

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#275
Quality Assurance (QA) engineer. I do QA Tools specifically but still need to be on top of most QA stuff. Other QA engineers exist in the company for in depth QA.

My initial question starts with: "build a function that takes a string and produces an integer". About 30% of candidates fail to get anywhere. 50% produce an incorrect implementation. 20% produce an implementation that is mostly correct. 9% produce an implementation that is mostly correct and well tested. 1% actually produce a complete and correct response. Which, as of right now, translates to exactly 1 candidate in 2 years. Who was rejected due to culture fit. A complete and correct answer is not required to pass the screen. ;-)

The reason this question is so effective is due to how the question is asked and the details of the solution. There is a lot more than just the initial problem statement. The full script assess: the candidates ability to determine requirements; ability to produce complete set of unit tests; ability to handle the boundary conditions.

There is a sharp division that occurs between QA engineers and non-QA engineers on the requirements gathering. All but 1 non-QA engineer I've interviewed assumed they had all the requirements before writing code. A clever solution is almost useless if it solves the wrong problem. Sometimes even worse than useless if the code adds a maintenance cost for no value.

Covering all the critical cases in testing is the next part that most candidates fail at. Even if the requirements they assumed are correct, none of the non-QA engineers have succeeded in writing a complete and good set of tests. Many add too many tests.

After those two the other parts are just seeing how close they can get to building the correct implementation. The candidates typically pass if they do well in all parts; perfection is not required. Still, I think it's interesting to note that almost nobody has ever written a 100% correct solution. Even if they are given all the requirements in detail.

This question does not asses algorithm design ability. At all really. Well, I suppose there was somebody who immediately proposed "binary search!" and really wanted to stick with that idea. No clue why...

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#276
post #247

Earlier quoted context omitted.

So, I think that tge question is ambiguous, and a little more direction could clear it up. If you want to know the probability, taking into account the 10 heads results thus far, I would tell the interviewee, "I am going to do this process repeatedly (picking a coin and flipping 10 times), and I'm going to keep track of what percentage do the all one side thing. What will that percentage be approximately?".

That's not ambiguous if the applicant has taken a basic college statistics course, which is what the question is intended to determine. The term "probability" has more precise definitions in mathematics than in everyday language.

Ah, that's the part I was missing. Thanks

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#277
post #269

Earlier quoted context omitted.

I'm always interested in applying :-)

Send me your resume and I'll make sure it gets into the right hands. For the purposes of this comment thread, my email address is heresmyresume@viewthesource.org (I catch anything sent to viewthesource.org, so I like to customize it when giving my email to people) It should be noted that we're in Bentonville, AR. That could potentially be a limiting factor for some people.

No kidding? I know at least one extremely large company which has its headquarters in that city, and I have recently been hearing good things about the modernity of their IT infrastructure.

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#278
post #9

I'm an electrical engineer who has pared my skill list down to 'troubleshooting.' For my equivalent of a fizzbuzz, the exercise is to present someone with a potential failure (the light in the room is off) and ask them how they'd go about investigating the problem. I like to see all kinds of answers, but particularly more theories are better, especially when justified at least loosely. Things like "change the light b…

I have misread the last quote as "is anyone else in the room turned on" and wondered whether that's not a bit far out of the box ;)

That's not a question I've ever had cause to ask on either side of an interview, to say the least.

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#279
post #9

I'm an electrical engineer who has pared my skill list down to 'troubleshooting.' For my equivalent of a fizzbuzz, the exercise is to present someone with a potential failure (the light in the room is off) and ask them how they'd go about investigating the problem. I like to see all kinds of answers, but particularly more theories are better, especially when justified at least loosely. Things like "change the light b…

I have misread the last quote as "is anyone else in the room turned on" and wondered whether that's not a bit far out of the box ;)

[deleted]

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#280
post #198

Earlier quoted context omitted.

The coin is the coin, but your information about the coin has changed. Probability is a fact about you, not a fact about the coin. Here is perhaps a more visceral example: On any given day, your car has a 10% chance of having blown a wheel the previous night. If it has blown a wheel, every bump will feel jarring. If it hasn't blown a wheel, any given bump will feel jarring with 10% probability. You drive over a hundr…

Probability is a fact about you, not a fact about the coin. Huh? It's a coin . You flip it. It has no knowledge of the past and no idea about the future. It lands and it's either heads 50% of the time and tails 50% of the time. It's all about the coin and nothing about what you've observed in the last N trials. That's the simple logic that the OP is trying to see if you understand.

It may be a useful sanity check to simulate the experiment multiple times to see the result:

  def choose_coin
    rand  0, :tails => 0 }
   
  1000000.times do
    coin = choose_coin
    next unless all_10_heads? coin
    next_flip[flip_coin(coin)] += 1
  end
   
  puts next_flip[:heads].to_f / (next_flip[:heads] + next_flip[:tails])
Post reply on HN