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."
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."
I'm not a lawyer myself, but I can say from experience that, when a lawyer finds a comment somewhere in the codebase that says "//these next two lines of code are MIT-licensed", steam shoots out of their ears and every developer in the company has to attend an all-day meeting about it.
This is absolutely common for many large commercial companies. I have several such companies as clients and getting any FOSS approved is a major process. In fact, one client preferred to send a check to one open-source project for a license even though legally it grants them no benefit. The project's website even says that the project "is in the public domain and does not require a license." Companies with large bankrolls will glady shell out thousands of dollars for some peace of mind.
http://www.hwaci.com/cgi-bin/l...
As a rule, I never used code directly from SO to avoid any licensing questions for my clients.
Perhaps it's because I'm an academic and my use of Stack Exchange relates to my research projects, but I'm having a hard time understanding why people would object to citing the source of a snippet of code.
I take the opposite position - I wonder why people even bother with attributions for little scraps of paper, half-formed ideas, and answers to questions.
For one thing, if it's on StackExchange it's common knowledge. Do you cite Newton or Euler when you solve an integral in your paper?
Secondy, StackExchange doesn't cite *their* scraps of code. That 6 lines of code that connect to the SQL server - it's just information from the manual that the reader could have gotten for themselves. Does StackExchange cite the manual?
Thirdly, it generates fear and doubt in the minds of pointy-haired bosses, thinking that an external license reference will dilute the software value. Possibly require the company to publish the code for anyone else to copy. (Whether this is true is irrelevant - it's the perception of many people.)
Fourthly, the attribution is extra administrivia and work that adds nothing to the code. It has to be ignored and skipped over by everyone who reads or maintains the code in the future, it goes into backups and changelogs. It's litter for programs.
Fifthly, there's no possible way that value or esteem can attach to the writer. Having some sort of value or utility is the reason that rational beings do things, so why should anyone bother doing something that could not possibly reward the writer?
Perhaps it's because I've read too many papers that are a thicket of cryptic citations referencing everyone else's work, but with very little to add. For example, see Crumbum and Whoodle (1985), but Finnaster and Welsch (1992) take a counter position that might throw more light on the subject.
For a relatively complete overview of the theory and reasoning behind citations, see Finbum.
Maybe SO should require their own cadre of geniuses to attribute their submissions/answers - which themselves are scraped from W3C, wikipedia, etc. Or the questions that are "self-answered" - just so said person can answer a question...
I typically put
#taken from http://stackoverfl......
in my code anyway, just as a reminder of where it came from, but only if it's particularly complex. I don't always of course. This change is kinda retarded though. I don't want to be forced to do that every time.