Re:FizzBuzz: the test helps filter out the 99.5% of programm...
by falcolas on Tuesday December 23, 2014 @08:30AM
(#8788015)
I've run into this as well. Of course, it was ultimately a good negative filter; if the interviewer could not clearly explain what he wanted out of such a simple program, how would he have done at explaining the requirements for a much more complicated program?
when he said "print every number up to one hundred and if its the 3rd line print fizz and if its the fifth line print buzz"... honestly my train of thought was "why the fk would u print every line and print again if its the 3rd line and print again if its the fifth line...?? and why would you print 6-100?"... not the best explanation either, and i had no idea he meant print the string "Fizz" when he said print fizz... i thought maybe he meant some ruby gem rails.Fizz or what not...
of course the commenters code example above is clear as day, maybe i just read code better than i talk about code (this so much... for a lot of us). and i didnt get that job.