Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

It was suggested that I take my project open source due to its size and my lack of skills, so I checked out Google Code, and started making a project and now it's asking me if I want the project to have Git, Mercurial, or Subversion code hosting.

I don't even know what code hosting is, and a search just confused me more with the debates between all these things, and this is made even worse as Google Code is asking me which type of license I want.

I think I'm not quite understanding what open source really means, can someone pretty much make a quick layman's cheat sheet on what all this is? Much appreciated.

Edit There have been a lot of great responses on these three versions of code hosting, but I think I failed to communicate the real question: Basically I've no idea how this open source stuff works, why would I host the code somewhere like this? And would that mean I have to take the site off of my current hosting, or is this an entirely different type of hosting? What happens when I make my site open source, what rights do I have, what rights do I give away. How does it work, do people just come and throw code at me for free? Perhaps these are stupid questions, and if that's the case then I guess I need stupid answers, I seriously have no idea what open source is, except for the concept of sharing code...

share|improve this question

migrated from stackoverflow.com Aug 31 '11 at 13:52

This question came from our site for professional and enthusiast programmers.

1  
slideshare.net/kinshuksunil/… –  staticx Aug 31 '11 at 12:48
    
that was an awesome slide show, i think it helped me grasp the basics thanks for sharing, now its the more detailed stuff that has me clueless. –  Nathan Aug 31 '11 at 13:10
1  
This is really 2 questions, and both are probably duplicates. stackoverflow.com/questions/2303136/…, and stackoverflow.com/questions/3859/… –  sylvanaar Aug 31 '11 at 13:19
2  
"Lack of skills" sounds like an awful reason for making something open source. If you have a magnificent idea, but lack technical skills, then maybe. I would not go open source until I found a technically skilled partner who is prepared to commit to producing a first cut of the code, and who would like to go open source. –  tripleee Sep 9 '11 at 8:16
    
Tripleee would you be able to suggest a network or something of that nature where I could possibly find someone to partner with? –  Nathan Sep 9 '11 at 20:05
add comment

9 Answers 9

up vote 7 down vote accepted

why would I host the code somewhere like this?

A key point of open source software development is to share the source code. There are several ways to do this, like putting tar/zip files on a web or ftp server. Services like google code (or sourceforge.net, gitorious.org, bitbucket.org, and many others) take away the need to run your own servers for this purpose.

And would that mean I have to take the site off of my current hosting, or is this an entirely different type of hosting?

These services are not general-purpose web hosts, but run very specialized services. They are not meant to be the homepage of a product, but more a developer dashboard.

With google code you get

  • a wiki
  • a bugtracker
  • regular file download space
  • a version control server

Of course you can set up these software on a regular web server (the version control stuff might be tricky, but that depends to much on details), but the main benefit of using a development hoster is that you don't need to take care of these systems for your own. The main drawback is that you have no control about what software is used on the server, you have to live with what is available on that host. You also need to consider what happens if the service gets out of business(ok, google never fails), and if you can take the data from the current host to another one or your own server (think of backups).

What happens when I make my site open source, what rights do I have,

This is a difficult question, since it depends on the law of the country where you live.

what rights do I give away.

This depends on the license you give to the product. It can go from proprietary open source (think of PGP) where the user basically can't do anything with the code, on the other end of the scale is public domain, where every one can do whatever he wants.

How does it work, do people just come and throw code at me for free?

This is very unlikely to happen, since your product need enough popularity in order to attract other developers.

[...] and now it's asking me if I want the project to have Git, Mercurial, or Subversion code hosting.

These are three different version control systems, where Subversion is a centralized one, while Git and Mercurial are distributed.

There are religious wars about which one to use, but the main point is to use one. See http://martinfowler.com/bliki/VersionControlTools.html for more details.

When to choose Subversion:

  • You have binary files, which can't be easily merged, and need the lock->modify->commit->unlock workflow, which subversion supports¹
  • You need to check out only a part of the directory structure.

¹ There is a lock extension for mercurial, but I have no experience with it, and can't say if it is usable.

When you don't need the former features, it is better to use Mercurial or Git. Both have the following advantages over Subversion:

  • fast (and with fast I really mean fast)
  • easy branching and merging (this got better since Subversion >= 1.5, but it is not the same)
  • commit and publish is decoupled, so you can work without disturbance on a feature and publish the work when it is done
  • they track the state of the product directory as whole
  • you get a full copy of the whole version history when you clone a remote repository
  • cryptographically secured revision numbers, which means that even when someone breaks in the server, he can't put code in place without changing the revision history

    • but since no one checks these revisions, this feature is practically not effective
share|improve this answer
add comment

Code hosting is exactly that - somewhere to host (or keep) your code.

Git, Mercurial and Subversion are all source control tools you use to manage your code history. Git and Mercurial are distributed systems whereas Subversion is a more traditional server based setup.

Have a look on Wikipedia or some such and see which appeals to you most. Personally we use Mercurial and it works very well for us.

share|improve this answer
add comment

Joel Spolsky's written a great tutorial about Hg (Mercurial) and I believe the introductory section covers Subversion, including the reasons why you're upgrading to Mercurial. Give that a read, it really helped me understand a lot about Mercurial and DVCS in general.

Oh, and when you're ready to host, you can use Google Code, BitBucket, Github (with the help of this excellent extension) or others.

share|improve this answer
    
Mercurial is an excellent system, it won me over from subversion after just a few minutes of use. –  Jim In Texas Aug 31 '11 at 14:55
add comment

I use git, which I find easier to manage due to distributed control. Hg is good also for this particular purpose, but I can't give you advice on it, having never used it. SVN is a centralized system and hence less practical, but might be slightly simpler.

Open source basically means you give anyone the ability to use your work and build on it. You can set the boundaries of that use: GPL means the user has to make his added work open source to, LGPL means he doesn't, for example.

share|improve this answer
add comment

Subversion would be the easiest option because it's a VCS. Git and Mercurial are DVCS systems. They're more modern and more powerful but trickier to understand. Using a front-end such as TortoiseSVN or TortoiseHG (for Mercurial aka HG) also really helps.

If your software is a stand-alone program you could use GPL or really open it up with a BSD license. If your project is a library that somebody else will link with use LGPL or again BSD; but don't use GPL.

[edit]

As for your original motivation for open sourcing the software: Unfortunately just making software open source doesn't mean you're going to get an influx of talented free labor. There are hundreds of thousands of open source projects. Only a small percentage of them have active contributing members. The reasons that make these projects successful or not are as varied as why businesses succeed and fail. If you want to become a good programmer and produce good software you'll have to spend a lot of time learning, writing code and communicating with other people on sites such as StackOverflow.

share|improve this answer
1  
Why do you say that svn is the easiest? Please justify this statement. –  Richard Aug 31 '11 at 12:51
1  
@Richard : I think he means it's a bit easier to set up and use for basic usage, at least I agree with that acception. I disagree with the idea that your library should not use GPL, it's really a political stance. –  Kheldar Aug 31 '11 at 12:53
    
Use GPL for a library if you want to impose certain restrictions on its use. Use LGPL if you want to impose fewer restrictions. –  Keith Thompson Aug 31 '11 at 17:43
add comment

It seems to me that while most people here are answering the how, no-one has really answered the why in your question.

One of the first open source projects I experienced was the fabulous Fractint project, this was developed by the Stone Soup Group who were inspired by the old stone soup folk story.

For me, this encapsulates the spirit of open source better than any Stallman rant or even the original GNU Manifesto. It is a testament to the strength of that community that Fractint is still being developed 23 years after the fire was lit under that particular cooking pot of code.

share|improve this answer
add comment

Open source means anybody can read, copy, modify, and distribute your code. You should have a firm understanding of the implications of this before you proceed. Perhaps you should read a book or at least browse the Wikipedia articles on the topic and/or http://opensource.org/ until you feel you have a grasp of the concept.

(The O'Reilly book Open Sources http://oreilly.com/openbook/opensources/book/index.html is helpful but perhaps not precisely what you are looking for.)

What source code control system to use is completely of a secondary importance. You could copy/paste your code on a web page and be done. Having said that, version control is important, and a good vehicle for lowering the bar for developers to contribute. Any of the options offered by Google Code are fine; go with the one you like, or perhaps defer the question until you can ask your contributors which one they would like to use.

share|improve this answer
add comment

Making your code or project open source means that everyone can take it and modify it as (s)he wants. This depends on which type of license you choose to use, but in general open source means the source code is available to anyone to download it, modify it and use as they please.

Anyway this code needs to be reachable by other people in order to get it.

Taking your code to a public online repository such as GitHub is the best way to do it. First, your code is now accessible to the public. Then, since such services also offers Version Control, your code is project organized. You can keep track of changes you and other people make. Since it also allow branching (separating) the project into other different projects, you can keep track of all the different version other people made of your code.

This also ensures your code is stored in a safe place, you don't have to worry about it being lost by a faulty hard disk on your pc for example. And when you want to work at it, you can work from any place because your code is online, you can find it anywhere.

If you then decide it's time to show off your code to the world, it's just a matter of sending the link to your online project repository. It's a technology people are getting used to, so since everybody knows it, it's easier to understand how to download it, post messages, create different versions, etc.

It's like a common standard of doing things, common practice.

Some links you may find useful to further explain open source:

share|improve this answer
add comment

About the version control system, I would say that you should stick with the most-used and more recent alternative: That is: "Git". Mercurial is less popular, and SVN is old, slow, and centralized. With GIT you will benefit of a version control system that is modern and popular. There's practically nothing to lose.

Sources (reggarding popularity of DVCS):

http://stackoverflow.com/questions/tagged/git ~10k questions http://stackoverflow.com/questions/tagged/mercurial ~3k questions

http://www.googlefight.com/index.php?lang=en_GB&word1=git&word2=mercurial

11700000 results vs

1580000 results

Regarding the license: Maybe you should look at the most common ones: GLP, MIT, LGPL, BSD, and pick the one that suits your project better.

share|improve this answer
7  
Mercurial is not proprietary...it's open source exactly as Git! –  Christian Specht Aug 31 '11 at 13:00
4  
Fanboy answer with partially wrong arguments. –  Oben Sonne Aug 31 '11 at 13:04
1  
"most-used" - please provide a reference to your source of that information. –  sylvanaar Aug 31 '11 at 13:18
    
Sorry people.. It's just my perception of things: I guess that Git is more used than Mercurial, and I know that SVN is old, slow and centralized... I wonder whether your comments are less fanboy-comments than my so-called fanboy-answer. Come on, git hub uses git, the linux kernel uses git, every project in my department uses git... –  pedrorolo Aug 31 '11 at 14:47
1  
Perhaps the abundance of questions regarding Git also illustrates that it's more difficult to use? A few people have used similar data when investigating what web development frameworks were the most 'popular' where the same point was raised (commenting on the inaccuracies). –  Tim Post Sep 1 '11 at 6:27
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.