8

Important: this related Meta Stack Exchange post.


Code you post on Stack Overflow is licensed "cc-by-sa 3.0 with attribution required". Now this may pose problems for people wanting to use my contributions depending on what license they have for their own software. I want to prevent such obstacles for others as much as possible, and found this advice on uber-meta which comes down to placing a dual-license notice at the bottom of answers.

Comments on this SO meta question also suggest leaving a notice along these lines...

Unless noted otherwise, all my questions and answers on Stack Overflow are also released under X.

(where X is wtfpl, public domain, or some other very permissive license)

...in your user profile is enough.

Now, to the question: what's the best way to make sure as many people as possible can use my SO contributions, with as little as possible restrictions?

Is leaving such a comment in your profile enough? And on a side note: wouldn't this pose problems if your answer uses / builds on snippets from other answers or even other open source libraries?

0

1 Answer 1

8

What's the best license?
To make sure as many people can use your contributions as possible, you should license them as public domain. Anyone can then use your work with no restrictions. However, this is not possible in some jurisdictions: look up where you live and if it's not possible, use CC0 instead.

Is that enough?
Yes. You're the copyright owner, you can do as you like with your work. In your profile is not immediately obvious, but it does confer the license (or public domain) because you've explicitly said so. If you want it to me more obvious, try adding a <sub> or <sup> note after your code snippets that says they're CC0 or public domain.

Can it cause problems?
Yes. If you're building on others' code, you still have to abide by their licenses and restrictions. If you've got a note in your profile that everything you post is under CC0, this requires that you add a <sub> or <sup> note that says this code is not under CC0 because X.

2
  • Thanks for your answer. Regarding to that last bit, assuming I've put said note in my profile, that seems to mean I have to "remember" to indicate any exception (e.g. any time I use/build upon other code), right? (Which in turn makes "the profile way" useless to me, because for sure I'm terrible at "remembering" to always use such disclaimers....)
    – Jeroen
    Jul 7, 2015 at 9:52
  • @Jeroen It does indeed mean that. You can also note it under all your code samples that you also provide the code under CC0.
    – ArtOfCode
    Jul 7, 2015 at 10:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.