Live data from Hacker News

Fizz Buzz in Tensorflow

joelgrus.com

21–30 of 85 posts

Re: Fizz Buzz in Tensorflow

#22
post #5

This whole thing is making fun of asking fizz-buzz to a senior programmer, but yet I've found it to be one of the best phone screen questions possible. For someone who is truly a senior programmer, they knock it out in about 30 seconds and we move on. For the ones who pretend to be senior programmers on their resume, it trips them up and I know right away that their resume is either a pack of lies or their previous c…

Senior programmer? ...

Shouldn't a junior programmer be able to solve fizzbuzz?

I'm light years away from being senior, but I can write functions like fizzbuzz in 10 seconds and can't find a junior job

Re: Fizz Buzz in Tensorflow

#23
post #2

interviewer: How far are you intending to take this? me: Oh, just two layers deep haha

I would have given him the job

If that were a real situation, I wouldn't have, he over-engineered the shit out of it and while cool, I prefer devs who can solve simple problems simply; they get more work done for the price.

Re: Fizz Buzz in Tensorflow

#24
post #22
post #5

This whole thing is making fun of asking fizz-buzz to a senior programmer, but yet I've found it to be one of the best phone screen questions possible. For someone who is truly a senior programmer, they knock it out in about 30 seconds and we move on. For the ones who pretend to be senior programmers on their resume, it trips them up and I know right away that their resume is either a pack of lies or their previous c…

Senior programmer? ... Shouldn't a junior programmer be able to solve fizzbuzz? I'm light years away from being senior, but I can write functions like fizzbuzz in 10 seconds and can't find a junior job

> Shouldn't a junior programmer be able to solve fizz buzz?

Yes, which is why when I would ask it of a someone who calls themselves a senior programmer I was dumbfounded at how many could not answer the question.

Re: Fizz Buzz in Tensorflow

#25
post #14

He should have used a Recurrent Neural Network with Long Short Term Memory so that the neural network won't have been dependent of the maximum number given NUM_DIGITS. Scalability! No wonders he didn't got the job. Joke aside, it's funny how simple machine learning problems can reveal people who think you can just give neural networks anything and output anything, and it will work like magic.

> people who think you can just give neural networks anything and output anything, and it will work like magic. What _is_ the proper method?

Well, there is a variety of possible answers here. Giving the direct integer ("1", "23") to a simple deep network won't work.

- RNN with LSTM might be a better approach, since it will more based on the value of the ordered bits than their "disposition", and could scale to an arbitrary high number.

- @zardo mentioned Pointer Network (https://arxiv.org/abs/1506.03134). It looks to solve this kind of problems but honestly I'm discovering it now.

- Give the base 3 and 5 of the input would be the fastest solution. (but since it's kind of hardcoding part of the solution, it's more a trick than a general solution).

Can anyone correct me what if I got something wrong here? Did I missed something?

Re: Fizz Buzz in Tensorflow

#26
post #12

Earlier quoted context omitted.

What architecture do you need to get 100% accuracy? Don't forget to use a validation set for the model and hyperparameter selection though!

I suspect that there is no way to predict in advance the smallest model which can represent any given function. However, we should be able to at least develop an intuition for depth and breadth that is sufficient on any given problem. Classically, division circuits are large and complex, so I naively expect a NN built out of add, mul, and Heaviside(x)*x to also be large and complex. As with many models, I suspect tha…

Pretty sure it's been proven that sufficiently large 3-layer networks can learn any function.

Re: Fizz Buzz in Tensorflow

#28

Earlier quoted context omitted.

I would have given him the job

If that were a real situation, I wouldn't have, he over-engineered the shit out of it and while cool, I prefer devs who can solve simple problems simply; they get more work done for the price.

This is not over-engineering. Defining a couple of functions to solve it would be over-engineering, like offloading Fizz to it's own function, Buzz to another one etc. Anything (deliberately) more is just comedy.

Re: Fizz Buzz in Tensorflow

#29
post #24
post #22

Earlier quoted context omitted.

Senior programmer? ... Shouldn't a junior programmer be able to solve fizzbuzz? I'm light years away from being senior, but I can write functions like fizzbuzz in 10 seconds and can't find a junior job

> Shouldn't a junior programmer be able to solve fizz buzz? Yes, which is why when I would ask it of a someone who calls themselves a senior programmer I was dumbfounded at how many could not answer the question.

FWIW, please be mindful of your biases. I recently had an interviewer with a major bank conglomerate who had some silly puzzle. I outlined a system for solving it in algorithmic notation, and the interviewer had no idea that such a response was appropriate and said sorry, that they were looking for someone with programming experience, not specific, just "many languages" ... Not saying you do this, but what if someone provided Fizz Buzz in COQ or Elixir, or some kind of rule based solver? Honestly a lot of that may look like gibberish to me if I was looking just for a way to dismiss people. Or what if they never heard of Fizz Buzz? Anyway... my brain starts to fixate on all of these corner case scenarios in hiring where you're screwed because something "easy" never does solve the hard problem of hiring. What if the person couldn't do it because they think you're trying to trick them? Anyway... best of luck in your hiring.

Re: Fizz Buzz in Tensorflow

#30
post #22
post #5

This whole thing is making fun of asking fizz-buzz to a senior programmer, but yet I've found it to be one of the best phone screen questions possible. For someone who is truly a senior programmer, they knock it out in about 30 seconds and we move on. For the ones who pretend to be senior programmers on their resume, it trips them up and I know right away that their resume is either a pack of lies or their previous c…

Senior programmer? ... Shouldn't a junior programmer be able to solve fizzbuzz? I'm light years away from being senior, but I can write functions like fizzbuzz in 10 seconds and can't find a junior job

10 seconds with good test coverage is quite nice.
Post reply on HN