Getting it straight.

Not the most scintillating material for those who don’t sling code, but I thought I’d write a quick post extolling my new development workflow for 2010. Having spent most, if not all of 2009, in a coding frenzy for my clients, small and large inefficiencies really slowed me down. I have a variety of projects and spend time coding in many different languages and platforms including Python/Django, Ruby/Rails, PHP/Wordpress/*, Javascript/CSS/HTML, and even some Perl now and then. Some of these projects have development environments, some do not. Some are under version control, and others are not. Some I develop on local machines in my office, others I have to develop on remote servers. Somehow it all worked, but I knew I wanted to streamline and optimize things a bit from a development perspective and really gain efficiencies from a common toolchain.

So first I decided to consolidate all my development locally on my HackPro workstation, which is more than up to the task. But running all these different platforms and frameworks on my mac was a bit daunting; using the stock apache has always been a bit of a pain and compiling and configuring my own builds on the mac just seemed masochistic. Enter Bitnami stacks — self-contained development environments including Apache + MySQL + Rails/Django/PHP, with an amazing selection of every major platform built using these frameworks. Excellent… an atomic Apache + MySQL build for every development environment was exactly what I was looking for. And, as a bonus, once it’s installed, it’s portable: I can easily zip it up, copy it over to my MacBook, and take it with me without missing a beat. Bliss.

Oh, they also provide VM images and EC2 cloud instances if that’s more your thing.

Next task: accessing the utilities, libraries, and shell tools that I’m accustomed to developing with on Linux. For this, MacPorts is a must-have. With a few short commands, you can compile and install your own Perl, ImageMagick, ghostscript, etc., and all their dependencies in just a few minutes. Truly awesome.

Last thing on the agenda is getting everything in version control. That was pretty easy: I have a few Slicehost servers and it was not problem to set up a remote repository for my unversioned client code. If Slicehost isn’t your thing, there are services like Beanstalk too for Subversion hosting. All of the repositories I work with are Subversion based, and I’ve traditionally used the shell to manage my repositories. But this year, I’ve decided to look into some graphical SVN clients to see if they make managing my repositories and working directories any easier. The two main contenders on the Mac right now are Versions and Cornerstone; while quite close functionally, Versions seems to have the edge on the UI and polish, while Cornerstone has a bit more for advanced users. I’m using Cornerstone right now, and have been fairly impressed. Jury’s still out as I haven’t used it too much, and I’ve noticed the absence of some critical commands, e.g “svn merge” and “svn switch”. But it’s got most of the stuff I need, which might be enough, I certainly don’t mind using the shell for the heavy lifting. And I certainly do like a common interface to access all my repositories across a variety of remote servers.

Throw in your favorite editor, Textmate, Vim, Coda, or whatever, and now you’re cooking with gas! So that’s what I’ve got so far, and so far it’s been working pretty well. Develop on a mac? What works for you?

Related posts:

  1. Mac Development Tools
  2. Riding on Rails

About this entry