Creative Commons is a great license for a wiki, but it's not a good software license at all. Is it the case that all code snippets are under the same license as the rest of the text? I commonly say "feel free to reuse without attribution" when I post a snippet, but what happens when someone else edits my post and fixes some indentation? Is it technically back to being under the CreativeCommons? It would be great to clarify such things a bit, and avoid indicating that the code itself apart from the rest of the text is under CC. How can we ensure that, or is it such a minor issue that it doesn't really matter? Obviously no one is going to release software under CC just because some code in the codebase was derived from a snippet from stackoverflow, and if that would be the requirement snippets would be pretty worthless.


2 Answers 2


Not an answer, just some thoughs:

IANAL, but I'm not sure inhowfar you can legally "override" the CC license by saying something different in your post. Meaning that technically, your "feel free to reuse without attribution" may be void even though it's your own code - you are publishing stuff on Stack Overflow under the license you agree on with Stack Overflow, which is CC-Wiki. Not that this is ever likely to be fought over in court, of course.

I guess if one wanted to release their own code snippets to the public domain in a really, really watertight way, they would have to re-publish every snippet on their own blog, or a code hosting site that allows to specify the right license.

  • 2
    THAT part isn't so much a problem, because (as long as it's all my own work) I still have full rights to it. Publishing it on stackoverflow puts it under CC, but I can grant other rights to anyone. It doesn't matter HOW they got it, even if it was downloaded from stackoverflow. Commented Sep 13, 2011 at 21:55
  • 2
    @Micah yeah, I totally agree with that, hence the "publish it elsewhere to make it stick". I'm just not sure whether you can publish it under a different license on SO
    – Pekka
    Commented Sep 13, 2011 at 21:56

but what happens when someone else edits my post and fixes some indentation? Is it technically back to being under the CreativeCommons?

When you post code on SO you are doing it by default under the CC licence, with the knowledge that others have the right to come along and edit the code (whether the edit is right or wrong is moot and doesn't matter to the argument). Those who edit do it under the understanding that their edit doesn't make them the author or owner of the original code, that ownership still resides with the original poster*. If they want to retain ownership of the contents of their edit then they should make their own post, rather than editing yours.

*Keeping in mind that even the author of the post may not be the legal owner of the code! (i.e. if you post from your workplace or while executing your duties for your employer or client).

  • that's a nice point that you raise in your footnote
    – Antony
    Commented Sep 14, 2011 at 5:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .