open source software should be distributed under licences. I’ve put together a short overview of the most important ones. and what they accomplish:
MIT: Do whatever you want with the code, but you cannot hold the author responsible for bugs
l;drLegal comes in handy if you want to know more about other licences.
I recommend you use the MIT license: You basically do not restrict anyone from using my code, but will not face legal consequences of any kind if your code is broken.
But why should I care?
In your license you can specify how one may use your code (if commercially or not, if allowed to modify it etc).
If your project is open source and free, you probably won’t have any difficulties with licences. However, if you intend to sell it, or keep your code private, you need to review them carefully: Some licences may restrict using code in commercial or non open source projects.
Personally, I think it’s a waste of time clearing up legal issues to use already written code, rather than spending this time on developing. The reason I make all of my code open source is than others can reuse the code and do not need to write the exact same thing I’ve already did. I think this should generally be the focus of open source; reducing the workload of all programmers in general.