12 ms·
Ask HN: What % of your job interviewees pass FizzBuzz type questions?
I'm sent 100 resumes a month, then interview about ~10 people. Of those, about 50% can do FizzBuzz style questions. On paper, all of these ~10 people would be qualified to do the work, however (I think) some have become rusty, or focused more on management or other areas.
What percentage of your job interview candidates pass FizzBuzz style questions? Any tips to improve the signal to noise ratio?
- ericb 15y agoIn the actual interview, I find that most give up after spitting out some pseudocode. About 40% have reasonable psuedo code that makes me think they'd get there (but these half-answers don't give me enough confidence to give them a thumbs up). Actual code that works (and running it from a terminal), we are seeing only about 15% tops maybe lower. We have started sending a fizzbuzz-ish question, a relatively easy css question, and a word-problem about performance as pre-interview questions through recruiters. This has dropped our resume inflow dramatically and saved a lot of time, but that's depressing in a way. We are looking for a Rails or PHP dev in waltham (near boston) currently without a lot of luck. The job has a lot of pros, but probably doesn't do itself justice on-paper.
- acangiano 15y ago> We are looking for a Rails or PHP dev in waltham (near boston) currently without a lot of luck. The job has a lot of pros, but probably doesn't do itself justice on-paper. Are you attending local PHP and Ruby/Rails meetups and user groups? If none are available, consider starting one.
- ericb 15y agoThat is good advice. We are at just about every Boston Ruby Group meeting, though...
- IdeaHamster 15y agoRelated: Are you considering remote employees? There seems to be a trend of the top Rubyists working remotely (that's if you want a top Rubyist, I'm pretty sure you can find a competent Rubyist if you keep looking).
- oscardelben 15y agoIf you're considering remote employees or contractors I'd like to get in touch.
- dhimes 15y agoThe job has a lot of pros, but probably doesn't do itself justice on-paper Keep in mind that you may be getting a lot of good people with a lot of pros, but that don't do themselves justice on paper.
- ericb 15y agoPossible, but the painful disappointments have all been the reverse. Good on paper, but the paper is, to be generous, "embellished."
- dhimes 15y agoSure, but it's really hard to try it the other way: "Well, he looks like a dipshit on paper, but I've just got a feeling." I haven't hired for my own company yet, but when I did if for previous employers I found it quite hard.
- rmc 15y agoa word-problem about performance Would you be able to share that? Simple programming/algorithm questions are a dime a dozen, but I'm curious what a word probably that's appropriate to coders would look like.
- ericb 15y agoSure thing: Describe how you might approach researching, diagnosing, and reducing the page load time for a web page with poor performance.
- unshift 15y agothat question is a bit of a turn-off to me. obviously "benchmark it, see what's slowest, and make it faster" is a correct answer, and so is a 40 page essay about browser rendering, minification, full page caching, fragment caching, AJAX, etc. have you tried anything more specific?
- ericb 15y agoIf you have examples of more specific questions, I'm glad to hear them. I would accept either of your answers, btw. Answers I have seen include "It is always SQL" and "make it ajax--ajax is fast." The purpose is just to verify that they can put some ideas into writing, have a mental framework for debugging in place, and can verbally demonstrate any sort of familiarity with the technologies involved. It isn't a gotcha-type question that expects a specific answer. edit: That said, your feedback is good and I will amend it to give more of an idea of how long a response is desirable.
- rmc 15y agoAnswers I have seen include "It is always SQL" and "make it ajax--ajax is fast." Haha, I see what you mean, that is a wordy FizzBuzz
- ahi 15y agoTo be fair, it almost always is SQL and ajax is a decent way to hide unavoidable performance problems when everything else fails. Point taken though.
- acangiano 15y agoI mostly interview students for hands-on internships. I'd say around 10-20%.
- EponymousCoward 15y ago10-20% (pathetic really)
- pixeloution 15y agoJust curious if you expect perfect code on a sheet of paper or give them an IDE and say go for it. As I remember fizzbuzz (print numbers 1 thru x, then fizz if divisible by 3, buzz if divisible by 5, fizzbuzz if divisible by both) I did it in a text editor in under a minute. Got two errors because I did it without thinking, fixed it, and had a working solution in 90 seconds. It's taking me longer to write this response. I can't imagine anyone who writes code daily who couldn't get this right in under 5 minutes given a text editor and a way to run the code, but I could imagine plenty of people who trying to do it on a sheet of paper who would make goofs. And most of those would make good employees.
- hga 15y agoBack in the days when I did this (1990s) we did the C/C++ reverse a linked list and compute the factorial of a number. And, yeah, people made mistakes on a dry erase board under interview pressure, but it was very clear who has a clue vs. who couldn't program their way out of a wet paper bag. These sorts of tests are low pass filters, they're not designed to find good or great programmers, just confirm that the person can program at all (as we define it). Since most people who call themselves programmers really aren't, they're highly useful. Anyone who's looking for perfection of this nature in an interview and who fails a candidate for lacking that is doing the latter a favor by not hiring them.
- dlikhten 15y agoGive em a laptop. Those are a dime a dozen (we got a ton sitting around the office). Have em code in front of you. Hell I'd install any interpreter within reason to let em solve it.
- wladh 15y agoIt's not about how expensive a laptop is or isn't. If somebody can't master the basic syntax of the language so that they can write a very basic algorithm without syntax errors and in such a way that it would run on the first try, they can't be very productive. And fizzbuzz is really the rock-bottom of the simple algorithms. Even a linked-list library would be a very reasonable thing to ask (if we're talking about C for instance). If somebody has to go through a few edit/(compile)/debug/change cycles for each simple thing, it doesn't sound very productive. Now, obviously if we're talking about an application that involves some baroque frameworks and class hierarchies, things are different, but simple things should be doable on paper.
- mattdeboard 15y agoI wish we would run at least some kind of sample problem before hiring people. sigh
- hga 15y agoIndeed; if you interview at a company that doesn't to this sort of thing if you have any choice you're well advised to avoid them. There's simply going to be little joy working with people who can't program and can either stick around or who have to get fired. And things can get ugly for those who do have a clue, from envy to having to do others work to avoid project or company failure and losing your job.
- mattdeboard 15y ago> There's simply going to be little joy working with people who can't program Well, it does make for exciting bitch sessions in IRC.
- cantastoria 15y agoI'm curious what candidates are getting stuck on. Is it the testing for divisibility that's tripping them up?
- pixeloution 15y agoOP may not be actually using "FizzBuzz" as he said a FizzBuzz-type problem :)
- cantastoria 15y agoOk fair enough, but I'm still curious where the sticking point is. Can they at least code the loop? I'm wondering if it's just that peoples' math skills are typical pretty rusty and if using another set of conditions would give you better results. Edit: For example, iterate through this string every time you hit an 's' print fizz etc...
- jamii 15y agoFor some reason this is the most common mistake I see from students: for i in range(0,n): if i % 3 == 0: print 'fizz' elif i % 5 == 0: print 'buzz' elif (i % 3 == 0) and (i % 5 == 0): print 'fizzbuzz' else print i It's not so much arithmetic that's the problem but reasoning about overlapping boolean conditions.
- cantastoria 15y agoHmmm.. I see. Is this done on a whiteboard? If you let them use an editor and run it and they fixed it right away would that be acceptable? I wonder if people are getting such bad results on this because it's always the first question they ask and the candidate isn't comfortable yet.
- chollida1 15y agoAgreed. When we see people trip up it's often becaues of this. I think the problem is the old adage about not being able to to see the forest for the trees. They break it down to the simple components and write those fairly easily but the forget about big picture of all 3 conditions working together.
- schulz 15y agoI did a ton of interviewing a few years ago ~ 100 interviews. I found about 10% nailed it right away with code that would compile and run. These were generally people who had been coding a lot recently. Half of the rest (say 45% of total) got close: Minor syntax errors, logic errors, stuff that an IDE/non interview situation would have fixed. 45% just spaced. Couldn't right the for loops, conditionals. Couldn't write basic code.
- minikomi 15y agoWow.. This is pretty astonishing. I know this is a majorly skewed, opinionated audience, but do people really not have that much of an interest in what they do?
- eftpotrm 15y agoThat sort of thing specifically, never actually tested it. The last test I did help administer was for a VB+SQL job, and the first question was to write an example of a valid INNER JOIN. I'd say at maximum 25% of the candidates could do this. Improving SNR? I did once have a potential employer get me to do a time-limited online test. If you wanted you could always stick your questions into one of them, so you can at least do the fizzbuzz-level screening without calling them in and sitting them down.
- tomjen3 15y agoI think the reason you got so bad responses on the first question wasn't that they couldn't write the join statement but that they had heard the distinction between the different joins once in college and then never considered them again. I bet that if you had asked for an example of a sql code which would list all the employees born before 1980 along with the department they worked for and the name of the head of that department, you would have gotten a much more useful result out of that. That query is, incidentally, much more difficult to write.
- eftpotrm 15y agoBut with a normalised database you couldn't the above without two inner joins (and it's still a trivial query that any competent dev for that sort of position should be able to dictate while driving, it's that easy). Really, if you can't remember the difference between inner, outer, full and cross joins then you shouldn't be working with databases. Which was rather what the test showed us, frankly.
- lrm242 15y agoHow are you asking the questions? Good interviewers try to adapt to the person they are interviewing. Depending on how you're asking the programming question, you might want to think about changing it. If, for example, you sit back in your chair and ask someone to go to a whiteboard to write code you should consider that some people simply are not going to respond to that sort of method of answering, even if they are a brilliant programmer.
- hga 15y agoThe last time I was a part of this activity in a company (1997-8), using similarly rigorous pre-screening, we had about the same results, only 50% of the people we interviewed could program their way out of an (EDIT) wet paper bag.
- kaybe 15y agoHow would I go about programming my way out of a paper bag? It creates the weirdest ideas and images in my mind.
- hga 15y agoOops, although this won't help your mind ^_^, the correct expression is "... out of a wet paper bag". From more apropos usage about fighting or escaping from such a flimsy thing. And now that you mention it, I have no idea either ^_^ ... except that it ought to be easy. In that last company where I was part of the hiring process I myself got the job only because I was the only one they interviewed who could pass their dry erase board tests (at the time they didn't have good pre-screening or access to a good candidate pool; I myself answered a want-ad). Tests that were to me so simple I barely remembered them (two decades of experience by then).
- kaybe 15y agoMaybe if there was a robot to program, I guess that would count.. now that would be a great opening move on part of the company! :D Let's see.. you'd have to get the robot into the right position (maybe find it with sensors - what kind of wet paper bag are we talking about, the dark kind?) and control another part that's capable of ripping the bag. Depending on the size of the robot you'll have to move it around a lot to make a hole big enough for yourself. Of course, you can also have the applicant design a robot for that task.. uhm, I'll stop now.
- hga 15y agoWell, you know, MIT's introductory EECS course is now Python programming of robots, so as soon as those students start graduating ^_^.... Thanks for calling me on this rather mixed metaphor I've been using for a long time in a most amusing way. You're brightened my end of the week.
- DrJokepu 15y agoIn my experience, about one in five (20%) people I get to interview can solve basic programming problems on a whiteboard (in their language of choice). It's really depressing.
- gabyar 15y agoAbout 80%. Perhaps we're more vigorous with resume screening. Over the last 4 years of interviewing, I've become very good at resume screening.
- chollida1 15y agoI've actually asked this question as a gentle warm up for people, and we achieve around a 90% success rate. On average it takes people around 5 minutes to do. We have people do it on a whiteboard to get them standing up and moving.
- spamizbad 15y ago4 candidates, 2 passed FizzBuzz. Oddly, the two that failed had a Masters in CS (albeit no BS in CS). Of those that passed: one had Masters in Library Science looking to change careers. The other was a fresh out of college CS major from Illinois State. Next batch, I think we'll add another trivial question: count the number of vowels (a, e, i, o, u) in a string.
- pixeloution 15y ago<?php $string = "aeiouxabcd"; $checkfor = array('a','e','i','o','u'); $count = 0; for($x = 0; $x < strlen($string); $x++) { if(in_array($string[$x], $checkfor)) { $count++; } } echo $count . "\n"; Am I hired? Or do I lose cool points for PHP?
- woogley 15y ago<?php echo strlen(preg_replace('/[^aeiou]/i', '', 'hello world'));
- deleted 15y ago[deleted]
- patio11 15y agoEvery time FizzBuzz problems come up among engineers, people race to solve them and post their answers, then compete to see who can write increasingly more nifty answers for a question which does not seek niftiness at all. I'm all for intellectual gamesmanship, but these are our professional equivalent of a doctor being asked to identify the difference between blood and water. You can do it. We know. Demonstrating that you can do it is not the point of the exercise. We do it to have a cheap-to-administer test to exclude people-who-cannot-actually-program-despite-previous-job-titles from the expensive portions of the hiring process.
- peteretep 15y agoYou lose the cool points for not using a regex, I'm afraid.
- aplusbi 15y ago
- aplusbi 15y agoI've never asked FizzBuzz but I do regularly ask coding/algorithm questions. They are usually more difficult than FizzBuzz. I'd say around 80-90% can at least come up with a solution in 45 minutes with some help. Probably less than 10% can come up with a good solution entirely on their own. I attribute this to two things, first I think our phone screenings work well enough to keep out people who really can't do FizzBuzz, and second that I'm fairly generous during interviews. I often don't expect real code, sometimes I'm satisfied with just a discussion of the algorithm (no white board coding at all). I don't expect code to compile and I even let candidates use undefined "helper" functions (although I usually only allow that if I get the feeling that they could implement them if asked). * For those that are curious I have two favorite questions - print out all the permutations of a given (ASCII) string and describe a search algorithm for a sorted array that has been split in two and the two pieces have been swapped (i.e. - 4,5,6,7,8,1,2,3).
- pp13 15y ago@aplusbi Let's say I interviewed you. I had asked to implement the fastest algorithm to give back the largest palindrome of words in English dictionary and compare it the largest palindrome of the french language. What the best solution you can come up with in 45 minutes. After, that I asked you, write a simple ftp server, in the language of your choice. With your first solution, I asked you implement a SSL library and add it to the ftp server to make it sftp. Based on that I can judge how good of a programmer you really are. Sorry for being sarcastic, but I think most interviewers are on a power trip. They ask questions that if they heard for the first time, they couldn't come up with answers either. I think your better off really talking about and going in depth with the programmers experience. If your experienced yourself, you should have no problem.
- eropple 15y agoHis first question is very straightforward if you've ever encountered permutations in a math class (and you should have, if you're a programmer). Even if you haven't, it shouldn't be that difficult. His second is trickier, but solvable. And, no, I've never seen that (particular) question before.
- elliottcarlson 15y agoI have used various interview questions, including FizzBuzz, factorials and other questions, and I would say the success rate I saw was about 20%. My personal favorite question is to have someone write a shuffle function without using any built in randomization functions - however most people give up, and others can't follow simple directions and wrap their head around the problem. This particular question had more of a 5 to 10% success rate.
- iron_ball 15y agoDo you meant that they can't use Array.shuffle() or Array.sort(<some built-in random function>)? Or that they don't get any external source of randomness, even a 0.0 - 1.0 float?
- elliottcarlson 15y agoNo built in functions such as the ones mentioned, and preferably no quick entropy generating methods that are obvious but that's not as important as not using the built in functions. Another requirement is that each run of the function has to truly be a reshuffle of the array so that it can't be predictable. It's harder than it sounds, but I also don't expect a perfect answer - generally I just want to see how people think out of thee box to try and solve an odd problem.
- mikereedell 15y agoWhile we don't ask FizzBuzz in particular we have a question my manager asks: If you could fold a piece of paper 50 times, how tall would it be (very rough ballpark figure)? Our success rate is surprisingly low.
- noahc 15y ago1.8 Times?
- pp13 15y ago1/2x +1/2(1/2x + 1/2(1/2x +1/2(1/2x + ... = y If x = 1, then the equation likes this: 1/2 +1/2(1/2 + 1/2(1/2 +1/2(1/2 + ... = y 1/2 +1/4 + 1/8 + 1/16 + 1/32 + ... = y y = 1 = x y = x source: http://library.thinkquest.org/J002235/hard.html http://library.thinkquest.org/J002235/hard.html u mad?
- noahc 15y agoNo, I am correct. When I was calculating the height of the paper, not the thickness.
- cantastoria 15y agoThis is a pretty abrupt way to start off an interview. And I don't understand the point of this question w.r.t assessing someone's coding ability. Though I'd be curious to see if the success rate on that question and on a fizz buzz correlate.
- mikereedell 15y agoIt's generally asked at the end of the interview.
- pp13 15y agoObviously, your rate would be low. The implied domain of the question would throw people off. The question isn't a good indicator if someone can program. Why don't you ask your manager the following. If 1/2x +1/2(1/2x + 1/2(1/2x +1/2(1/2x + ... = y, then x = ? If can't get it in 5 minutes, he is not fit for his job.
- corin_ 15y agoCan anyone explain how it is possible for people applying for these jobs to fail? I dabble in code, but am no where near the level I would have to be to do any job in this area, I mean seriously. Took my two minutes to do it with a pen and paper in PHP, same with in JS, same in bash scripting. How can anyone who isn't able to do this pretend to even have an interest, yet alone the ability to do the job?
- hga 15y agoGood questions. I'm not sure myself, but I suspect the lure of $$$. Someone who's good at playing a sort of game I loathe can prey on companies that don't do good screening and keep a job for as long as a few months and sometimes indefinitely. Heck, look at how much cargo cult programming goes on at companies from top to bottom. PG pointed out that one of the main reasons for dot.bomb failure was not being able to technically execute (sure, the company may still have been hopeless, but they didn't even get to test their sales proposition). And a lot if not most companies simply don't focus on technical excellence or even simple competance. E.g. look at how the powers that be at Friendser let it wither on the vine because they assumes the tech was in the bag while their persued big deals, all the while ignoring for years (I think) that the system had gotten so overloaded it was essentially useless. And, heck, if I had the time to mentor you and you were interested, I might take you on even at your current level. You "know your own limitations" today, but you're still, say, better than 70% plus or minus of the people who call themselves programmers. If you can execute the little stuff, I can teach you the big picture (with the aid of a book or two and some hard work).
- rmc 15y agoYes they apply. Yes, when you send you CV into companies you are competing with these people. There are people with degrees in Computer Science who can't pass FizzBuzz. They think they aren't very good at programming, but think that the company will train them. There are all kinds of reasons why people who can't FizzBuzz apply for programming jobs.
- albedoa 15y agoThis post by Jeff Atwood might be of interest to you if you haven't read it: http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html http://www.codinghorror.com/blog/2007/02/why-cant-programmer...
- tomwalsham 15y agoThe fascinating thing about that post is the number of sneering comments, with their own (broken) implementations of FizzBuzz. At a glance only maybe 20-30% of solutions in the comments there actually work, and many are horribly suboptimal.
- ColinWright 15y agoWe now insist on resumes being accompanied by the answers to set "homework." No answers, no interview. We get about half our interviewees unable to solve problems that are similar or easier during interview. Whether that's nerves/stress or simply an indication that they got someone else to do the homework for them we don't know. One candidate even phoned a friend during the coding part of the interview to get some answers. For some jobs he'd be hired, but not for most.
- buro9 15y agoI think that the lower the percentage, the more you need to improve your screening prior to getting the candidate in. It's just wasting your time and theirs. I would love to say that you can tell from a CV whether or not they could pass FizzBuzz, but it's not true. I've interviewed MScs and PhDs that could not do FizzBuzz. Seriously. The phone screener is your friend.
- wpeterson 15y agoThe percentage of people who can complete a basic coding challenge during interview is more a testament to your phone screening than to the population of candidates. If you're not weeding out these people with a 10-15 minute phone call you'll waste a lot of your and their time.
- patio11 15y agoFor folks who doubt the numbers people are quoting here: remember, if half the pool can't program to save their lives, guess which half of the pool will still be sending out job applications next week. At a previous company where, for cultural reasons, lack of programming skill was not a barrier to being hired as a software engineer, approximately half of our software engineers could FizzBuzz. Of our outsourced coders, I'd put the number at one of the twenty I knew, and he would need extensive coaching to make it happen. Some of these folks were at least moderately productive at tasks which you and I do every day which theoretically happen in an IDE but do not require much abstract thinking, such as changing labels on UI elements, adding new columns to tables (by copy/pasting a line which worked and tweaking it until output matched expectations), and the like.
- davewasthere 15y agoOf people who get to the interview stage, I'd say around %75 at least successfully do the FizzBuzz question on our test. But we've cherry picked the CVs a little. And probably only interviewed 50 people over the past couple of years. (And hired 5)
- sungura 15y agoI program a fair bit, have a few Android Apps in the market the problem I see with these type of tests is that I have a very hard time remembering syntax and would therefore have a hard time without an IDE.
- ajuc 15y agoI have question to recruiters: if job requires "Hibernate" and I've used hibernate in my previous job, but have never configured it from scratch, only tweaked some models, wrote some EJBQL queries - does this count as "knowing Hibernate"? I've also never used Hibernate annotations, becasue we use hbm files, and we have templates to make the, so I'd have problems writing such file from scratch. Do you check knowledge of required libraries on the blackboard? Do you assume people should know all the corners of such libraries, or do knowing some things and wanting to learn more if it will be needed suffices? I use at work jboss, hibernate, jbpm, and many other technologies that are often mentioned in job offers, but I don't feel I can say I know them - only the parts that I needed to do the job. Is this considered not enough?
- ig1 15y agoGenerally speaking you don't need to match a job description 100%, if you match 60-70% that's fine. Depending on the job description you can tell which things are key to the job (programming language, and specialist skills like machine learnings which are core to the job) but everything else is mostly optional. The more of the description you can match the better it is, but 60-70% will get you an interview in most places.
- petercooper 15y agoOf those, about 50% can do FizzBuzz style questions. On paper, all of these ~10 people would be qualified to do the work If it's for a programming position, the "paper" is lying in this case. If someone is claiming to have experience or qualification in certain areas that they can't even perform basic operations in, they're fraudsters. It'd like trying to hire a surgeon and have someone turn up who doesn't even know what lymph nodes are. Dangerous and unhireable, but sadly a lot of employers put up with this sort of nonsense.
- wavded 15y agoI failed FizzBuzz, I admit it. I was asked that as an interview question. I studied hard for my interview but I forgot about the mod operator and totally fumbled my way through the interview. I am now the Senior Web Developer and turned out to be a great asset to the company. But you wouldn't have known that from my FizzBuzz results. I also didn't have 'Computer Science' as a Major. Couple strikes. However they took a chance on me. Since then I've been able to interview others and I look for different things than FizzBuzz compliance. I want to see how they solve problems in general. I want to see if they have any passion for what they do. I want to see things they've developed.
- joeycfan 15y agoI got a lot of flack on reddit for posting this (1..100).each{|i| outt = i.to_s outt = "Fizz" if i % 3 == 0 outt = "Buzz" if i % 5 == 0 outt = "FizzBuzz" if i % 5 == 0 and i % 3 == 0 puts outt } The 'if i % 5 == 0 and i % 3 == 0' was especially criticised but I argued that it was transparently simple and easy to maintain. Also - there's no need for clever opimizations in code this simple - and it's still order n code.