Hacker News new | ask | show | jobs
by watwut 2773 days ago
FizzBuzz is relevant to job. People complaining about izzBuzz havent had the pleasure of working with someone able to talk about development well while being unable to write simple code. Problem of FizzBUzz is that it is too easy, so folks get insulted.

I have worked who are totally passionate and read all the blogs and can talk about all new buzzwords and techniques. Who simultaneously had problem write simple code. That is incomparable to Beowulf.

4 comments

I agree completely on Fizzbuzz. It has saved us from making so many bad hires. It takes 15 minutes during the interview and you learn so much about a candidate. Not only if they can do basic coding but also how they react when they encounter something that don't know or conversely how they react when they think something is "easy" or "beneath them".

10 years ago I was asked how to tell if an integer is divisible by two without using division or modulus. What they expected was to bit mask the 1s place in the integer and check for equality with 0. I'd take Fizzbuzz any day.

10 years ago I was asked how to tell if an integer is divisible by two without using division or modulus. What they expected was to bit mask the 1s place in the integer and check for equality with 0.

Wait, it gets better. I was asked the "divisible by two" question and gave the standard bitmasking technique in response. But then my interviewer said that wasn't "allowed" either, because apparently this programming environment they do their daily work in (this was an old-school web development shop basically) doesn't support basic math operations of any kind except equality, plus and minus.

He then pressed me for something "even simpler", "perhaps using function calls". Then I figured out what the "right" answer was -- he wanted be to test for odd- or even-ness recursively by, well, you know how.

So after reminding him about the obvious performance drawbacks of such an approach, I asked him -- "So do you actually write code like this in production?"

To which his answer was: "No, but I do during interviews".

come on. this is so obvious. read an int at that location and see if you take a misaligned read fault. so easy.

if CPU masks it then time the read.

ok partly sarcasm but partly: this isn’t a hard question. i’m sure i could enumerate ALL the possible ways to do this. maybe i’m good at puzzles.

if your comment is about how awful an interview question it is, in that case yeah i agree. but not because it’s hard. anyone should be able to answer this.

I never said it was hard. I was pointing out that people have been asking easy screener type questions like fizzbuzz for at least 10 years.

Further I was pointing out I prefer fizzbuzz because it at least bears a resemblance to what would be done on a daily basis on the job.

> anyone should be able to answer this.

Anyone should be able to answer fizzbuzz yet people who look good on paper constantly fail it. This is why it is useful. And that is why it is actually not a bad interview question. (in my opinion)

FizzBuzz is just an icon, of course. And by itself not such a bad filter - even if it's just basically a test of memorization (a lot people actually can't remember a simple trick like that, or can't be bothered to see the importance of it).

The only problem is... at some point the tech industry basically started saying to itself, "That worked pretty well! Now if we can just make our tests 50 times harder the must be... 50 times as good!"

Which explains a lot about the situation we're in now.

> ... can't remember a simple trick like that

What "simple trick"? The original point of FizzBuzz is not to check that the interviewee produces hyper-efficient code that avoids repeating the divisibility checks (or, for that matter, to check that they repeat the divisibility checks and are able to defend why that's simpler). It's to check that they can write down any solution at all (within reason [1]). Doing that doesn't require any tricks; you literally just need to write down the requirements in the form of code. Unless you count for loops as tricks! I know the guy who came up with FizzBuzz [2], and he did so to root people who couldn't code at all, not those who weren't good at coming up with (or memorising) coding tricks. Or, if the "trick" you're talking about is memorising, verbatim, a simple for loop solution to FizzBuzz without understanding it, then that can be countered with small variations of the problem.

I agree that some interviewers pose questions that are too hard, which ending up testing ability to perform in an unrealistic situation more than actual programming competence. Of course this happened before FizzBuzz existed. Similarly some probably set a straightforward FizzBuzz and overanalyse details rather than worrying about whether it works (or worry about silly syntax mistakes, which are perfectly reasonable on a whiteboard).

[1] http://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/

[2] https://imranontech.com/2007/01/24/using-fizzbuzz-to-find-de...

I guess the parent posters point is you could come up with a question bank of FizzBuzz problems, that candidates can study through to ace through your Imperial exam.

There is generally little substitute for real world experience. Measuring through proxy only goes that far.

In the past one of my bosses said he the most valuable thing to asking someone claiming to know C++ was "How do you make a class member that cannot be accessed outside the class". If you know anything about C++ you know the one word answer, yet many so called programmers can't get that far.
That’s a good idea. I interview programmers and I’m pretty sure some would fail that question. What I don’t get: why put C++ on your resume if you don’t even know the basics?
If I had to guess, it's the "I'll figure it out" mentality. The problem here is, with C++, you probably will NOT figure it out!

I did the bare minimum C++ in my classes. I can write trivial little "code challenge" type things with it. (mostly imperative style, very basic OO) But, ask me anything about Templates, etc, and I'll quickly admit you've gone beyond my knowledge. I'm intrigued at the answer to this question though....

Actually a great programmer will figure C++ out fast enough for most purposes. Templates are weird and hard, but a great programmer can figure them out. However if you don't have a several years of experience you will make mistakes, so I can't hire you as the next go-to expert in the difficult corner cases of C++ that sometimes we can't avoid (though as we move to modern c++14 there are a lot less of them)

If you lie on your resume and I catch you that is an important red flag because I no longer no what else I can trust you on.

I think that's where I was coming from: "if you don't have several years...." I learned enough C++ in school to complete my assignments. But the C++ PRs I've reviewed contain FAR more than those rudimentary basics. When looking at Rust, it brought back some of those memories. (`using` vs `uses`, etc) I'd never DARE say I "know" C++ well enough to be useful.