A nifty way to manage code

Like any good programmer I make extensive use of an SCM to track code changes.

There is a limitation to version control though – it’s not automated. This is fine; commits, in my mind, are about tracking your additions/fixes/improvements to a project. I’ve been trying my best to get away from the “commiting todays work” kind of message.

But the lack of automation has a drawback. If, like myself, you work on multiple machines at multiple physical locations throughout a normal day it’s a ball ache to realise you forgot to commit before leaving work. Losing track is very easy.

It strikes me that, really, I was misusing SCM entirely. It’s not about syncing my code between home and work, it is about tracking code changes. We should be using a different tool to fix the sync problem.

Enter Dropbox

Dropbox is a perfect solution. Embarrassingly my brother (who is a musician) has already been using it for an age.

So now I have a Dropbox account with a mercurial folder that syncs every drop of code on the fly – I can now literally move to another room, sit at my netbook and instantly start coding again.

Such a simple solution but I reckon it has increased my productivity by at least a factor of two.

This entry was posted in ideas and tagged , , , . Bookmark the permalink.

5 Responses to A nifty way to manage code

  1. Drezha says:

    Dropbox is fantastic – I’ve been using it for months now to sync my PhD work between home and work so I’m always up to date with whatever I’m working on. Far simpler than tracking changes with a USB stick and syncback. Well, less memory intensive as I don’t have to remember!

    There are a few very simple and nice little tips and tricks to do with Dropbox as well – I like the idea of hosting your own repository for Linux so you can install deb files like Opera etc from it.

    As an aside, your CSS encoding seems a little off on the reply box – I cant see the far right hand side of the reply box as the sidebar covers it up (Firefox 3.6.3, Windows 7, 1440×900)

  2. Errant says:

    I remember Dropbox when it was first launched; very cool but I couldn’t see a lot of use for it. How time changes :)

    (and, yes, I need to fix that comment box thing – keep forgetting)

  3. dv says:

    hey, here from hacker news.. i’m new to hg and don’t use dropbox. would you mind explicitly explaining this setup for a dummy like myself? is your working copy under dropbox? there are no issues with locks, permissions or corruption? i’ve signed up for bitbucket and have 3 cloned projects in my home folder:

    ~/projects/a
    ~/projects/b
    ~/projects/c
    

    so i work, commit, push to bitbucket. then on my other 3 computers i have to do the same: clone, work, commit, push.
    you’re saying i should just put my projects dir under dropbox, so effectively have one clone distributed across all my computers?

    sorry for my obtuseness. thanks for your help.

  4. Errant says:

    Yep, that is exactly the thing.

    I have all my local code in sub-folders in my Dropbox directory. And that is where I work on it. Anything I work on is synced to all the other computers attached to my Dropbox account. So I can start some work on one machine, and then walk to another machine and continue working.

    Then when I am ready to commit some changes (say, a new feature I have completed) I will commit & push on any of the machines (obviously that act of commiting is then tracked and synced by Dropbox). The Bitbucket account is just an external backup of the SCM (plus issue tracking etc.), you could do without it if needed :)

  5. dv says:

    awesome thanks. i’ve been struggling lately with finding a workflow between my 2 home linux boxes and work pc and this should help.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">