I haven’t been subjected to tests of my skill yet, and inasmuch as I think it would be “oh so much fun” I have to say that I find it a little bit ludicrous to put people down. A lot of people say they are programmers when really they are not and couldn’t tell you what was wrong with a page of code if it was written entirely in English and not in code at all. But lots of people do that…and not just in coding and programming. I run into people every day who tell me that they are Media Buyers and I after two questions about their job I know that they don’t even know the title means. But at least they’re trying…and I think that’s a little more important. This sounds more like an argument I would have with a standardista that thinks people shouldn’t be allowed to post sites on the web unless they have received training for it. What’s the point of asking the question if you already know the answer?
When I applied for a Software Engineering job, I was actually given the FizzBuzz problem from this blog as a “test.” After getting the job, I was told that credentials don’t always mean a person is qualified, and that they used FizzBuzz to weed out the poor applicants.
Very interesting blog, and I think you’ve pointed out one of the problems that’s going to appear in any profession, whether it be guitar players or programmers. There will always be those people out there who don’t feel the need to read anything or learn anything new. They already think they know it all and that they can’t learn anything from the programming community. As you said, it’s these people who need the FizzBuzz test, but it’s also these people who are never going to understand WHY they need it. It’s a rather sad thought, but it’s true. Of course, I don’t think all programmers who don’t read blogs are like this – some, I think, just have no desire to interact with the community (some are loners by nature), and some probably just don’t have time. I know there are weeks where I go without reading all the blogs I normally like to just because there are only so many hours in the day….
This is really Stupid!
There are some freaks out there who just want to see the code they pick up from this blog. I recently went for interview and the only thing he ask me is problem(fizz buzz), from 1…100
first i was thingking it may be a really big problem or there should be some catch but then i just wrote it
I wrote the code in Java and then he told me there is bug because you I didn’t put less than equal(both), i just used 100 , what a asshole ?
He said that he got disappointed ! that made me nervous
then he gave me the problem of reversing the numbers in a Char Array and by then i was king of nervous and used the method to copy to another array and reverse the order. He told me that take to much memory not a good solution then bye…bye
I am ready to bit that he is not smarter than me in any way and i face him in a normal way not the interview i will kick his ass in technology and programing
I am not against test or testing with basic problems but at least try to understand the logic people use to solve the Problem instead of pin pointing that u didn’t write both less than or equal sign.
I came home and within couple of minutes i wrote the test case run the both problems successfully.
In my opinion the person who is interviewing should have a understanding of his fields and positive attitude to hire the people and not just this FIZZ BUZZ problem alone.
One thing more he was just taking of reading blogs , C’mon
there are freaks who spend all their time on blogs, who the hill in this world has that much time to read all this bull and write all the time.
get a life people…go out do something …i mean it!
People has work, kids, wife and parents to take care
Its gr8 to learn the new tech but not from BLOGS.
And yet many of the comments yesterday fell along the lines of “anyone can do that” (no, they can’t…and that is the point), “a puzzle like this does not prove anything” (a puzzle??? FizzBuzz is a quick and effective competency test to weed out the losers early on). Cwazy sheep.
A new entry for the Diagnostic and Statistical Manual of Mental Disorders: FBOCD (FizzBuzz Obsessive-Compulsive Disorder)!
Sorry Jeff, my opinion of the average intelligence of the readers of you blog has dived. But just a little bit #61514;
Pete:
In theory I have to agree, though it depends on how far you push readable+clear. Smart, gets the job done, follows instructions - that would be my first set of requirements.
It really is embarassing that there’s anyone out there who proffers themself as a professional developer that can’t figure out how a modulus works.
It’s not a bad idea to have applicants prove that they’re not helpless without The Internets to copy and paste from, but what about the flipside of the coin? Why not put FizzBuzz in front of them and walk you through it, having them explain what it does? At the end of the day, I want to work with people who not only can write good code that works, I want them to be able to read so-so code that’s mostly working and know that since they can read code, their first instinct to fix what’s wrong won’t be to deploy tactical nukes from geosynchronous orbit and start from scratch.
@Bill: I think the only wrong answers would be either dead silence or sequential print statements with no loop or branches. It is hard to believe, yes, but plenty of people would just stare blankly at you or mutter strange excuses (“If I had my IDE” or “If I could research it on the net”). Freaky, but true. It’s a great first question.
I was surprised at the number of solutions to the FizzBuzz problem as well, Fizz Buzz is a total waste of effort in my opinion. Also many of the solutions are very obfuscated.
But to Jeff’s point, why the need for FizzBuzz:
It comes down to validation. If I am looking for a C# programmer, I am looking for some level of skill with that langauge. People fluff resumes, exaggerate, etc. So, we give the fizzbuzz question(s) to make sure they can do it.
Professional licensing would help here, but how are you going to license someone when the technology and toolset changes so rapidly?
Maybe a basic programming license in addition to certification in different langauges.
I am not talking about Microsoft here or any large company that hands out certificates, I think FizzBuzz shows the need for a governing body of programming/computer science that is nonprofit and independent.
If someone shows me a programming license, then there is no need for fizzbuzz at all, otherwise, they have to demostrate something about thier skills because all programmers need to produce code at some point.
I think it is important to reiterate the point that programming is not about syntax and quite often not about math; it’s about solving problems. There are varying degrees of ability in solving problems, but I think that creativity, an immense drive to learn and an innate desire to improve something are core traits of a good programmer.
CS programs are designed to give you a broad overview of the Computer Science field. I personally think that this is valuable to persons who may not live and breath the IT industry and are not sure what areas that they are going to be interested in. Every field has it’s specialists, I think that the “General Practitioner” in Computer Science is far less common than a specialist and should be the goal of anyone that is aspiring to be a great programmer. If your only tool is a hammer, then every problem becomes a nail.
At the same time, we as humans only have so much that we can focus on at once. In the book “Domain Driven Design” by Eric Evans, Mr. Evans talks about the need for a Ubiquitous Language to be used on Software projects so that there is no need for translation between programmers and domain experts. This reduces the amount of effort required to comprehend the overall system. A Senior Developer should be able to see the project in terms of the overall picture. Otherwise they can put their considerable talents to waste on sins such as premature optimization.
Finally, criticizing a programmer because they do not know the exact parameters or return value of a method is counter productive. Especially in the light of tools such as Google that can help to find hundreds of examples or docs on how to use that function. Einstein was asked for his phone number once and he looked it up in a phone book. The person who had asked was surprised that Einstein didn’t know his own number and made a remark to Einstein about it. Einstein’s response was “Why should I memorize something I can so easily get from a book?” Einstein followed by saying that he never memorized anything which could be looked up in less than two minutes.
YouTube made an impact because of the concept, not because some coder found the most elegant way possible of paginating the videos.
Going back to the original issue, here are my 2c.
This “FizzBuzz” is a good problem for an interview question, because you could complicate the problem after the interviewee solves it.
So first solution would probably have:
a statement where they REDO the divide by 3 and divide by 5.
Console.Write and Console.WriteLine (in the C# world, or printf or System.out…) in three places.
First performance optimization would be to remove the additional divides by a flag.
Now the interviewer could complicate the problem to writing to a different IO stream - say a slower one -say a file across the network. So we are writing 100 lines right now. Would it not be better to write the entire output into a StringBuilder(in C#,Java) and then push it out the output channel? probably yes.
Now of course if we were doing the same exercise on 1000 lines instead of 100, maybe we should flush the buffer every now and then, say after every hundred lines.
You are absolutely right, I deal with lot of people and I sometimes I feel how can a programmer call himself a programmer when he doesnt even know Queue, Stack etc, I tell someone that I think you have to use queue or stack here to solve this issue, then they go blank… if in .NET, what class should I use, fine there are classes for Stack and Queues, but the problem is, they dont know the difference between pop/push and enqueue/dequeue and how it affects the logic.