4 ms·
> Sometimes I'll just copy the code directly from the site, without typing it out again myself! I realize you're being facetious, but do check with your employ
by connor4312 10y ago
> Sometimes I'll just copy the code directly from the site, without typing it out again myself!
I realize you're being facetious, but do check with your employer that this is OK! Code on StackOverflow is under a CC-SA license, it isn't public domain or even very permissibly licensed.
- gokhan 10y agoI was like "can't be true" but it seems you're right: http://meta.stackexchange.com/questions/12527/do-i-have-to-worry-about-copyright-issues-for-code-posted-on-stack-overflow http://meta.stackexchange.com/questions/12527/do-i-have-to-w... The license [1] says that you are free to: Share — copy and redistribute the material in any medium or format Adapt — remix, transform, and build upon the material for any purpose, even commercially. The licensor cannot revoke these freedoms as long as you follow the license terms. Attribution — You must give appropriate credit... ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. [1] https://creativecommons.org/licenses/by-sa/2.0/ https://creativecommons.org/licenses/by-sa/2.0/?
- nommm-nommm 10y agoBut usually, code on SO is kinda like the docs, they show you how to do something and is often more of a template than a complete solution (unless you asked the question). Its not like people are writing complex solutions and putting them on SO. I mean how are you going to copyright this? (taken from a SO post): for (Map.Entry<String, Object> entry : map.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); }
- mherdeg 10y agoOr, famously (in a case where people thought carefully about both copyright and patents): private static void rangeCheck(int arrayLen, int fromIndex, int toIndex) { if (fromIndex > toIndex) throw new IllegalArgumentException("fromIndex(" + fromIndex + ") > toIndex(" + toIndex+")"); if (fromIndex < 0) throw new ArrayIndexOutOfBoundsException(fromIndex); if (toIndex > arrayLen) throw new ArrayIndexOutOfBoundsException(toIndex); }
- Bartweiss 10y agoThis is one of the reasons I followed the Oracle v Google suit with such interest. Below some minimum threshold of complexity, it seems like software ought to cross the idea/expression divide and become copyright-exempt, just as a mathematical formula does. In fact, the example you gave is something that could easily be recreated letter for letter without seeing the original post. I'd be utterly shocked if that sort of "could have written it from scratch" code ever caused someone an IP problem.
- daenney 10y agoIt's not entirely true: > Starting Feb 1, 2016, all new code contributions to Stack Overflow and Stack Exchange will be covered by the MIT License. Source: http://meta.stackexchange.com/questions/271080/the-mit-license-clarity-on-using-code-on-stack-overflow-and-stack-exchange http://meta.stackexchange.com/questions/271080/the-mit-licen... So, it depends. Code from before then is CC-SA, after it is MIT.
- computronus 10y agoThat post has an update at the top that the license change was delayed until March 1, 2016 and a link to a follow-up post: http://meta.stackexchange.com/questions/272956/a-new-code-license-the-mit-this-time-with-attribution-required?cb=1 http://meta.stackexchange.com/questions/272956/a-new-code-li... That follow-up post says that they're "going to delay the implementation", so I assume that today it's still all CC-SA. I haven't found any further information, but would love to know it, or be corrected on my assumption. My company is struggling with the code license situation and I'm stuck with dealing with it for my project. Clear, up-to-date information about it would be fantastic.
- daenney 10y agoOh nice catch, I missed that part. And I feel your pain. Starting a similar project here to inventory 3rd party code etc., it's going to be hard.