Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why can't SO just say, "If you post code here it's public domain" (or some other license that says no action required, no attribution required, copy at will)

I've posted quite a bit of code on SO. I don't want attribution. That is not my goal. That's is an anti-goal for me. I don't want to make it harder to use code in my code. I want to make it easier. I don't even want a link back to SO.

Sure if I write some 1000+ line library on github I might want attribution but I have no such desire on SO.

Am I a rare case? Do most SO contributors want attribution?



> Do most SO contributors want attribution?

The highest voted answer on the original proposal[1] authoritatively asserts that absolutely everyone wants attribution. It uses the example of O'Reilly ripping off answers for a book without providing attribution. Like you I get my fix from simply helping people out and I would be overjoyed if someone ripped off an answer of mine and put it in a book (sans attribution). However, like that highest voted answer, don't make the mistake of thinking that everyone is the same.

The obvious solution is to allow people to choose the license for their answers. That is still a bad solution because it violates this principle:

> I don't want to make it harder to use code in my code.

For that reason I don't mind having people providing an attribution code comment when they use my answers because a blanket rule-set is easier to follow than dozens of different rule-sets; especially for something as completely inconsequential as a code snippet.

[1]: http://meta.stackexchange.com/a/271113/168017


Meta is a special subset of SO users.


> Am I a rare case? Do most SO contributors want attribution?

The ones that do are quite vocal. I suspect that those who don't care don't spend much time advocating. Personally, all the attribution I need is on StackOverflow itself.

More importantly, I don't want to spend a bunch of time wondering if some one-liner I use requires a note in my about dialog. Technically, I suppose I might already need to do this, but I kinda feel that if you're going to try to fix this, you should fix it right.


Can you post a link to these people vocal about wanting contribution and what type of content they are submitting?

Stackoverflow is basically documentation. You don't attribute the documentation every time you use an api.


Apparently this gets weird pretty fast as you try to navigate various legal systems; CC0 is taking a stab at simplifying this, but even that would be potentially problematic on SO.

Tim just posted an answer that touches on this: http://meta.stackexchange.com/questions/273015/cc0-public-do...


I was not aware of CC0, but that's definitely what I'd want my code on stack overflow to be.


You're not alone. I've got a fair wodge of code on SO and don't really give a crap what people do with it. If I cared tremendously then I wouldn't put it on the internet.

I guess the only exceptions might be:

- if the wodge of code is fairly substantial (how you'd measure that I don't know, but in the words of Potter Stewart - "I'll know it when I see it"); and

- you write a blog post and it's based substantially on my answer and code then a link back to my post would be common courtesy

- you write a book and include my code then attribution might be nice

- you include it in your open source project

I guess it's more as a common courtesy than me being litigious and it's not the end of the world if this doesn't happen.

Personally, for any code I use in my/our own systems based on SO or "found on the internet", I usually add a comment pointing to the source. I do this for two reasons, firstly to provide context or remind myself where it came from, secondly to credit the author.

That said I do understand why SE/SO are trying to come up with a foolproof way of dealing with the legal status of code included in posts [0][1].

[0]: http://meta.stackexchange.com/questions/25956/what-is-up-wit...

[1]: http://meta.stackexchange.com/questions/12527/do-i-have-to-w...


>"If you post code here it's public domain"

It would need to be "some other license". There are countries where you can't just hand stuff over as public domain. In these countries the author would retain all right.


I've heard this a lot, but is it true? djb's page at https://cr.yp.to/publicdomain.html makes an argument that copyright can be waived anywhere in the world.


[Everything below is about Germany]

djb is wrong. Although it probably doesn't matter much, practically speaking.

There is exactly one way how a work can become "gemeinfrei" (public domain): expiring copyright.

So no, you can't place something into the public domain. (There is a minority opinion, as always, among legal scholars, but the big majority says "no way").

You might be able to argue that your wish to place something into the public domain can be re-interpreted as relinquishing the "Verwertungsrechte" (rights of exploitation).

That's what djb seems to argue, and it is a sensible stance. i suppose many courts would agree.

But it's not as clear-cut as djb claims. And who needs ambiguities there?


To add on top of that: In germany it's even impossible to sell the full copyright (Urheberrechte). You can waive some (the right to be named as the author) and you can sell the rights to use the work (Verwertungsrechte) but some others can not be transferred.


What other copyright rights are there?


For example the right, that the work may not be used to defame the author and may not be used in such contexts. The term copyright translates very badly to German law. (Sorry, on a mobile connection, so just one short example)


Interesting. Thank you for clearing this up!


I'm also surprised attribution is required. If there was a "no by" opt-in, I'd opt in.


I don't see a problem here, I already put SO links in my code whenever I use something from SO; example:

    /// <summary>
    /// Special JsonConvert resolver that allows you to ignore properties.  See http://stackoverflow.com/a/13588192/1037948
    /// </summary>
or:

    //SOURCE: http://stackoverflow.com/questions/9/how-do-i-calculate-someones-age-in-c


Do you do the same anytime you ask a co-worker a question:

Jim: "Hey Marge, do you know how to escape a flarb?"

Marge: "Yea, call FlarbLib.EscapeFlarb"

Jim: "Ok"

     // <summary>
     // From Marge
     // </summary>
     string escapedFlarb = FlarbLib.EscapeFlarb(unescapedFlarb);
I guess I see stack overflow as just an extension of asking a co-worker. It's just the internet lets us all be co-workers remotely.

Sure if it's some details answer that says why you're doing something a certain way (like must use 2.0 SDK because 3.0 is broken on Linux. See http://so/1234

But otherwise it seems crazy to me to have it litter the code with attributions for tiny snippets of answers.


I guess I don't use SO as extensively as some; in the entire solution (21 projects) is have 2 references to stack overflow. And ofcource, if you use to look something up, no need to add it (unless you might need it later for further information), but if you use (parts of) code posted to SO, don't you want to know how it got in your code? I can tell by the way something is written who wrote it in our company; if 'strange' code is found in the solution, it's good to know why.


The thing is that "how do you escape a flarb" would be closed on SO for being trivial, showing lack of research etc. If, on the other hand, half your commit is something highly nontrivial you got from Marge, you might well note that in a comment, or perhaps in the commit message.


> the thing is that "how do you escape a flarb" would be closed on SO for being trivial

I don't think this is true. I know I look up stuff all the time that's one to 5 lines of code. I could go dig up examples. How about "how do you remove the margin from an LI element" Or how do you un-escape a URL. How do you iterate over a XXX in language YYY. All of those are on SO, all are popular, all are 1-3 lines.

Even a 10 line answer though. "How do you make an XHR request" is at most 10 lines and doesn't seem like it deserves attribution.

Do you attribute every pattern you've read in some book? Every code snippet from MDN or MSDN or a manual? How about blog posts on digital ocean or meteor.com (I mention those because I've been reading those recently)

I can't put my finger on why but attribution for a few lines of code on SO seems anti-productive, anti-cooperation, anti-sharing


Ruminate on the difference between "citing a source" and "giving credit to the author of the source". Marge is not a static document that can be reread later.


Yeah I feel exactly the same, what is the proportion of code on Stack Overflow which is over 25 lines ? 5%, 10% ? StackOverflow is not hosting software, they are hosting code solutions and it's not really the same thing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: