I was wondering what kind of restrictions there are, if any, for code posted on StackOverflow?

In other words, I'm hoping StackOverflow has a clause that makes any posted code completely free of restrictions for reuse? (Both questions and answers).


Right down at the bottom of every page is "user contributions licensed under cc-wiki with attribution required".

"User contributions" links to questions-all, but I don't think "user contributions" is solely limited to questions. All code posted here is thus licensed under cc-wiki with attribution required.

Edit: If you click on any of the related links down the right side that seem relevant, you'll find that the copyright owner becomes Stack Overflow (or, I guess to be correct, Stack Exchange Inc.), and that's who you'd have to attribute. See also this question.

Edit 2: There's also this answer from Jeff Atwood, which may or may not clear things up for you.

  • 1
    What level of attribution? Is a hyperlink enough? – Casebash Jul 6 '11 at 2:38

No matter what the legal implications are, you should never use code samples found online.

You should always read the code, understand what it is doing, then close the browser tab and use that understanding to code.

  • 6
    +1 for the idealism ;-) – Matt Handy May 9 '11 at 17:19
  • @MattHandy: Please, I don't give a... – Won't May 9 '11 at 17:25
  • Sorry about my English. What is the meaning of understand ? – Dr. belisarius May 10 '11 at 3:05
  • @Wether: to know how and why it works, and to be able to reproduce the same effects without referencing the original code. – Won't May 10 '11 at 13:10
  • @Will Ohhh... And you want that from a programmer :) – Dr. belisarius May 10 '11 at 13:14
  • @Wether: Sarcasm. I get... I mean, I understand now. – Won't May 10 '11 at 13:36

You must log in to answer this question.

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