6 ms·
In all honesty, I'm not sure the author did a lot of interviewing. For example, > The famous fizzbuzz test simply asks "are you aware of the modulo operator?"
by skrebbel 10y ago
In all honesty, I'm not sure the author did a lot of interviewing. For example,
> The famous fizzbuzz test simply asks "are you aware of the modulo operator?"
Wait, what? No, it asks "can you write a for loop without breaking a sweat?". There's a rightfully vivid debate going on about the virtue of asking algorithmic questions in interviews, but fizzbuzz is hardly algorithmic. I'd wager that virtually all programmers iterate a collection at least once daily.
The followup sentence drives it home for me:
> Yet people will spend twenty minutes on it in an interview, a huge waste of limited time.
Well, if it takes an applicant twenty minutes to Fizzbuzz, you're done! Just saved everybody lots of time.
I used to think Fizzbuzz was insulting and bullshit until I started interviewing. I haven't yet met a programmer who couldn't solve a Fizzbuzz-level question, but I've met many who took over 10 minutes and made little logical errors. It's a great predictor for "can this person actually program, well, at all?".
- ProfChronos 10y agoAgree on technical questions + what he says on "team fit" really doesn't make sense: "You are NOT hiring for "team fit" I have never heard a definition of "team fit" that didn't end up sounding like "let our bias run free". Phrases like "looks like they belong here" are terrifying. More insidious are complaints like "doesn't like the same social activities we do". Grow up. Your office is not your frat house, and socializing with your co-workers outside of work is not some crucial test. There is no requirement that you like someone socially as long as you want to work with them." You don't ask people to be exactly like but you expect them to be able to work in a cool mood with you and to share things. Who would hire somebody that doesn't get along with the team??!!
- qaq 10y agoTeam fit is actually pretty important as far as how long the Dev will stick around.
- ktRolster 10y ago* It's a great predictor for "can this person actually program, well, at all?".* How do you know, have you hired many who had trouble with the Fizzbuzz? Or are you just guessing? (I don't know either; there's a lot of missing data in interviews)
- Maakuth 10y agoEveryone I know doing recruiting says that FizzBuzz reliably disqualifies surprisingly large fraction of candidates. Even half of them, even after prefiltering by education or relevant experience.
- LionessLover 10y agoThat is a useless statement unless they followed the rejected candidates for a few more years at least. Otherwise it's just a tautology: They suck because my favorite test says so (i.e. because I say so). Sure it weeds out "non-programmers" - any programming task (more than "Hello World") does. But how many people who are good programmers and just suck a) under pressure, b) especially when surprised are falsely out-selected? I once failed to answer what a right join is. I got the (freelancer) job anyway - and of course I knew all along what that is, but when I got that question I had not used any joins in years (doing infrastructure work instead), and under interview pressure I can't think except along narrow lines. I ended up doing most of the complicated SQL queries in the department, with people coming to me because to me that was easy. After failing a very simple interview question on joins.
- titzer 10y ago> That is a useless statement unless they followed the rejected candidates for a few more years at least. Otherwise it's just a tautology: They suck because my favorite test says so (i.e. because I say so). The same comment could apply to any rejection criteria. At my employer, we do have some data, since we do reinterview candidates after years in-between, especially if they are fresh from college. I can't speak for our organization but yes, basic programming hurdles do reliably weed out bad candidates. This is based on my experience of having done more than 150 technical interviews, all of which were balanced against the feedback of the other interviewers. Failing basic programming problems is a good predictor. > But how many people who are good programmers and just suck a) under pressure, b) especially when surprised are falsely out-selected? Any kind of test that is given to candidates has the same risk. But, let's break it down. Do you want to interview candidates for programming positions and _not_ have them program in some form or fashion during an interview? IMO that's nuts.
- drinchev 10y agoI agree with the author that Fizzbuzz is about the modulo operator if you present it to the candidate like that. What I would simply do is : "Write fizzbuzz test for language ... use the modulo operator, which is ... for that language" By doing this it's all about the loop. On top of that I think the author is right, because the pressure of the candidate is sometimes huge. I prefer giving a task that they can do at home. For example if it's a front-end position, it would be a small landing page. When I interview I usually tell the candidate : "I really enjoyed the conversation so far. Just to let you know, the management wants from us to get from every candidate a code sample, so I will have to give you a small task that you can do at home. I'm really sorry about that, but I think it will be also helpful for you to check out what exactly you will be doing here. Do it whenever you want, just make sure you have something by the end of the week. You can also ask me anything at ..." This sentence makes miracles. The candidate is motivated. The code is cleaner and though-trough. Then you can actually see if the person will be able to do the job.
- gavanwoolery 10y agoI can second the value of the take-home assignment. My last company, Appstem, gave them out, and it never once failed. It additionally succeeded in weeding out people who were not motivated enough to want the job.
- dfabulich 10y ago>> The famous fizzbuzz test simply asks "are you aware of the modulo operator?" > Wait, what? No, it asks "can you write a for loop without breaking a sweat?". There are notorious cases where senior engineers with years of actual honest coding experience "fail" fizzbuzz. IMO, That happens in two ways: 1) Not knowing (forgotten?) what a modulus operator is, and trying to code one up from scratch with a for loop. This can totally happen when you spend a few years working on line-of-business CRUD apps that never turn out to need modulus arithmetic. Coding modulus from scratch with just + - / * is a fun little challenge in its own right, but it'll probably take you longer than 10 minutes to write it correctly and solve fizzbuzz with it. That means you just took more than 10 minutes on fizzbuzz, which means you failed. 2) Trying to "clean up" the solution. http://c2.com/cgi/wiki?FizzBuzzTest http://c2.com/cgi/wiki?FizzBuzzTest has a good discussion on 'Why Fizz-Buzz is "hard:"', which points out that many of the most obvious solutions have code duplication, which some people then try to eliminate, tying themselves in knots trying to make it perfect. The third possibility, that a candidate with years of experience shipping code nonetheless struggles to write a for loop, is IMO just not as common as the above two failure cases. (Much more likely is that the candidate has lied/exaggerated on their resume.)
- corecoder 10y ago#2 happened to me: I wrote the straightforward implementation in a few seconds, and then struggled and tied myself up trying to eliminate the duplication, making it worse and worse, until I started panicking. Luckily the interviewer understood what was happening and changed subject.
- imtringued 10y ago>Coding modulus from scratch with just + - / * is a fun little challenge in its own right, but it'll probably take you longer than 10 minutes to write it correctly and solve fizzbuzz with it. It's surprisingly easy actually. var remainder = x - Math.floor(x/y)*y (Math.floor because javascript)
- benhoyt 10y agoIf you don't know about modulus, you don't have to re-implement it. For Fizzbuzz you're looping anyway, so you can just maintain two counters, one that counts to 3 and resets, and one that counts to 5 and resets. When one of the counters resets, you know the main loop counter is a multiple of 3 or 5. Like so: def fizzbuzz_no_modulo(): counter_three = 1 counter_five = 1 for i in range(1, 101): output = [] if counter_three == 3: output.append('Fizz') counter_three = 0 if counter_five == 5: output.append('Buzz') counter_five = 0 if not output: output.append(str(i)) print(''.join(output)) counter_three += 1 counter_five += 1
- imtringued 10y agoThe trick part of FizzBuzz is that the easiest solution relies on the magic "15".
- efaref 10y agoEven that's an unnecessary complication. The code solution should read like the spec, so that if someone comes along later to make FizzBuzz depend on some other set of constraints, they know what to do. The compiler can optimize away the duplicate tests. That's its job.
- chrshawkes 10y agoIf you're so crafty at sifting through candidates to resort to FizzBuzz to help you do it, why do you have to copy and paste FizzBuzz, why not come up with something original?
- skrebbel 10y agoActually I usually ask a comparably difficult question for fear that people might have actually remembered the solution to fizzbuzz by heart. But I didn't think it added to the discussion to mention that.
- Clubber 10y agoI think what he is pointing out is that if you don't know the modulus operator, you will fail FizzBuzz. The modulus operator is rarely used and somewhat obscure. The only time I use the modulus operator is when I'm writing something to track what record / rule I'm processing and I only want to show every 10,000th record or so. I can't think of a time I've used it otherwise.
- lmm 10y agoYou can implement it yourself if you forget it. Or use a counter (urgh). Or ask whether there's a library function that does that.
- PJDK 10y agoI had a pretty interesting experience with this. We were doing a bunch of interviews and decided to try out FizzBuzz. I wasn't doing this round of interviews, but things ended up a bit confused with timings and I had a 30-40 minute very casual chat with each candidate prior to the actual interview. In each of those I ended up probing a bit on technical stuff and everyone seemed to have a decent base level of competence. But they all went to pieces over fizzbuzz in the interview. The one I actually saw, I had had a fairly in depth conversation about what it actually means to use "ref" and "val" in C#, but then watched the same guy freeze and barely scrape through fizz buzz. My conclusion is that some people just can't write code in that kind of environment. What makes it tricky is some people (myself included) find it easy or even fun - maybe I can write fizz buzz in a single LINQ statement...Those people can assume that everyone not like them can't code.
- jogjayr 10y agoI can confirm. I went to pieces once when asked to do FizzBuzz when I wasn't expecting to code in a phone interview. I'm not a "rock star" programmer but in the absence of pressure I can knock out a FizzBuzz in < 2 minutes. And I have written real software used by real users that made money for my employers.