Hacker News new | ask | show | jobs
by nkvoll 4025 days ago
> if you find something on SO that does exactly what you need then yes, just paste it.

I think you should be very careful about doing this without an explicitly stated license with reasonable proof of author copyright for the code snippet. It's one of the things that can easily compromise the legal security of a codebase.

3 comments

StackExchange content is licensed under Creative Commons.

http://blog.stackoverflow.com/2009/06/stack-overflow-creativ...

Is there not a blanket/implicit release of claim that goes along with posting code on SO?

When I copy code verbatim from SO or another "help" site, I generally put a comment right above that chunk of code, something like:

  /* See: http://stackoverflow.com/a/xxxxxxxxxxx */
Don't know if that's enough to protect against any ownership claims though.
I think this is helpful more in helping future developers reading the code have more context about what the code is, why it's there, and where it came from, rather than anything to do with ownership claims.

Often times code taken from SO solves the problem but noticeably is structured differently from the rest of the codebase--often with good reason--and this helps the new dev go look back at the SO conversation and see what problems this is solving / if it can be removed.

Code posted on SO doesn't need to be written by the person posting the code.
Agreed if it's anything of significant size. If it's 2-4 lines though, it's almost certainly fair use. Can a lawyer comment?
IANAL

Fair use is a pretty subjective thing that's up to a judge to determine. It's a four-factor test, and you can read more here: http://fairuse.stanford.edu/overview/fair-use/four-factors/

* the purpose and character of your use

* the nature of the copyrighted work

* the amount and substantiality of the portion taken, and

* the effect of the use upon the potential market.

The fact that it's 2-4 lines may come in as part of factor 3, but the other factors also need to be taken into account.

I think there is a huge difference in what would be considered "fair use" in a commercial, value-generating software product. Fair use as I understand it usually applies to entirely personal use, or quotes used in an editorial, analysis, or critique.

If something I wrote, even just a few lines, is used to generate profit for someone else, and I did not permit that or place it in the public domain, I'm not sure a fair use claim would hold up. IANAL.

Fair use can apply to commercial or for-profit enterprises. You'll find that commercial enterprises are often disadvantaged by some of the factors.

For example, the first factor (purpose and character; transformative nature of the work) is often less transformative in commercial settings. The fourth factor (the effect of the use upon the potential market) is also often more challenging for commercial enterprises to get past.

However, there are plenty of commercial enterprises that rely on fair use regularly. News media is a very common commercial product that relies on fair use.

Copyright and fair use law is pretty much the same for commercial and personal products. If you can make a compelling case to a judge around those four-factors, it can be fair use.

However, when taking clippings from SO and using them directly in a software, you're going to have very hard time making a fair use claim — wether it's for a personal or commercial project.