In the dim and distant mists of about 10 years ago we used to read blogs and social media wasn’t the mind crushing monopoly it is now. Us coders used to read blogs by people like Joel Spolsky and Jeff Atwood who eventually became the founders of good old Stack Overflow, in the days when it was unmoderated and full of racist and sexist chuds, but that’s a conversation for another day. I can’t remember which one of them was responsible for putting the idea of FizzBuzz into the toolbox of hiring managers everywhere.
FizzBuzz is a game. If you were in one of the British youth organisations such as the Girl Guides or the Scouts then you may have played it. In a circle around the camp fire each person says the next number: if it ‘s a multiple of 3 they say fizz if it’s a multiple of 5 they say buzz, a multiple of both is fizzbuzz. You are eliminated if you get it wrong. The game is over when there is only one person left. There’s nothing more to it than that.
In a wider context, I am a hiring manager and I’m talking to someone who comes across well but I’d still like to just see them do a little bit of code. To that end I pick a really simple problem and ask them to code it up. Something like FizzBuzz, Of course, are you talking one function that takes a number (or perhaps a string representing a number) and returning (or outputting) the correct FizzBuzz value? Or are you talking a function you hand a range to that returns an array? You could even have a conversation about how to approach it.
As an aside Jon Bentley did some experimentation in his book Programming Pearls where he asked people to do things that were then fairly common, like implement a binary chop search, but off the top of their heads. It was illuminating how many folks had off by one errors and so-on, very common errors in the days when we had to code these things by hand ourselves, and didn’t have ubiquitous testing frameworks.
In conclusion, you’re just being asked to do a simple programming task to prove you can actually code and you are capable like your Resumé/CV claims you are. They don’t know you, they’ve never worked with you, and just want a simple thing to check. More recently I saw a post on LinkedIn where it was a simple question of getting the maximum value from an array. Whether it was an array of strings or integers and what kind of ordering you might be using is another question that could lead to an interesting conversation. In an interview some years ago I had a couple of devs sit in while I replicated the output of a well-known Unix command in Ruby, explaining my process etc. etc.
The sole purpose of this is to simply get the interviewee to do something simple that should take a few minutes and demonstrate that they can write a bit of code. It’s not an insult, there’s no need to get on your high horse, and it’s much less stupid and time consuming than leetcode. I’ve been asked to do all sorts of very time consuming things before interviews and don’t consider this to be an issue, but if you don’t like it that is entirely up to you. I also think FizzBuzz is so long ago now, and it was a thing for a while, that maybe hiring managers should be a bit less lazy and think of something better, or even go looking for some simple problem solving questions that they can ask. That’s the main thing – can this person solve a simple problem and think it through?