23
\$\begingroup\$

If I submit code for review, and then improve that code based on the answers submitted, is there a preferred way of thanking the Code Review site and/or reviewer in the source code? I'm thinking specifically of open source code freely available to the public.

I'm not asking about obligations. I'm just interested to know what is considered most useful to Code Review.

  1. Make no reference to help received from Code Review.
  2. Mention that a section of the source code was helped by codereview.stackexchange.com
  3. Include a link to the specific question asked on Code Review.
  4. Include a link to the specific answer(s) used for improving the code.
  5. Something else I haven't thought of...

I'd also like to know whether any such thanks would be best placed as comments in the specific section of code, or as a mention in the README file, or both.

My own inclination would be to include a link to the question rather than an answer, and to include this in both the README file and as a comment, but I'm interested to know whether there are any specific preferences and reasons.

\$\endgroup\$
4
  • 12
    \$\begingroup\$ The best "thank you" remains an upvote and a checkmark ("accept"); if you link to CR in your source code, ...all the better! But you don't have to. \$\endgroup\$ Commented Mar 8, 2014 at 18:21
  • 1
    \$\begingroup\$ You might get a better answer if you post on meta.stackoverflow.com with the 'publicity' tag. My uninformed guess is that a link in HTML would be more helpful than a link in the source code, because of SEO. \$\endgroup\$
    – ChrisW
    Commented Mar 9, 2014 at 12:30
  • \$\begingroup\$ @ChrisW thanks for the suggestion. I checked and there are already plenty of similar questions on meta Stack Overflow, where it's more likely someone might just copy and paste code from answers. I asked here in meta Code Review because I find Code Review suggestions helpful and want to highlight the user and the site even though there isn't necessarily any code in the answer (just pointers to what needs improvement). \$\endgroup\$ Commented Mar 12, 2014 at 12:10
  • \$\begingroup\$ @Mat's Mug yes this is certainly no substitute for voting and accepting. Your attitude reflects the way I would like my own work to be used - attribute it to me if you wish but with no obligation. It seems people can safely take that approach in Code Review if benefitting from advice, but if using or deriving from source code provided in an answer then the site licence requires attribution. What I'm looking for here is the best way of highlighting a contribution in those cases where attribution is not a requirement. \$\endgroup\$ Commented Mar 12, 2014 at 12:24

1 Answer 1

13
\$\begingroup\$

Treat Code Review users the same way you would treat any other contributor to your open-source project. For me, I would expect a mention in the checkin comment (you use version control, right?). If you have a bug database or a detailed changelog file, a mention there might also be appropriate. Attribution might look like:

Personally, I think that README files and code comments are not appropriate places for such attribution. README files should be reserved for important information that you expect all users to read. Code comments should be similarly unobtrusive, in most cases.

That said, I write most of my reviews expecting nothing in return other than upvotes if the answer was good, and the warm fuzzy feeling from having helped a fellow programmer.

\$\endgroup\$
2
  • 3
    \$\begingroup\$ The Username of a user might change, you should link to their profile perhaps? I think the link I had forever ago still points to my same Profile even though I changed my Nick(username) \$\endgroup\$
    – Malachi
    Commented Mar 10, 2014 at 13:55
  • \$\begingroup\$ I like the idea of including credit in the comment of the commit/check in. This hadn't even occurred to me but it definitely seems the most unintrusive solution. I'll bear this unexpected solution in mind next time I'm in two minds about whether to ask a question. I gained more than I expected... \$\endgroup\$ Commented Mar 12, 2014 at 8:51

You must log in to answer this question.

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