Posts
17
Comments
28
Trackbacks
0
Code snippets on blogs, are you allowed to use them in your own work? No you can not!!

I think mostly people do intend that snippets they publish on their blogs get used by people for their own purposes.  However, unless you explicitly say otherwise, in many countries, your blog posts are automatically copyrighted.   Which normally is a good thing, it means you can’t accidently forget to protect your work!    But it does mean that you need to explicitly give away the rights to anything you publish that you intend for anyone else to use freely.

So if that is your intention,  I think somewhere on your blog you need to state what the deal is with your code snippets you publish.   So I was having a look at what are my options.

It seems like it’s a bit of a thorny issue.

I thought it would be a simple case of saying it’s released into the public domain, however, some advice out there seems to say that releasing things into the “public domain” has problems in places like the US. 

Some discussion about it can be found here :- http://stackoverflow.com/questions/259384/what-license-should-i-use-for-code-snippets-released-on-my-blog

and here http://stackoverflow.com/questions/1190628/what-license-is-public-code-under-if-no-license-is-specified

The accepted answer (which also seems consistent with other things I’ve read) is that you have to explicitly license your code to be free to use.

It seems a popular choice is the Creative Commons has CC0 license, which you can read about here :- http://creativecommons.org/choose/zero/

Which is the path I think I will go down!

It’s even more interesting to me as I’m building up an open source library of various useful C# snippets and “glue” type code, some of which is my code, some of which are derivatives of other peoples snippets.  So I’m going to have to be quite careful to make sure I’m allowed to put various bits of code into a library and then license it under a MIT type license.

posted on Friday, June 10, 2011 11:38 AM Print
Comments
Gravatar
# re: Code snippets on blogs, are you allowed to use them in your own work? No you can not!!
Hal Rottenberg
6/11/2011 3:50 AM
You do know that you already publish your blog as CC-BY license? That's not public domain or CC-0. You may want to update your footer. It's actually more confusing as you include the word "copyright" as well.

License discussions get tedious really quickly. :)
Gravatar
# re: Code snippets on blogs, are you allowed to use them in your own work? No you can not!!
Miral
6/16/2011 8:37 AM
I prefer CC-BY; the attribution requirement means that anyone using the code is required to put a link to the page they found it on (or at least to the blog itself), which in turn means that if someone else (or the same person some time later) comes across the code again later on they can find where it came from in order to (a) see some usage examples or explanations, if they've forgotten how to do something with it, (b) ask questions or give kudos, or (c) offer criticism or alternatives for improvement.

And yeah, your blog is currently CC-BY as well. :)

Post Comment

Title *
Name *
Email
Url
Comment *