I don't think you can just willy-nilly copy code from StackOverflow and sign it with your name. It's license forbids it. You also can't just sign your friend's code with your name unless she explicitly gives you permission. In both cases you are not the author of that code.
I get that people do it anyway but I guess it's kind of a grey-area because it's hard to tell after the fact that some snippet has been copied from SO.
I get that people do it anyway but I guess it's kind of a grey-area because it's hard to tell after the fact that some snippet has been copied from SO.