1. 9
  1.  

  2. 9

    The goal is to sufficiently intimidate junior developers so they will know to steer clear of your organization. It also has the nice effect of offending senior developers as well, so it’s great for quickly narrowing down your hiring pipeline!

    sigh

    I personally don’t use fizz buzz in interviews, and am rarely hit with it - but when it has come up I’ve never seen it used to intimidate, or to annoy. Almost universally it’s been presented with the interviewer saying “interviewing is hard and most people absolutely detest it, so here’s a warmup question to let you turn your brain on”. The few times it was asked of me I don’t think it was even done as a filter out question because everyone can either write it or has it memorized.

    Which is why I never understand the animosity towards it, or why it would cause you to register “shock” - take 30 seconds to write up the little loop and be done with it.

    Cool article otherwise though :-)

    1. 5

      everyone can either write it or has it memorized

      You would think so, but I have interviewed more than one candidate who has failed it (ok, just 2). It’s amazing how far some people appear to be able to get via stackoverflowing (or however it is they do it) and not actually reasoning about problems themselves. For this community I think it’s hard to fathom.

      Having said that, I don’t like the problem and have not personally used it in a long time or been hit with it.

    2. 4

      I’ve built something pretty similar. I wrote Fizzbuzz in the esoteric programming language Fractran by continuously adding Lisp style macros on top of Fractran. I did this until I had built a language that was high enough that expressing Fizzbuzz in it was fairly easy. If you’re curious, I’ve written a blog post about it which you can find here. It shouldn’t be hard to add a few more macros on top of what I already built in order to write meta-fizzbuzz in Fractran.

      In a different direction, there was a core set of macros (add a constant to a variable, print a character, and jump if a variable is greater than or equal to a constant) which all of the other macros expanded to. One day I realized that if I were to port those three macros to a backend besides Fractrain (e.g. Brainfuck), the rest of the language I built would still work. That means I could write Fizzbuzz in Brainfuck by just porting those three macros. I was half way done when I realized that I was reimplementing most of the other macros I wrote to generate Fractran in order to implement jump if greater than or equal to immediate. I eventually reached the conclusion that it would be much easier to build a language that compiled directly to Brainfuck that it would be to port the language I already had and gave up.

      1. 3

        Saw the Python tag and was expecting a nice easy article to start the day with. Boy, it escalated quickly!

        1. 3

          I was wondering how fast I could clock fizzbuzz out of an FPGA …

          1. 3

            language inside a language inside a language? what would possibly be faster?

            1. 1

              Yeah, I’m not sure fastest would be the right word to use, though it was pretty fast to write a program for his new language that satisfies the constraints.