The problem with sample code is that I have no idea if you actually wrote it. Maybe you copied it from Google, maybe your friend "helped" you. I have no idea. When I'm first interviewing you, I have no idea how honest you are. The only way I know for sure that you wrote the code is if I watch you write it in front of me.
I really like Fizzbuzz because for someone who is a good programmer, whether they've ever seen it or not, they can do it in about two minutes, and then at least I can believe that their code sample is theirs.
I really like Fizzbuzz because for someone who is a good programmer, whether they've ever seen it or not, they can do it in about two minutes, and then at least I can believe that their code sample is theirs.