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.