2

Let's say I have this code. It has an issue, so I'm going to ask about it on Stackoverflow.

>>> print "Hello
SyntaxError: EOL while scanning string literal.

Them user comes along with the code for the solution to the issue.

>>> print "Hello"

Then let's say this code is part of a "big" project I've been working on. This project will eventually be published. Is it okay to use the improved/fixed code from the user who answered your question?

3
  • Shouldn't this rather be on Meta Stack Overflow?
    – ale
    Commented Jul 7, 2014 at 21:15
  • @AlE I think this applies to most sites that are related to programming, not just Stackoverflow. For example, Codereveiw. Commented Jul 7, 2014 at 21:17
  • 2
    You should check out the legal link at the bottom of the site. Section 3 in particular deals with using other people's contributions to the site. Commented Jul 7, 2014 at 21:43

1 Answer 1

2

Yes it is fine to use. The CC by SA licence explicitly allows commercial usage of code that has been posted.

enter image description here

In fact common sense should prevail - if a user doesn't want their code used commercially by others then they shouldn't be posting it.

1
  • 1
    "Common sense should prevail" in matters of copyright law? That's optimistic :) Commented Jul 7, 2014 at 23:05

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