# Should I give credits to reviewers when I post revised code?

I was just wondering about the following:

I'm pretty new to programming and I use lots of help from people on Code Review. So it happened that I came up with a basic script and while it was reviewed I came up with new ideas rising new problems. Before giving the whole code to a revised review, I then isolated parts of the script and asked new questions.

To make a long story short:

In the end I might end up with quite sophisticated solutions for certain problems that actually came from reviewers.

So when I put my whole code together after a while and repost a new revised version, should I actually give credits to the reviewers who contributed to the new version? For example, as a #comment in the code? Or is it a better idea to just add [links]() to the parent posts and keep the code clean from any revision information?

Sure, giving credit is always a good idea, to satisfy legal obligations, for academic honesty, and just out of courtesy. The exact form in which you choose to give credit is up to you, to be decided on a case-by-case basis.

Thanks for mentioning "quite sophisticated solutions". I would like to mention that when posting revised code based on someone else's answer, please make sure that there is some element of originality that is worth our time to look at. There wouldn't be much point to posting a self-answer or follow-up question that is basically someone else's work — whether or not there is a citation.

• thanks for your answer, i was thinking of posting revisions in a context, when former questions have been answered on parts of the code and the new Question would rather aim into a direction like: "Is the code put together in way that it matches general standards?" I have been reading on here recommendations that I personally found quite useful of including or supplying a link to a github repository with revised code where there wasn't a need for a revision and posting it in this case would rather aim for a sharing-code aspect. – nath Aug 4 '17 at 20:18

Should I actually give credits to the reviewers who contributed to the new version?

Yes. If we look at the bottom of this Stack Exchange page, we have the footer:

site design / logo © [year] Stack Exchange Inc; user contributions licensed under cc by-sa 3.0 with attribution required

Under the Creative Commons link, "CC BY-SA 3.0", we have the following description for attributing:

Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

The original text has some popups, that further explain the emphasized text above. More specifically 'indicate if changes were made' links to a "best practices for attribution" page. Which further describes attributing. They have an example under the header "this is an ideal attribution", that shows what a good attribution is, and why:

Because:

Title? "Creative Commons 10th Birthday Celebration San Francisco"
Author? "tvol" - linked to his profile page
Source? "Creative Commons 10th Birthday Celebration San Francisco" - linked to original Flickr page

This is good, but doesn't explain two things.

1. What to do in the case that an answer doesn't have a title.

In these cases "best practices for attribution" says not to worry about including a non-existent title:

If a title was provided for the material, include it. Sometimes a title is not provided; in that case, don't worry about it.

2. You've derived from the answers work. How do you correctly explain this?

"Best practices for attribution" further explains this, and extends on the above attribution example:

This work, "90fied", is a derivative of "Creative Commons 10th Birthday Celebration San Francisco" by tvol, used under CC BY. "90fied" is licensed under CC BY by [Your name here].

Because:

Original Title, Author, Source, and License are all noted
Derivative? "This work, "90fied", is a derivative of..."
New author of the derivative work is also noted

IANAL, but I think it's safe to attribute with:

This code is derived from the answers to my previous post, attributing person A and person B. This derivative, and all previous ones, have been licensed under CC BY-SA 3.0.

I'm unsure if you can remove the licence part, as that should be implied by all the code being posted on Code Review.