

Ask HN: Releasing code as open source - jasongullickson

I wrote an iPad app that was rejected by Apple with no hope of being accepted anytime in the foreseeable future.  I've decided to move on and use the concepts for another project but in the event that others might find it useful I'd like to release the code as open source.<p>Having never done this before I'm not sure the "best" way to go about it; simply open up a public repository on github and post the code, or do I need to select a specific license, update the source to reflect this choice, provide documentation, etc.?<p>I'm sure there are no hard-and-fast rules but I'd like to do this in a way that is most beneficial to other developers out there.
======
frossie
Let's be clear. "Open source" actually means distributed with a license
compatible with the open source movement. Unlicensed is not technically open
source. (Semantics, I know, but it can make a difference - not knowing exactly
what your application does it is hard to tell whether it is relevant).

If you care at all what happens to it, slapping the GPL on it and putting it
on github are easy choices. Here are the instructions on how to GPL your code:

<http://www.gnu.org/licenses/gpl-howto.html>

If you really don't care what happens to it (i.e. don't care if it is forked a
zillion times) just slap it on your website somewhere - but personally I would
still GPL it.

~~~
jasongullickson
Thanks, that's the sort of info I'm looking for. I don't want to make the use
restrictive but I'd like to prevent someone else from claiming it and then
preventing others from using it in the future.

~~~
_delirium
Which kind of license you should pick depends on what exactly you mean by
"claiming it and then preventing others from using it in the future".

The two main styles of licensing are:

* Permissive (BSD-style, MIT-style): Anyone can use your code for any purpose, including in proprietary products, but they must retain the copyright notice.

* Copyleft (GPL): Anyone can use your code, on the condition that any software they use it in gives the same freedom to reusers.

Which you should choose depends on what you'd consider fair/unfair reuse of
your code. For example, if Microsoft used an adapted version of your code in
the next version of Excel, would you consider that a great thing, and be happy
to see your code out there, or would you consider it a betrayal of your intent
for someone to adapt a version of your code and then keep the adaptation
closed-source?

~~~
jasongullickson
I'm OK with the code being used in a commercial product so long as that
doesn't prohibit others from using it as well (in other words, I wouldn't want
Microsoft to somehow copyright a function my code provides that would get
anyone else who uses that function sued).

Don't get me wrong, I don't see this as a possibility but I'd like to save
others the trouble.

~~~
_delirium
That shouldn't be a problem with pretty much any option. At worse, Microsoft
(or whoever) can make an improved version of your code that they copyright,
but they couldn't copyright the original version that you released in a way
that would prevent others from using it. The biggest difference between
licenses is whether you care about those derived works: if someone improved
your code, should that improved code also have to stay open source, or is it
okay if someone takes the improved version closed-source? If you want to
ensure that any improved versions stay open too, then copyleft licenses (the
GPL is the main one) are the way to go. If you don't care about that, and only
care that the original stays open, then any permissive open-source license is
fine ("BSD-style" licensing).

~~~
jasongullickson
Excellent, then it looks like I guessed right :)

Thank-you for taking the time to lay out the differences.

------
schacon
I would highly recommend using an MIT license - I think everyone working at
GitHub uses it for all of our OS work.

<http://github.com/schacon/showoff/blob/master/LICENSE>

It is very open and people that are interested in learning from or using your
code don't have to worry about licensing issues. If you are a hard-core
copyleft advocate, then great, use the GPL - if you don't care, please use
MIT. It makes people looking at your code not have to worry about exactly how
they're using it and it makes sure they don't have to beg you to ask
permission in case they want to use snippets in a non-GPL program.

------
kilian
It depends on what you want. Do you want people to just do whatever they want,
then go with MIT or a BSD license. If you want people to contribute back (and
'keep on giving') use one of the GPL licences. Personally I always use MIT.

It's no harm to go over your code again and clean it here and there (not
having seen the code, just in general ;)

Regarding documentation: If you want people to do stuff with your code,
providing documentation is very helpful. Writing documentation is a boring
task, so most open-source projects conveniently forget to do so. If you have a
well documented source even, it's much, much more useful to others.

~~~
jasongullickson
That's good to hear, I'd like to "have good manners" as a way of putting it,
but it's good to know that I can release the code and wait to see how much
interest there is before I invest additional time pruning and creating
documentation.

------
hga
One quibble with using the GPL: it is the position of the FSF that it and the
Apple App store licensing terms are incompatible:
[http://www.fsf.org/blogs/licensing/more-about-the-app-
store-...](http://www.fsf.org/blogs/licensing/more-about-the-app-store-gpl-
enforcement)

However, if you're holding the license, it's up to you if you take action
against anyone using your code in an iOS app. (And perhaps you _don't_ want
people going down that dark path anyway...).

The more you care about other people using your code, the less you'll want to
use a restrictive license. The vast majority of open source Lisp
implementations are _not_ GPLed, I assume at least in part for that reason
(CLisp was coerced into the GPL by its use of readline). For Clojure Rich
Hickey uses the Eclipse Public License -v 1.0 for reasons that I forget but
that made complete sense to me when I reviewed them
(<http://opensource.org/licenses/eclipse-1.0.php>). Do pick one of the most
common, license proliferation is a bane of FOSS.

On the other hand, software like language implementations that don't require
including so much of themselves in a released version are very natural fits
for the GPL, e.g. GCC. The more community involvement you get, the better.

------
cmelbye
I would give it a GPL/LGPL/Mozilla/etc license (your choice, GPL is popular)
and put it on a public GitHub repository, and then post it here on Hacker News
so we can see it :)

~~~
jasongullickson
Well hopefully I didn't do anything wrong that's too embarassing:
<http://github.com/jjg/DashApp>

