Scroll to top

The secret of staying productive while coding

Ali - August 30, 2009 - 0 comments

Most people use versioning systems like Subversion, Mercurial, and git to maintain their code while working on software and web projects. There are also hosted solutions like github and bitbucket providing developers with more features than a traditional version control environment.

But sometimes you just want to keep your code in a safe place and make sure you have reliable backup of the different versions, and that’s it! For smaller (or personal) projects especially, using versioning systems is an overkill. But what could be the solution?

If I want to summarize it quickly, the ideal solution will be a one that:

  • Is hosted in the cloud (online)
  • Is easy to setup
  • Works without you doing any administration work
  • Is cheap and preferably free
  • Keeps you productive
  • Keeps coding synchronized on multiple workstations
  • Allows you to maintaing other related material, like PDF documentations, next to your code.

I think I found how to answer all these questions with one answer, let’s see how.

Storage as a service

Dropbox is a cloud-based storage service that keeps your files safe and in sync between multiple computers. It is basically created for backup and file synchronization, but I use it for coding and maintaining other contents like my web projects, and the book/article drafts including the drafts of this very article.

You will get 2GB of online free space which is pretty enough for many purposes, but it is always possible to upgrade to bigger plans.

Getting started

First create a Dropbox account and install the application (Windows, Mac, Linux) on all the computers you are working with. It is good to take a tour before , to check out the features.

Dropbox creates a local folder on your computer that is synced to your online folder. A mirror in the cloud, literally.

The solution I am proposing would work the best if all your computers run the same operating system, because you should set an identical path for the local folder on all computers. For example if you have a Mac and a PC, the folder structure difference will cause 2 different Dropbox folders (e.g. /Users/user/Dropbox and C:\MyDocuments\Dropbox\).

In my case, I set it to /Users/ali/Dropbox/ on both my home Macbook Pro as well as on my office Mac Pro. When I work at home (on my MacBook Pro) I store my ongoing work and it syncs with the remote folder. When I’m at work it sync back with my workstation and I can continue the work with no interruption.

The reason behind having similar folder structures is that when you are programming, you often use absolute file and folder references in the development environment. So having all computers using the same folder structure will guarantee you won’t face any silly issues in the code testing procees.

Using Dropbox

Now that you installed Dropbox and setup the folders, move a working folder or file, e.g a web project or a document you are working on, to the Dropbox folder. It will automatically start to synchronize the contents of the local folder with the remote folder (in the cloud). As you update the files, Dropbox will synchronize it with the remote folder and the good news is that it keeps a copy of every single version of the files as backup.

For the free plan the versions older than 30 days will be deleted, but in the paid version they will stay forever! so you will have all the earlier versions of your files.

On the other hand, when you open the other computers (that are configured), the local folder of Dropbox will be automatically synced with the remote folder, updating all files that have been updated in other computers. Then you can continue working on your project from the line you have left on the other computer, without carrying USB sticks around.

That was easy.

Happy yet?

Dropbox offers an intuitive web access interface to all versions of your files, so you can restore or download any older version. You can also setup a shared folder between you and other Dropbox users (say, your colleague) to exchange data in a productive way.

Dropbox Menu (Mac)
Dropbox Menu (Mac)

I am happily using Dropbox for syncing my files and it didn’t let me down even once. It also helps me keep the older versions in case I messed the current version. Every save you perform on your files is stored in Dropbox, so it is as if you have a live history of your work bit by bit.

Related posts

Post a Comment

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