Search

Enter a search word or two and press return to see the search results.

Who am I?

Hi, I’m Graeme and these are my notes, from my messy desk. I started this blog because Google proved to be more useful at finding content than anything else I’ve used.

So I started adding my own content in the hopes that Google would index it and allow me to find things again in the future.

It works.

You can find out more about me here, and you should follow me on Twitter here.

Keeping up

You can automatically receive new content here by subscribing to the “Blog RSS” (link below). This is the easiest way to keep up with what I write here.  See this BBC article for a good introduction on RSS and keeping up with the goings on of the Internet more easily.

Saturday
Apr172010

No longer a Free Agent!

If you’ve been following me on Twitter, you may have heard that my career has taken a slightly different direction in the past few weeks. I’ve been running Rubaidh for over 4 years now and for the most part it’s been a hugely enjoyable experience. I’ve learned a number of new skills both in technology and, most of all, in terms of what’s needed to run a successful business. I’ve also had the opportunity to work with a lot of really awesome people and on a number of great projects.

However, last year was pretty tough. I know it was tough for everyone, what with the media exacerbating a blip in the economy, but there were a couple of particular incidents (that I won’t go into because it wouldn’t be professional to do so) which made me decide if that’s how people do business, I really don’t want to do business.

Also, in general, I was spending more time stressing about money, pitching for new work and dealing with paperwork than I was doing the two things I love best:

  • writing great software; and
  • spending quality time with my family.

The latter, in particular, was suffering, and it wasn’t fair on Annabel & Malcolm. So at the start of this year, I quietly started looking for a new job.

And I’ve really landed on my feet. On Thursday, I started working at FreeAgent Central, who have created an awesome online accounting system for small businesses and freelancers. I’ve been a happy customer of FreeAgent for a couple of years now, and I already know that there’s an awesome team of people behind the project, so I’m really excited to be working there.

As for Rubaidh, it’s not going to disappear. I’ve still got a number of happy customers who can continue to rely on me to support them. I’ll also still be taking on the odd small project here and there, mostly as an excuse to play around with new technologies, which is sometimes more difficult in a large established application (I reckon it’ll be a wee while before FreeAgent bumps up to Rails 3, for example!).

Hopefully I’ll also have more spare time to contribute back to the open source community again, and to start keeping this blog a bit more up to date… That would be nice.

So. Here’s to new opportunities. 2010 is looking like it’s going to be an awesome year. :-)

(Oh, and if you sign up to FreeAgent Central with my referrer, we both get 10% off our accounts for life. What could be better than that?)

Monday
Mar292010

The Ruby Community

Most of you will already know that I am part of the triumvirate who runs the Scottish Ruby Conference (née Scotland on Rails) each year in Edinburgh. We’ve just wrapped up this year’s conference and it has been utterly awesome. I may write more about that later, but that’s not where I’m going today.

On the Saturday morning, I turned up, feeling the last whisky from the night before wasn’t such a great idea as it seemed at the time. Noticing that the battery was very low, I plugged my iPhone into my laptop, which was behind the registration desk, then disappeared off with Mark to eat the breakfasts we’d acquired from Greggs on the way in. From there, we headed straight in to Tim Bray’s keynote (by the second morning, the conference practically runs itself!). Afterwards, I popped out to pick up my phone, knowing it would have been recharged by then.

Except it wasn’t there.

At first, I figured one of my fellow organisers had thought, “leaving a phone lying around is a stupid thing to do, anybody could steal it!” and pocketed it for safe keeping. A quick check discovered that wasn’t the case.

I logged in to MobileMe, and hit the “Find my iPhone” button. It had been switched off. That’s a little suspicious, because it was switched on and charging when I left it. I sent a message to the phone so that it would say, “This is @mathie’s iPhone. Please could you drop it off at the registration desk when you find it?” When MobileMe does that, it sends an email to the phone’s owner when the message has successfully been delivered. As of Monday evening I still haven’t received that message. Which means it’s still switched off, or the SIM has been removed.

So I’ve lost my iPhone. That’s sad. What’s worse is that I can’t help feeling it was probably one of our delegates (ie one of the Ruby community) who stole it. That really hurts.

Without a mobile phone, I didn’t see much of Twitter on Saturday or Sunday. After my family picked me up from the hotel on Sunday, we went shopping with the express purpose of finding a new iPhone. Turns out I really rely on the device for lots of things. It took a while because O2 seem to be renovating most of their Edinburgh stores. Still, third time lucky, and £570 poorer.

Then I get home and find this: Support @mathie and say thank you. Joe O’Brien, a friend I met through the first Scotland on Rails, had set up a Pledgie to encourage the conference attendees to help me cover the cost of replacing the iPhone. And by that point on Sunday evening, I was nearly half way towards what I’d just paid to replace it!

I cannot believe how kind people in the Ruby community can be! It’s just incredible, and I’m really touched. And that’s definitely the way I’m going to look back on this affair. There may be one or two bad apples in there but the Ruby community as a whole is … I can’t think of one word to described it. Awesome. Incredible. Generous. Kind.

I came to the Ruby community because of Rails. I’m definitely going to stay as a part of the Ruby community because of the people. Thank you, all.

Monday
Mar152010

Updating the path everywhere on Ubuntu 09.10

Ubuntu is my Linux of choice. It has been for a long time. I’ve been a huge fan of Debian since the late ’90s — I was a Debian Developer stuck in the NM queue for a few years — but the release cycle was way too long for my tastes (which invariably meant I kept most of my systems running testing or unstable). So I switched to Ubuntu pretty early on.

I’m also a Ruby developer and, in particular, keep Ruby Enterprise Edition fed and cared for on my production servers. Every time I do a fresh install I have to remind myself how to make sure REE is always in the path and definitely in the path ahead of an accidental install of the stock Ruby on Ubuntu.

Here’s the list of things I’ve had to change this morning on Ubuntu 09.10 to make sure $PATH is set correctly everywhere:

  • /etc/environment, updating the PATH="..." line to read:

    PATH="/opt/ruby-enterprise/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"

  • /etc/crontab, updating its PATH="..." line to read:

    PATH=/opt/ruby-enterprise/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

  • /etc/login.defs, updating the ENV_SUPATH and ENV_PATH lines to read:

    ENV_SUPATH PATH=/opt/ruby-enterprise/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ENV_PATH PATH=/opt/ruby-enterprise/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

  • /etc/sudoers, where I’ve had to add the following line to override the compiled-in default:

    Defaults secure_path = "/opt/ruby-enterprise/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin"

That seems to have covered everything. The incantation for sudo was a bit of a bother to find (it being a built in default rather than configured in /etc), but with it, sudo irb now works, when it didn’t before. I haven’t changed the paths specified in init scripts as it seemed unnecessary.

For reference, the command I user to determine what might need changed was:

sudo find /etc -type f | xargs sudo grep 'PATH=' | grep -v /opt/ruby-enterprise

It produced a number of false positives, but was a good bet for figuring out the right ones.

So, have I missed anything? Have I changed things I shouldn’t have changed?

(And yes, I know, I should be using some sort of Configuration Management system to bootstrap everything I touch…)

Monday
Mar082010

My Ewgeco

Ewgeco E200

We’ve had a test Ewgeco unit kicking around the office for a while now, and since we’ve moved out the office, it’s been lying in a box with all the other equipment. Over the weekend, I rescued it from storage and hooked it up in the house. And it’s been a huge success.

Ewgeco is an energy monitor that shows a real-time display of your electricity, water and gas usage, also recording the information for later analysis. The idea is to show a very simple bar graph user interface with a traffic light system: green means your consumption is low, red means it’s much higher than your average. The device calibrates itself to your usage over time to make the traffic lights really mean something (though this takes about a week, so we haven’t experienced that yet).

You can retrieve the data from the device and upload it to a web app (which, as I say, we built, so take my gushing praise with that in mind!) where you can spot patterns in usage and feed that information back to actively reduce your energy bills. I haven’t tried out the web app since we installed the unit at home – I’ve only got ~2 days of data now – but I’m really looking forward to giving it a shot from the perspective of the consumer. I’m sure it’ll be awesome. :-)

It’s dead simple to install the device to measure electricity. You simply wrap a “current clamp” around the mains cable feeding your electricity meter. Done. That’s the only one we have installed just now as the gas and water meter installations are a little more involved (though I’m really hoping to at least start measuring gas usage soon). A wizard on the device takes you through connecting to the (wireless) current clamp to retrieve the data, and set your tariffs so you can accurately measure costs.

The real beauty of the Ewgeco device, though, is in the instant feedback. Until now, I’ve received feedback on our energy usage at most once a month and, more usually once a quarter, when we get a meter reading followed by a bill. Now, it’s instant. Switch on the kettle, and you see the electricity graph jump into the red, the number increasing by 3KW. It’s already demonstrated that, for example, that it’s cheaper to make a cup of coffee (with our coffee maker) than it is to make a cup of tea, even just boiling the right amount of water.

The fun bit is going to be walking around the house with the unit (which is wireless, so you can pick it up and wander around quite happily) and seeing what contributes to the “background” electricity usage in our house. When the house was quiet, I was noticing about 0.5KW background usage. I’d like to see how we can change our behaviour patterns to lower that (though I suspect it’s largely down to the fridge, fish tank and a Sun X4100 M2 now sitting in the attic!).

I’ve been aware of Ewgeco for well over a year now, but it hasn’t been until I installed the unit in our house that I understood that it’s a complete game changer. Visibility into our energy usage, instant feedback and being able to spot longer term trends is definitely going to lower our energy usage, save us money and have us contribute less adversely to the environment.

Wednesday
Mar032010

Aperture 3 on a laptop

I was awoken early last week by my laptop’s hard drive making a clicking noise. The fact that I hadn’t reconfigured Time Machine since installing Snow Leopard sent me into a blind panic. A quick trip to Amazon UK later, and I’d ordered a 2nd gen Drobo, along with 3 1TB Western Digital Caviar Green disks. It all turned up the next day, and the data shifting started.

The short version of the story is that I’ve now got at least two copies of everything, one on the Drobo (which should cover against particular types of failures all by itself). And the internal drive in my Macbook Pro hasn’t made any funny noises since. phew

A wee aside before I discuss how I’ve arranged Aperture 3 on my laptop in a satisfactory manner. The Drobo is slow. I mean, really slow. I’m seeing write speeds on the Mac, connected via Firewire 800, of about 25MB/s in tests. To put that in perspective, in order to fill the disk to capacity, you’d need to hang around for about 21 hours. In practice, it’s even worse than that and, in particular, delete operations seem to be spectacularly slow (and, unless the Drobo is filesystem aware, I don’t even know how that’s possible!).

I had initially intended to dump my 330GB master Aperture Library on there and have a small one on the laptop while I was on the move. However, after testing, and finding Aperture to be utterly unusable (spinning beach ball for 10 seconds after every adjustment, more spinning beach balls just for scrolling through projects), I had a change of heart.

My current laptop is a 17” Macbook Pro from, I think, sometime in 2007. I replaced the internal drive with a 320GB one at some point. I’ve also got a 500GB Firewire 800 Western Digital Passport (called, imagninatively, “External”) and the Drobo.

That makes the setup pretty straightforward, really:

  • The Aperture library on the internal disk. It’s currently clocking in at 30GB worth of metadata and previews.
  • All the master images are referenced masters, stored on the external disk. Here’s the other 300GB of raw masters.
  • A vault on the Drobo.
  • Time Machine backup on the Drobo.

This gives me a reasonably performant setup (as much as can be expected from a laptop, really, I think), while giving me the data protection I desire.

The Time Machine configuration is perhaps worth noting. As the vault is being backed up separately by Aperture, I’m excluding it from Time Machine. However, since all the master images are referenced masters, they aren’t backed up as part of the vault so I’m explicitly including the external drive in the Time Machine backup.

Another useful tip. Sometimes I’m loading images into Aperture and I’ve left the external drive at home. Not a problem, they get imported as managed files rather than referenced masters. However, when I reconnect the external drive, I do want to tidy things up. I have a smart album which contains all the ‘Managed’ masters:

Managed Masters smart album

To do this, create a new Smart Album (cmd-shift-l), remove the default set of rules and add a “File Status” rule where the status is “Managed”.

All of your managed masters will show up in there. Next time you attach the external disk, visit that album, select all the images and relocate the masters (File -> Relocate Masters…). Dead simple.

Of course, now that I’ve converged all my Aperture libraries (one on a desktop, one on a laptop and one from where I declared photographic bankruptcy a few years back), I’ve got a lot of sorting to di! How do you arrange your entire photographic history in Aperture?