News for hackers. Stuff that matters.
Re:FizzBuzz Enterprise Edition by userbinator on Sunday December 21, 2014 @07:31AM (#8779588)
How many zero-modulus solutions (and still using a loop, not just a long precomputed string) have you seen? In my experience, this is the rarest type. Of those who can write a correct FizzBuzz (which is already a pretty small fraction of the total candidates), I like to ask "how would you do this without any modulus" and very few of them can easily see the pattern that makes this possible.

Aside: it astounds me how many people, when asked to write a short snippet of code during an interview, have basic formatting problems and inconsistent code style.

If this is being done on paper or an absolutely "non-IDE" text editor then it's probably someone dependent on an IDE to do the right formatting for them. If they still do this in an auto-formatting IDE, it's probably a sign that they have no good idea of the structure/flow of the code.

Re:FizzBuzz Enterprise Edition by detaro on Sunday December 21, 2014 @11:33AM (#8780077)
What is the "optimal" answer you are looking for if you ask to solve it without modulus? Build modulus by hand, or using additional resetting counter variables?
Re:FizzBuzz Enterprise Edition by userbinator on Sunday December 21, 2014 @12:33PM (#8780255)
Two counters, one that counts by 3 and one that counts by 5.