Live data from Hacker News

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

news.ycombinator.com

341–350 of 363 posts

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

#341
post #88
post #55

I build web sites. I would ask that the person complete a series of tasks that involved using Javascript to do a bit a typical DOM manipulations and CSS changes, especially using transitions and whatnot... ...without jQuery.

Just curious, why do you not allow the interviewee to use jQuery? Do you expect the candidate to know JavaScript's DOM-level APIs without having to look them up?

[deleted]

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

#342
post #88
post #55

I build web sites. I would ask that the person complete a series of tasks that involved using Javascript to do a bit a typical DOM manipulations and CSS changes, especially using transitions and whatnot... ...without jQuery.

Just curious, why do you not allow the interviewee to use jQuery? Do you expect the candidate to know JavaScript's DOM-level APIs without having to look them up?

[deleted]

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

#343
post #102
post #55

I build web sites. I would ask that the person complete a series of tasks that involved using Javascript to do a bit a typical DOM manipulations and CSS changes, especially using transitions and whatnot... ...without jQuery.

Why?

Because there are times that jQuery is not available to you for whatever reason. Most of time the tasks I stated are not really that hard to do in vanilla Javascript, it just can be more verbose as opposed to doing it with jQuery.

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

#345
post #55

I build web sites. I would ask that the person complete a series of tasks that involved using Javascript to do a bit a typical DOM manipulations and CSS changes, especially using transitions and whatnot... ...without jQuery.

That's not really fizzbuzz, that's more the equivalent of asking a C programmer to write fizzbuzz in assembly (perhaps that's a little too strong a comparison, but you get the idea). Fizzbuzz for websites would be to have someone code two paragraphs side by side with a header and footer in CSS.

If their primary task was to build HTML emails then I could understand that train of thought.

I suppose there are people out there that are working as front-end developers for websites that only work in HTML and CSS, but I would think that's getting more rare as time goes on. Of course, that could just be bias based on my own career.

But, going with your suggestion as a thought exercise, I would go in a different direction. To make a pattern like fizzbuzz I suppose I would do something more like: build a page with a series of paragraphs so that these CSS properties apply to every third paragraph, these CSS properties apply to every fifth paragraph, and so on. Something possible with CSS but requires the ability to think things through.

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

#346

Earlier quoted context omitted.

related problem: a population has a 10% incidence of condition X. A test exists that is 90% accurate. 1) What is the expected percentage of positive test results? 2) if a person tests positive, what is the probability that they actually have the condition? 3) if a person tests negative, what is the probability that they are actually free of the condition?

By "90% accurate", you mean "10% false positive rate and 10% false negative rate", correct?

correct, I should have made that explicit

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

#347

I was a mathematician, and now work in finance (systematic trading). I've found a reasonable negative filter is A jar has 1000 coins, of which 999 are fair and 1 is double headed. Pick a coin at random, and toss it 10 times. Given that you see 10 heads, what is the probability that the next toss of that coin is also a head? That tests their ability to turn a problem into mathematics, and some very basic conditional p…

with 1025 coins the numbers are nice:

1024/1025 * 1/1024 = 1/1025 (probability of unbiased coin, 10 heads) 1/1025 (probability of biased coin & 10 heads) relative probability = .5 the answer is then precisely 3/4

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

#348

Earlier quoted context omitted.

That's not really fizzbuzz, that's more the equivalent of asking a C programmer to write fizzbuzz in assembly (perhaps that's a little too strong a comparison, but you get the idea). Fizzbuzz for websites would be to have someone code two paragraphs side by side with a header and footer in CSS.

If their primary task was to build HTML emails then I could understand that train of thought. I suppose there are people out there that are working as front-end developers for websites that only work in HTML and CSS, but I would think that's getting more rare as time goes on. Of course, that could just be bias based on my own career. But, going with your suggestion as a thought exercise, I would go in a different dir…

The point of fizzbuzz is that it is a ridiculously easy test that any programmer that says they "understand" a language should be able to do, because they would touch things like loops and str manipulation in pretty much every program they ever write.

Nobody is going to color code repeating paragraphs in CSS on every project. You wouldn't use that javascript on every project either. (Perhaps these days you would I guess, but I'd argue its overkill for basic websites, to be honest) I can guarantee you're farting around with the box model though, and odds are you could be using a framework to do it for you. Which is precisely why I'd want to test it.

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

#349
post #48

Earlier quoted context omitted.

nothing? What answer are you looking for here? either a) there's something I'm totally missing or b) this is a really silly "trick" question.

It's a good chance to show off your knowledge of hoisting.

hm. Maybe it's just because I don't personally excel at this sort of question, but I don't like "trick" questions like this where the interviewer is not forthright with what they're looking for- another way to describe this is "playing mind games" with someone, which is typically considered impolite/antisocial.

I much prefer "Here's a domain problem, how would you solve it" to a vague question where the interviewer has a specific, hard to determine answer in mind. The former directly tests my ability to solve relevant problems, the latter just tests my ability to guess what the interviewer is thinking. In this case I'm perfectly aware of how variable & function declarations are hoisted in JS, but it wasn't clear to me that this was the answer sought- I know the answer but I don't know that's the answer being angled for so I fail at the question. Should this reflect badly on me? I am not sure- this sort of guessing skill may be what this interviewer is looking for. (?)

Post reply on HN