Live data from Hacker News

Fizz Buzz in Tensorflow

joelgrus.com

61–70 of 85 posts

Re: Fizz Buzz in Tensorflow

#61

Earlier quoted context omitted.

Joking aside, this example does a great job to show one of my complaints with common (edit: enterprise) Java practices - Where is the logic?

Common enterprise OO problems. It is neither confined to Java nor representative of Java as used outside enterprise development.

> nor representative of Java as used outside enterprise development.

It isn't? I've turned down a couple of sweet gigs, at times when I really needed the comfort of work-group structure and maybe even a pay check, because I assumed that (based on my reading) it was all like that. I knew from history, back in the days when it was called Oak that it was a pretty delightful language. Then WS-* and Enterprise OO happened, and I assumed that's where it all went...

Re: Fizz Buzz in Tensorflow

#62
Not that I advocate this approach, but another way to look at FizzBuzz is as a personality test.

If a (senior) developer balks at writing FizzBuzz, perhaps it shows arrogance and a lack of humility. It could also be useful to see if the developer follows up to inquire as to why they were asked a FizzBuzz question, and about its relevance to the work. I see this kind of questioning as not only fair game, but good to ask about. Not asking about something that seems out of place could seem off.

Re: Fizz Buzz in Tensorflow

#63
post #7

Earlier quoted context omitted.

It's just a jape, not to be taken seriously, made in the great comic tradition of FizzBuzz Enterprise Edition: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...

Joking aside, this example does a great job to show one of my complaints with common (edit: enterprise) Java practices - Where is the logic?

ravioli-code

Re: Fizz Buzz in Tensorflow

#64
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.

It also reveals something that's not obvious, but is very clear to anyone who's tried (deliberately or accidentally): Teaching a neural network simply to count is surprisingly hard.

Re: Fizz Buzz in Tensorflow

#65
post #28

Earlier quoted context omitted.

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.

Training a neural network to solve fizzbuzz is over-engineering, fun over-engineering, but over-engineering none the less.

Re: Fizz Buzz in Tensorflow

#66

Earlier quoted context omitted.

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.

Sometime it is better to hire for culture, someone who is intelligent but also, and this is critical , can take a joke.

Which is why I said if this was for real.

Re: Fizz Buzz in Tensorflow

#67
post #43

Earlier quoted context omitted.

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.

Well, when you give a hilariously bad interview question...

It's not a bad interview question, if you think it is, you perhaps haven't had enough experience with candidates applying to programming jobs who talk a good talk but can't program to save their lives.

Re: Fizz Buzz in Tensorflow

#68
I'm absolutely delighted that there is more and more such developer-generated prose with context of recent events. Is there a place where it would be aggregated?

Re: Fizz Buzz in Tensorflow

#69
I think this just illustrates the Alpha principle, the interviewer was obviously intimated. This is because they are a Beta interviewing and Alpha. If the interviewer had more imagination and confidence rather than the long pauses it could have been a great learning opportunity!

Re: Fizz Buzz in Tensorflow

#70

Earlier quoted context omitted.

No loops, no sequence, one horrific line. :) Console.Write(String.Join("\r\n", Enumerable.Range(1, 100).Select(x => x % 15 == 0 ? "FizzBuzz" : x % 5 == 0 ? "Buzz" : x % 3 == 0 ? "Fizz" : x.ToString())));

Ternaries aren't super readable. Array.from(Array(100).keys()).map(k => k + 1).map(i => !(i % 15) && 'fizbizz' || !(i % 5) && 'buzz' || !(i % 3) && 'fizz' || i)

No need for ternaries!

    Array.from(Array(100).keys()).map(k => k + 1).map(i => [i,'Fizz','Buzz','FizzBuzz'][!(i%3)+2*!(i%5)])
Post reply on HN