I want to understand when do I need to give attribution to code snippets from Stack Overflow.
Do I need to give attribution when I use code snippets in a blog post (by a blog post I mean a tutorial)
So what is the case if I use it in my software?
Does the attribution apply to case 1 or case 2 or the two? If so, how can I give attribution in the two cases?
PS: I have looked into other questions of this type on Meta Stack Exchange, but I haven't found a clear answer.