A Brave New Workflow

One of the good things about hitting the reset button is that it gives you an opportunity to stop and reassess.

Over the last couple of years, my tooling and workflows have slowly descended into disarray. I would often do things the quick way, rather than the right way. In the moment, this meant getting the job done quickly, but it soon meant I had a mess on my hands. A mess that became exponentially worse when I started running two Macs. 

It wasn’t long before my beloved 2010 MacBook Pro was a second class citizen, nor was it long before things on my iMac started to feel clunky after years of cruft building up.

I wanted a solution that kept my iMac and my MacBook as equals, allowing me to jump from one to the other with minimal overhead. I started by looking at the things I do most often:

  • iOS development
  • Design work
  • Web development

The first two, my iOS development and design work, were quite easy to solve. Cloud storage. 

My first thought was to use something like Dropbox, but I hadn’t realised quite how expensive it had become. I don’t need a tonne of storage, but unless I’m missing something, it looks like 1TB at £7.99 per month was the starting price beyond the free plan. I was hoping for something cheaper for say, 200GB.

Then it dawned on me, I already pay for 200GB of iCloud storage and have plenty to spare. Why not use iCloud Drive? Something about relying on iCloud in this way felt foolish. But given how invested I am in the Apple eco-system, I figured I’d trial it. Worst case, I can move to Dropbox. 

Two weeks in with iCloud Drive, and so far, so good. One thing I wish it had is a “sync now” button. There have been a couple of instances where I would find iCloud Drive out of sync on my MacBook, and there’s nothing I can do but wait until it catches up. The lack of feedback that the system provides is disconcerting at times, making you feel entirely at its mercy. Although in fairness, it does always catch up after a few (long and awkward) seconds. 

But what about version control? I’ll still be using Git in conjunction with iCloud Drive. Instead of using Git as a tool to get code between machines via pushing and pulling, I’ll use it purely for version control, checking out my branches into iCloud Drive which will then sync my checked out branch between my MacBook and iMac.

There was a time where I would keep my design files in version control, often in the same repository as my code. But in hindsight, that was probably a little heavy handed. I’m not sure my design files ever felt the benefit from being in version control, at least, not at the level I work at. If I want to try something crazy, I make a new art board, if it doesn’t work out, no harm done. Your milage may vary, especially if you’re part of a team. I guess being a solo developer allows me small luxuries in this sense.

So that leaves my web development. The one that caused the biggest headache. I feel like I’ve gone full circle on this. I started out using a combination of Vagrant and Virtual Box, but this can create a maintenance overhead, especially when you’re trying to maintain the same setup on two machines. Often, I would find myself wanting to tweak something on a vagrant box after a few months away. I would use Puphpet to do this, loading my previous config.yaml file into Puphpet to make the desired changes, only to find when I go to provision, I’m met with errors, and so the dance of debugging would begin. Again, keep in mind this had to work on two Macs.

I see the benefits of using Vagrant and Virtual Box to build development environments, and I think it’s an impressive piece of tech, but I’m looking for a low maintenance solution that can easily run on multiple machines. I also need to keep in mind that I don’t make many websites these days, and those that I do aren’t wildly complex, so perhaps I was over engineering my development environment. So, I decided to go back to basics and use MAMP with a splash of iCloud Drive.

I set MAMP’s document root to a directory on iCloud Drive, which keeps my code synced across my two Macs, with Git running on top of this for version control purposes. Similar to how I run my iOS development.

That still leaves a small issue of managing development databases. Rather than try and battle with keeping local databases in sync between machines, I set up some development databases on my remote web server which my development sites are pointed at, that way, when I move between machines, I get the same code (via iCloudDrive) looking at the same remote development database. This does require an internet connection while I develop, but I can’t remember the last time I tried developing without an internet connection.

This new workflow is only a couple of weeks old, but so far, it’s working really well. Sure, all I’ve done is add some cloud storage and move my local web development to MAMP, but that’s not the big take away here. For me, it’s highlighted how important it is to occasionally pause and reassess. This is particularly hard to do when you’re busy, it’s easier to keep doing things in a more familiar, but less efficient manner. But by occasionally allowing yourself the time to pause and evaluate your processes, you will hopefully feel the rewards further down the road. Perhaps I’ll revisit this post in a few months and see where things are then.