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

I understand that Stack Overflow answers are released under a Creative Commons license, and that I may use code from Stack Overflow answers (such as this one) in my work.

I want to give credit (as this question mentions that I should) to the OP, how exactly should I do this? I was thinking of adding something along these lines above the relevant code:

// Code created with the help of Stack Overflow question
// Question by Taylor:
// Answer by Andrew Dunn:

That's right, right?

share|improve this question
See also Attribution Required on the blog. – Arjan Mar 21 '12 at 18:12
Thanks. Could you write that comment as an answer so I can close this question? – Adjam Mar 21 '12 at 18:15
Well, does it really fully answer your question? Reading it myself, I could come up with many ways to interpret it... – Arjan Mar 21 '12 at 18:16
This seems to me an excellent way to give attribution on your code – Lamak Mar 21 '12 at 18:26
In lieu of other answers I will assume that my method of attribution is legit. – Adjam Mar 21 '12 at 21:24
up vote 13 down vote accepted

The Attribution Required blog post describes the attribution requirements in detail.

That said, if someone uses a small snippet of code that I post in a public forum for people to freely use, I don't particularly care that it be attributed back to me. In fact, some users feel strongly enough about this that they put a disclaimer in their profile.

I view the CC:Wiki license as more of a protection against leeches that wholesale copy material from Stack Overflow and create their own websites with it, without giving credit to Stack Overflow or the original authors of the material.

share|improve this answer
I just add links to the SO questions or answers in my comments in my code. Do I need to add a link to the author too? I figured the author is on the post if you opened the link to the post. – Rocket Hazmat Mar 21 '12 at 19:35
Links have a tendency to rot. I would imagine proper attribution includes not only a link, but "Stack Overflow" and the author's name. At least, that's what the blog post says. – Robert Harvey Mar 21 '12 at 19:39
I usually just do // From in my code. If the link to the question is gone, then a link to user wouldn't do too much. – Rocket Hazmat Mar 21 '12 at 19:40
(Hmmm, @Rocket, why linking using your own user id? ;-)) – Arjan Mar 21 '12 at 21:06
@Arjan: I'm aware of that, but I don't really care if my user id is there. What could happen? :-P – Rocket Hazmat Mar 21 '12 at 21:23

You must log in to answer this question.

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