I hear that many of the applicants we interview still have a hard time with FizzBuzz and other simple examples of looping, testing, and printing integers. This was true in 2007 when Coding Horror wrote this a famous blog post on Fizz Buzz, true in 2010 when DanSignerman famously asked StackOverflow about it, and true in 2017 when Hannah Ray answered the same question again on Quora. And today in 2019 I watched a video by Lets Build That App that explained how do solve FizzBuzz using fancy features of Swift 5.
So, yes, by external and internal validation FizzBuzz is still hard for software developers in an interview context to perform on demand.
In a quiet room with a clear set of requirements FizzBuzz is no problem. But under the pressure of an interview where the spotlight is on every misstep on the whiteboard FizzBuzz becomes something like the Great Filter of Software Interview Questions—Maybe we have not found intelligent life out in the stars because alien civilizations can’t pass the job interview!
Filtering numbers (so you can print “fizz” on multiples of 3 and “buzz” on multiplies of 5) is great for making sure you understand how language features work and that division by zero is bad.
Filtering numbers was probably a meaningful interview question in the 1980s and 1990s, when I learned to code, because it was a major pain with Assembly, C, and C++ (but not LISP). Today’s languages like Java, C#, Swift, Kotlin, and Python take all the challenge out of FizzBuzz.
The new Swift 5 language feature, isMultiple(of:) doesn’t even crash when you give it a zero! Where is the fun in that? And who knows if this advanced Swift switch statement with assignments as case expression is executing in constant time or blowing up the stack?
(Somebody knows all these things but software development is so routine now as most VMs and IDEs have airbags and baby-bumpers around your code.)
And yet many software developer interviews crash and burn on the FizzBuzz question! I think it’s because as team leads and employers we are rooted in the past. More and more code is being written from well engineered frameworks and yet we act is if knowing everything from first principles at the start of a developers career is critical for success. It’s not.
A good developer matures over time and has to start somewhere. There are better tests than FizzBuzz for filtering integers and engineers. It’s best to look for potential, the ability to learn, work well with others, and passion for coding, when interviewing candidates!