Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

As I was reading the question about copy-pasting and particularly, answers of Nikita Rybak and Adam Robinson, something clicked and I wondered if the issues of cc-wiki and plagiarism apply to source code also.

After all, protected content is protected content. When "derivative works" based on posts of StackOverflow end up in source code should they appear there with attribution or not?

share|improve this question
up vote 7 down vote accepted

You are legally obligated to attribute adhering to the full attribution requirements of Stack Exchange under the CC-BY-SA license as it makes no special exception for code.

However, the Stack Exchange community prefers that instead of copying the code into your application, you learn from it and write your own code. If you do so, usually a nice credit is appreciated but not required.

What is the difference between a derivative work and code that you wrote having learned something? If you copy-pasted and changed a few variable names, that's a derivative work. If you looked at the code, understood what steps the person used, and then rewrote in a way that's best for your application, then it's code you learned from.

share|improve this answer
+1. I would imagine, though, that the vast majority of people who end up getting answers like this end up copying it verbatim. – Adam Robinson Feb 13 '11 at 18:14

Often times my comments on a method will include a link to the answer that gave the solution.

* Transfers a file from the client to the server.  Code general idea was from:
* By Jon Skeet

I'm not sure if you are legally obligated to do this, but I think it's a nice thing to do.

share|improve this answer
Nobody ever complained about getting attribution... (at least not that I know of...) – uɐɯsO uɐɥʇɐN Feb 13 '11 at 20:24
@GeorgeEdison: It may be hard to complain if a source is not available public. Which I guess cc-wiki does not require – Tobias Kienzler Apr 8 '11 at 8:07

You must log in to answer this question.