Slashdot Mirror


Use Code From Stack Overflow? You Must Provide Attribution (stackexchange.com)

An anonymous reader writes: Have you ever used Stack Overflow to answer a question about some code you're working on? Most people who write code on a regular basis have done so, and this sometimes involves copying code snippets. Well, starting on March 1, copying code from Stack Overflow will require you to attribute that code. Code published by contributors to SO will be covered by the MIT license. Users copying that code don't have to include the full license in their code, as it usually requires, but they do have to provide a URL as a comment in their code, or some similar level of attribution. This change applies to other sites in the Stack Exchange network, as well.

The SO community is widely criticizing the change, citing problems with the decision-making process that led to it and complications that may arise from mandating attribution. Why did SO make the change in the first place? They say "it's always been a little ambiguous how CC-BY-SA covers code. This has led to uncertainty among conscientious developers as they've struggled to understand what (if anything) the license requires of them when grabbing a few lines of code from a post on Stack Exchange. Uncertainty is a drag on productivity, for you and for us, and we feel obligated to make code use more clear."

6 of 303 comments (clear)

  1. SO's own answer says "CC"...or not... by xxxJonBoyxxx · · Score: 4, Informative

    Here's an actual debate on this topic on SO:
    http://meta.stackexchange.com/...

    Accepted answer: Anything that you post to Stack Overflow will be under the terms of the Creative Commons license

    Top comments seems to be about using "Unlicense" (instead of "Public Domain") and to just avoid cut-paste (good luck with that if you're dealing with an offshore team). I pretty much use #2, renaming everything and usually swapping some of the decision logic to create something that looks original enough to pass a smell test when I cut/paste. It's work, but it's still significantly less work than writing it from scratch.

    1. Re:SO's own answer says "CC"...or not... by pjt33 · · Score: 3, Informative

      What the Slashdot summary doesn't say (and a lot of commenters on meta.stackexchange.com also didn't really take into account) is that this licensing change affects not only StackOverflow but the whole StackExchange network, including sites like Code Review and Programming Puzzles and Code Golf where people do post substantial blocks of code over which they wish to assert their moral rights.

  2. Re:What's the big fuss? by Anonymous Coward · · Score: 1, Informative

    You've never worked with a licensing group before. We have to run Blackduck Protex scan to find licensed code, which is good if you added JQuery or some big chunk of code from online. But if one or two lines of code that was found on SO to fix a problem has attribution then the lawyers will spend forever dealing with it before anything can be shipped.

  3. Re:Seems to me... by Anonymous Coward · · Score: 5, Informative

    From the MIT license (similar wordings can be found in other licenses)

    the software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. in no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

    I'm pretty sure no damn lawyer can get around this. No sane lawyer anyway.

  4. Attribution is needed in source only, not license by Lothsahn · · Score: 3, Informative

    This doesn't sound onerous to me at all. It doesn't require anything in public documentation, help pages, or otherwise like the MIT license. It simply requires a single URL in a code comment.

    This sounds perfectly fine to me--in general, I and my team already does this because it's helpful to know WHY we chose a course of action, especially when it was complicated enough to require SO's help.

    http://meta.stackexchange.com/...

    What is reasonable attribution?

    A URL as a comment in your code is reasonable attribution.

    There are certainly other forms of reasonable attribution, depending on use, and you are welcome to go above and beyond what’s required and include username, date, and anything else if you like.

    You are also welcome to use the MIT License as it is traditionally interpreted: by preserving the full license with relevant fields (copyright year and copyright holder) completed.

    --
    -=Lothsahn=-
  5. SO has required attribution for 8 years by shog9 · · Score: 5, Informative

    Before you freak out, you should read the license that's been in place on Stack Overflow since it was founded.
    Guess what: it requires attribution.
    It's not totally clear how that's supposed to work when applied to code, but it's crystal clear about the requirement itself. The proposed MIT change is aimed at making this more obvious, but... If you aren't already giving credit where it's due, then that's on you - the license has always demanded that.
    You might wanna read up on the "share alike" bit too...
    P.S. I work for Stack Overflow.