News for hackers. Stuff that matters.
Re:The Coding Interview by synnik on Wednesday October 05, 2011 @08:43AM (#3075335)
Maybe it is because I have been stuck working with .NET environments so much, but they seem to be focusing on stuff that is too complicated.

The basic FizzBuzz test is about the right level of complexity. It weeds out those people who cannot even do as simple loop while still giving real coders enough rope to work with to show their stuff.

To be honest, the more advanced concepts in programming can be mentored and corrected if the basics are in place. In my experience, once they pass a basic coding test, you are interviewing for culture, to determine if they are a junior or senior coder, and whether or not they know they are a junior coder and will therefore be open to improving.

Re:The Coding Interview by LiveTheDream on Wednesday October 05, 2011 @10:24AM (#3075716)
Not all companies have the luxury of time to train a new hire about higher levels of complexity, especially if they should have learned that stuff in school or at a previous job.

FizzBuzz weeds out the entirely incompetent. It is then your job as the interviewer to do your best to select the best of the remainder.

Re:The Coding Interview by achompas on Wednesday October 05, 2011 @11:03AM (#3075926)
This is an interesting idea: why not use FizzBuzz to show off your understanding of different paradigms?

Someone who barely scrapes out an imperative-style FizzBuzz might not be ideal. On the other hand, someone who can write FizzBuzz in functional and OOP would be better.

Even better would be someone who writes FizzBuzz with a poor order of growth, then explains why the order of growth sucks. That would demonstrate an understanding of algorithmic complexity.

I wonder if anyone looks for this when hiring.

Re:The Coding Interview by georgieporgie on Wednesday October 05, 2011 @11:18AM (#3075996)
someone who can write FizzBuzz in functional and OOP would be better.

How would you write an OOP implementation of FizzBuzz? I genuinely don't see how this would be done, short of something really contrived like fizz.Print(), buzz.print().

Re:The Coding Interview by achompas on Wednesday October 05, 2011 @12:11PM (#3076238)
It would definitely be contrived. Let's see how contrived! ;)

    class FizzBuzzer():
        def __init__(self, num):
            self.mod3 = num % 3 == 0
            self.mod5 = num % 5 == 0

        def check(self):
            s = ""
            if self.mod3:
                s += "Fizz"
            if self.mod5:
                s += "Buzz"
            print s

    def main():
        buzzer = FizzBuzzer(n)
        buzzer.check()
Yeah, that's really contrived. Still, you display a familiarity with encapsulation, objects & their attributes/methods, etc.
Re:The Coding Interview by Harkins on Thursday October 06, 2011 @12:06AM (#3078975)
Sorry to nitpick, but it fails to give "FizzBuzz" for 15 and other multiples of 3 and 5.
Re:The Coding Interview by brown9-2 on Wednesday October 05, 2011 @10:49AM (#3075857)
I'm curious - how can one show off with FizzBuzz? I think as an interviewer, an overly complicated answer would risk looking like an incompetent answer.