It forces the employer to create a test that is more real world and thus is a closer reflection of the actual work being done at that company.
Unless of course your company is doing alot of real world fizzbuzz.
It forces the employer to create a test that is more real world and thus is a closer reflection of the actual work being done at that company.
Unless of course your company is doing alot of real world fizzbuzz.
FizzBuzz is not designed as a test of real-world programming skills; rather, it is a deliberately easy test to ensure that a candidate can solve an elementary programming problem from scratch.
The idea being, that somebody that can not solve a trivial problem is in no shape to tackle a harder problem.
Many companies overthink this. They add TDD, or try and test if a candidate can implement Dijkstra's Shortest-Path Algorithm, or any number of other complications.
But that all misses the point of what FizzBuzz does.
FizzBuzz is a first-stage filter, and exists only to screen out copy-pasta programmers that, while their resumes might look good on paper, can't actually code.
There are a lot of those programmers out there, even today.
FizzBuzz should take a candidate no more than five minutes in a language they are familiar with. It really should be that level of simple.
After FizzBuzz is when you can dive into the real-world problems, because the candidate has demonstrated that they can write code.
Now, admittedly, I have moved past FizzBuzz, and now prefer doing a simple pairing exercise over-the-phone, but FizzBuzz is still a useful tool in the interviewing toolbox for companies that don't use pair programming.
If you do use FizzBuzz, I do recommend changing it up. Don't just copy Atwood's FizzBuzz problem. Change the numbers, mix the conditionals around, that sort of thing. But keep it just as simple.
I said recently in another thread that the lead tech at my company was complaining during one round of interviews for a senior position, that some of the candidates couldn't even conceptually 'get' FizzBuzz, let alone code it.
> FizzBuzz should take a candidate no more than five minutes in a language they are familiar with
I'll go a step further and say that if you're the kind of person that takes FizzBuzz as a personal insult, then you should be able to write it out in 60 seconds max, and move on with the interview. FizzBuzz is not for 'you', it's for the people who claim to be as good as 'you', so take it easy and move on.
Complaining about FizzBuzz is like complaining about having a police check done, even though you don't have a criminal record. The check isn't for 'you', the innocent person.
I see your step, and raise you. :)
Asking a developer to spend five minutes to write a trivial problem is not an insult. Somebody that takes this as such is probably not going to be the type of person I, or my team, will want to work with, and we can end the interview process there.
I can totally understand balking at a one-day "homework problem" given out as part of the interview.
Not because this is an insult, but because it gives nothing to the candidate. An on-site or remote "test drive" where they spend a day working with the team is fine in my book, because that experience is valuable to the candidate in answering the question of "will I be happy and productive here?"
A company that demands a full- or half-day of time in exchange for nothing, not even information, probably does not value its employees much.
My personal policy is that the interview process can consume no more than one day of a candidate's time in total, plus an hour for a phone screen, and that at the end of the interview, both parties can make an informed decision as to whether or not they want to continue.
But five minutes to complete a trivial programming test? Writing this post took about that amount of time.
My real frustration with FizzBuzz rises from getting this "test" at the in-person interview. Multiple times. Do it in a live coding session as part of the phone screening, and make those results available to all interviewers. Reserve the limited time that is available for in-person interviews for real questions, not filters.
Or think of a better filter question than FizzBuzz. One great example for someone who claims to be a Python programmer - fix this:
def foo(x, bar=[]):
bar.append(x)
return bar
That lets me know that you as the interviewer also know more than FizzBuzz. >>> def foo(a, bar=[]):
... bar.append(a)
... return bar
...
>>> foo('a')
['a']
>>> foo('a')
['a', 'a']
>>> foo('a')
['a', 'a', 'a']
>>> foo('a')
['a', 'a', 'a', 'a']
EDIT: Having the program output as part of the problem would probably help. :DOkay, minus another couple points to me for not testing each case more than once, and yes, if you're going to present syntactically valid code and ask people to "fix" it you should probably state what it's supposed to do, but aside from all that... the hell?
Okay, having Googled the logic behind this behaviour, I still think it's stupid. My next question is - is being aware of little language gotchas like this really so important? It really bugs me that about all I'm good for in the employment market is making computers do stuff, but I'll never pass an "esoteric language behaviour test" in anything - my tastes are too diverse and I've never gone "all-in" on anything. But I don't think it gets in the way too much - you keep your changes modular and test frequently, and if it doesn't work right you figure out why. Which corners of the language you tend to bump into depends very much on your coding style (for instance I try hard not to mutate things which is possibly why I've not hit this before), so even with a brand new language you should be able to get going pretty quickly.
Surely I'm not useless?
Yeah. Python. A fun little wart.
> is being aware of little language gotchas like this really so important
Somewhat ironically, our conversation here highlights why it is important. If you initially tested these three lines of code to your satisfaction and didn't find the bug, how could you assume that your unit tests would catch the bug?
> Surely I'm not useless?
I would hardly think you're useless, but it does show a lack of experience with the Python language. On the other hand, your most recent response also shows a capacity for looking up and identifying the language WTF and how to fix it, skills which are important in lieu of experience.
If you can't define the behavior for such a simple function how are they supposed to know if it's working or not? Several posts later you still haven't. Is foo meant to append to the array? Is it meant to initialize a new one? Is it meant to create one if it's null?
The function is called foo, any normal person would say "wtf is that supposed to do?".
It is a Python gotcha, and nice if you recognise it, but this definitely does NOT give you any indication of whether or not this person is a good programmer.
What can be said is that if someone recognises this isssue then likely they are a good Python programmer. But the converse is not true that all good Python programmers would recognise this, and therefore this is a test that potentially eliminates a bunch of good programmers. That's a bad test.
This test allows the interviewer to feel smug about how much smarter they are than the interviewee. LOTS of interview tests are set up that way. "Oh, you don't know some very specific thing about your primary programming language? Then (jeering) you're not very good are you!! I know that and you don't!". That's not skills evaluation, it's ego wrapped in the guise of skills evaluation.
This is "trick oriented recruiting" and not far removed to me from asking how many ping pong balls would fit in a 747.
There is plenty of room for more open tests, but fizzbuzz doesn't require it.
That's precisely my point.
If your selection process includes fizzbuzz then your selection process is ineffective.
Both of those examples have rigorous training requirements before it's even legal to call yourself one and even then they still have some level of fraud.
Anyone can call themselves a programmer and the only real world requirement is being able to program.
There are many, many approaches that will also filter them out, but the point of fizzbuzz is to do it immediately without wasting a lot of time of your engineers on candidates that can and should be discarded within five minutes.
Thats the job though. Most jobs include a lot of googling + copy/paste.