60

Do you think it's worth it to use version control if you are an independent developer, and if so, why? Do you keep the repository on your own computer, or elsewhere, where it can serve as a backup?

3
  • 55
    I would love to see a pharmacist ask: "Should I store medications in an organized way or just throw them all in a drawer? Is it worth the effort?"
    – Erik
    Dec 17, 2010 at 0:48
  • 23
    Just imagine working really hard for a week straight creating this awesome piece of software. Then delete it. How would you feel? It's not just storage. When something is broken that worked last week, you can look and see what changed and usually see what you broke. I still see 'professional' developers with backup001 and backup_backup001 folders mixed with their source. Form good habits while you are still young.
    – Erik
    Dec 17, 2010 at 0:58
  • @Erik Yuck, the backup folders sound nasty. I use source control for my projects, though I'm not really good at committing often.
    – vedosity
    Dec 17, 2010 at 1:15

8 Answers 8

61

If you use decentralized source control (Mercurial or Git or Bazaar or whatever), you get advantages over SVN/CVS that makes it easy, useful and powerful to use in case you're an indy:

  1. You commit locally: your project dir is your repo with FULL history. So you don't have to have a server, you commit directly in your repo, and you can have several repos in the same computer. Using a laptop that you open sometimes to continue working on your things? Great! You don't have to setup a server and if you need one later, it's easy and you just "push" and "pull" changes between repositories.
  2. It's made to ease experimentation: often you need to have an idea about a feature without polluting code. With SVN and CVS you can already use a branching system and ditch the branch if the feature is not as good as you wanted it to be. But if you want to merge the feature with the trunk version, you'll have a lot of hard to fix surprises. Git, Mercurial and Bazaar (at least) makes merges and branches really easy. You can even just duplicate a repo, work on it some time, still commit and kill it or push your changes in the main repo if you want.
  3. Flexibility of organisation: as pointed before, as you have repos that you organize as you need, it's easy to start alone and allow other people to work with you by changing your organization. No organization is imposed so you just have to set it up and voilà. I often just push/pull changes between my own computers (laptop/desktop/server) and I'm still alone on my devs. I use Mercurial and that help me duplicate my work but also work on features I thought about outside on my laptop, then continue to work on other features on my desktop, then push my laptop changes on my desktop or server and merge the whole desktop+laptop and put it (as backup and future teamwork repo) on my server.
  4. It helps setting up backups: if you setup a central repo (on GitHub if it's public, or in a private repo on BitBucket) you can easily write a script which will be executed each time a computer is booted, and then pass said script on to your friends so that it makes automatic backups of your work regularly. It's what I'm doing so now I'm sure it won't be easy to lose my work.

In fact, currently, you have no excuse to not use a control source tool for any project. Because they are more powerful and flexible than before and scale with your needs.

13
  • 6
    There's always GitHub.
    – HedgeMage
    Dec 17, 2010 at 0:05
  • 8
    Or bitbucket.org if you're using Mercurial. Dec 17, 2010 at 0:13
  • 7
    Mercurial with a local filesystem repo on dropbox works really well for a single dev. Dec 17, 2010 at 8:29
  • 1
    @Guillaume : A single developper can use the "distributed" aspect of a DVCS. I do. For example, I can work on computer A, push my work on my usb key, and then pull from this usb key on computer B.
    – barjak
    Dec 17, 2010 at 10:37
  • 1
    @Guillaume "Distributed" is a technical aspect, not an organisational one. You can use a centralised constrol source system with an organisation with integrators only allowed to validate commited code. That's possible but hard to setup because of the centralised nature of the tool. But that's still an orthogonal problem.
    – Klaim
    Dec 17, 2010 at 17:45
34

source code control is utterly useless for independent developers, because as we all know:

  • independent developers never make mistakes
  • independent developers never go off on revisions that don't work out
  • independent developers never have more than one version so they have no use for branches
  • independent developers never care about what they changed yesterday or last week
  • independent developers never, ever need backups

Call me a "dependent developer": Mercurial repositories clone easily between my desktop, laptops, USB backup drives, and bitbucket.org. I've grown dependent, and I like it that way!

3
  • 6
    Is this answer sarcastic?
    – user15279
    Jun 27, 2011 at 19:25
  • 4
    @kurtnelle: extremely! Jun 27, 2011 at 21:20
  • 1
    Kewlio, just checking.
    – user15279
    Jun 27, 2011 at 23:28
21

Why not?

I'm a solo developer and I use BitBucket and Mercurial for my personal projects. Having the ability to revert and fork your code is just too good to pass up.

6
  • 8
    +1 for BitBucket - they offer unlimited private repositories for free.
    – Jon Sagara
    Dec 16, 2010 at 23:41
  • 2
    The free private repositories are the reason why I use BitBucket over GitHub. Dec 16, 2010 at 23:43
  • 4
    free private repo?? You might have converted me from git to hg.
    – Gauthier
    Dec 17, 2010 at 9:52
  • @Gauthier, yep, BitBucket has free private repos. I'm not sure if they're unlimited though. Dec 18, 2010 at 1:13
  • 1
    You can still use git with bitbucket. In fact the import straight from github including ssh keys. Just made the move but still use git (I like it better!) Oct 8, 2013 at 10:11
2

Yes. It is very very useful. My friend Matt Gallagher posted this excellent article on this very subject just a few days ago to his "Cocoa With Love" iOS/MacOS development blog.

The article is Mac & Git centric but it covers the basics.

You may also be interested in the following StackExchange Questions (and their answers).

1

I find value in it, personally. My projects are all checked into git repositories (all of which I keep on multiple machines in case of a hardware failure). The most useful features are branching (so that I can run an experiment that messes with half of my codebase, and not worry about blowing anything up permanently) and reverting (which is basically just undo on steroids; in case I find that I made some mistake that is out of regular undo range).

1

Worth?? Must! If you don't use Source Control then you don't control you sources, and that's bad. You can't diff you can't revert, you can't track changes - you'll spend hours trying to find out the dummy bug you just entered. It is better to have it on some backed up server, but you can also you your computer and use any backup method you find appropriate.

1
  • 2
    I actually do use source control, but I also tend to do things like over-engineering and adopting things that are overkill. I'm well known for this at work. Then again, I don't think any programmers where I work including me have worked anywhere else as a programmer, and most of us are still in high school.
    – vedosity
    Dec 17, 2010 at 0:50
1

Absolutely use source control. Then set up a build server and automate your build and testing processes. Trigger builds from your source commits of your central repo. I have been working by myself for three years in this way and it's wonderful.

0

Yes.

Even single developers need to sometimes see the state of their code from some past revision. And it's always a good idea to backup everything important, and that applies to all people.

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