Live data from Hacker News

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

news.ycombinator.com

221–230 of 363 posts

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

#221

I'm a marketer, and have yet to find a way to judge a marketer's competence better than: "Here's this app, here's what it does. How would you increase downloads?" A quick brainstorm session shows you how they approach the situation, what tricks they have in their bag, and what methods they feel confident using (or if they're just BSing). Interestingly enough, 50% of the time people answer "SEO," which is among the wo…

> The best answers often involve the person playing with the app and figuring out something you could actually build into the app itself.

I'm clueless when it comes to marketing. Could you elaborate here with some examples? I think the majority of apps are in a place where nobody knows they even exist, so how could improving something in them improve downloads?

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

#222

  A nation's newest war ship is slowly disappearing. The ship's hull
  is made of Aluminium while its cannon bores are made of Stainless Steel.
  What is happening, why, and how do you stop it?
Grad school chemistry/physics candicacy exam question, sure to generate colorful answers!

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

#223
post #180

Earlier quoted context omitted.

The history of coin flips has no effect on the future tosses, BUT you can use the history of flips to try to infer which coin you are dealing with .

But that's not what the OP/Interviewer wants to know. All he asked was this: "Given that you see 10 heads, what is the probability that the next toss of that coin is also a head ?" He didn't ask you to identify the coin. He just wants to know if the flip is going to be heads.

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.

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

#224
post #93

Earlier quoted context omitted.

I'd be curious to see that test.

Ditto! I'd love something like [0]You can't javascript under pressure, but You can't Query under pressure for SQL. :-) [0] http://games.usvsth3m.com/javascript-under-pressure/

It's a shame they don't have a leader board on that site; I completed the challenge in 4:21, but I have no idea whether that's good, bad, or indifferent among everyone who's done so. A Twitter search on 'I completed "You Can't JavaScript Under Pressure"' suggests that score is merely on the good side of indifferent, but given the relatively competitive idea behind the whole endeavor, it seems like formally ranking completion times would be a useful thing to do.

(The "you won" screen is also godawful, not least because of the potential risk of triggering seizures in the epileptic, but also very much because it's incredibly ugly. I mean, I know that tasteless is the new tasteful, but really.)

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

#225
post #93

Earlier quoted context omitted.

I'd be curious to see that test.

Ditto! I'd love something like [0]You can't javascript under pressure, but You can't Query under pressure for SQL. :-) [0] http://games.usvsth3m.com/javascript-under-pressure/

[deleted]

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

#226
post #59

Earlier quoted context omitted.

The Monty Hall problem (or a subtle variant) is also great one to watch people work through. It's a chance to see if people can thing about probability in a sort of asymptotic way. Basically (if they get stuck), ask them how they would choose if there were actually a 100 doors, but the same rules apply. Obviously, everyone switches. What about 99? 98? ... turns out, 3 doors is the smallest number where the strategy i…

The Tuesday boy problem is a little less known: http://mikeschiraldi.blogspot.com/2011/11/tuesday-boy-proble...

I don't get it, even after the explanation. What's the mechanism that constrains those probabilities?

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

#227
post #82
post #78

Earlier quoted context omitted.

Your result is correct but your reasoning is not sound. A & B => C and !B does not imply !C.

Well, I already admitted I'm not a logician: if A & B => C, (!A | !B) => !C looks implicit to me, and while this isn't the first time I've had my nose rubbed in the fact that it's not, I never could understand why not.

Just because A & B get you C doesn't mean that having A and B is the only way to get to C.

So you can't conclude that because you don't have A or B you don't have C.

It's like saying "Going down the A20 and the M20 (roads in the UK) gets you to Rochester (I've no idea if it does). I've not been down the A20 or the M20, thus I'm not in Rochester." The second sentence there isn't really valid, maybe you took a different route.

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

#228
post #222

A nation's newest war ship is slowly disappearing. The ship's hull is made of Aluminium while its cannon bores are made of Stainless Steel. What is happening, why, and how do you stop it? Grad school chemistry/physics candicacy exam question, sure to generate colorful answers!

'Galvanic corrosion' and applying a non-metalic layer between the cannon/deck would be my first thought. Now I'm curious as to some of the more 'colorful answers'.

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

#229

I'm a software developer, but the code I work does a lot of DB access. I always ask a "two joins and an aggregate question." Given three tables: authors books sales ---------- ---------- ---------- id id id name author_id book_id title date price find the total sales by author in November 2013. The result set should have two columns: author's name and their total sales.

I would make a couple of assumptions: - price could be 0.0 for a book - Total sales means the sum and not count - Date format will be yyyymmdd (if not, assume that we converted in Oracle or Sybase) SELECT a.name, SUM(s.price) FROM authors a INNER JOIN books b ON (a.id=b.author_id) LEFT OUTER JOIN sales s ON (b.id = s.book_id) GROUP BY a.name HAVING (s.date >= '20131101' AND s.date

In SQL, this would be an issue due to the date column not existing in the group by. Additionally, because of the having statement, the left outer join is being treated as an inner join with respect to the results given.

Something like this could work (without going for an alternate approach such as Unions or sub-selects):

    SELECT a.name, ISNULL(SUM(s.price), 0.0) FROM authors a
    INNER JOIN books b ON (a.id=b.author_id)
    LEFT OUTER JOIN sales s ON (b.id = s.book_id)
    GROUP BY a.name, s.date
    HAVING (ISNULL(s.date, '20131101') >= '20131101' AND ISNULL(s.date, '20131101') 
Edit: Actually might be better to keep the null in the results like the original query. It's definitely better to know whether a book sold 1000 copies for $0.00 each or if no copies were sold.
Post reply on HN