Archives for March 2008

Github changes the way I work

Github really is a game changer.

Being able to put up my code without having to worry about how other people will be able to use it, because they can pull it, fork it, do whatever. It makes it a no-brainer to share it and I'd rather share it (for what it's worth) than not.

So here are my current projects:

I have some other bits and pieces that have been lurking in private svn repositories that I will add as I go.

26/03/2008 21:19 by Matt Mower | Permalink | comments:

Ye olde Wii

New products, olde style advertising. Some wonderful designs here.

26/03/2008 08:29 by Matt Mower | Permalink | comments:
More about:

Farewell Arthur C. Clarke

To be honest I was never a huge fan of Clarke's writing. I like characters and, in the books that I read at least, I often found his characters were too much servants to his ideas. But then his ideas were often so grand that maybe this was inevitable.

What I can't and won't argue with is the man's influence and the breadth of his knowledge and curiosity. Also his sense of humour. I particularly enjoyed this entry from his log kept during the production of 2001:

November l0. Accompanied Stan and the design staff into the Earth-orbit ship and happened to remark that the cockpit looked like a Chinese restaurant. Stan said that killed it instantly for him and called for revisions. Must keep away from the Art Department for a few days.

2001 remains, for me, a towering achievement. It saddens me a little that, instead of the exploration of the stars, mankind seems fixated on squabbling over earths resources.

19/03/2008 09:47 by Matt Mower | Permalink | comments:
More about:

The power of iTunes

The rot started a couple of weeks ago when Bethlet wanted me to hear a track (Maybe You Could Owe Me by Architecture in Helsinki -- I rather liked it) that she'd gotten from iTunes and, being DRM protected, she couldn't share it with me.

It being only £0.79 I went ahead and bought it from the store myself. I'd had to configure the store to pay for the iPod Touch Software Update so I was already setup. This turned out to be a big mistake.

Today I decided I really wanted to listen to Holst's The Planets suite. I haven't heard it for years and given how much I am enjoying listening to the Gladiator soundtrack (which was the subject of a legal wrangle over its similarity to the Planets) I thought it would be nice to listen to it now.

iTunes had 3 versions including Sir Simon Rattle conducting the Berlin Philharmonic which seemed to get rave reviews. So I clicked "Buy Album" and it's downloading now. It's just too easy, easy enough to overcome my dislike of DRM protection.

I'm going to try and curb that and not buy any more DRM protected music but it just goes to show how powerful a weapon iTunes is.

17/03/2008 14:45 by Matt Mower | Permalink | comments:
More about:


I'm 36 today.

I'm not sure why but even ages are more comforting to me so I'm not too bothered by being 36 rather than 35. I have a nice day planned going out with my Dad to London for dinner and then being in the audience for a recording of Hudson and Pepperdine. I've never actually listened to their show but Dad thinks they're funny and we share a lot of comedy taste.

The last year has been a pretty good one for me. After spending some time in the wilderness I find my shit is a little more together. Starting karate has been a big part of that so in a sense I am also very grateful to my Sensei Richard Hughes for making his dojo a place I want to be every week.

I've other, more personal, reasons to be grateful about the last year and to be hopeful about the future. I won't go into them here but I can say that I am looking forward to being 36 in a way I never think I was about being 35.

And to everyone else born on St. Patrick's day: Here's to you! Here's to us! Happy birthday! I hope it's a good one!

17/03/2008 14:29 by Matt Mower | Permalink | comments:
More about:

Announcing godo

A while ago I wrote about a script I'd written that I called gp which addressed a frustration I had about, essentially, starting work. What gp did was eliminate all the drudgery involved with opening iTerm tabs (yes I still use it in preference to despite it's occasionally freezing up for a few seconds under Leopard), changing directory to my project folder, and running lots of different commands for editors, browsers, version control, and so on.

The gp script had many deficiencies, some of which were addressed by Solomon White who made his own version that worked with But neither script was ideal and we agreed that, at some point, it would make sense to pool our efforts.

Pressure of work meant I didn't look any further at it until last weekend when I found myself compelled to build a new version of gp which I have called godo which stands for:

go (to project) do (stuffs)

So you might type:

godo godo

and godo would search among the project root folders you had defined for a likely match, then using heuristics identify it as, say, a ruby project, and run a set of actions defined for ruby projects. The heuristics are pure ruby expressions, here is the heuristic for detecting a rails project:

rails: |
    File.exists?( File.join( project_path, "config", "environment.rb" ) ) &&
    File.exists?( File.join( project_path, "config", "environments", "development.rb" ) ) &&
    File.exists?( File.join( project_path, "config", "environments", "test.rb" ) )

the default configuration comes with heuristics for Rails, subversion, git, and rspec and a set of actions that you might want to perform in various combinations. New heuristics, actions, and groups can be specified right into the configuration. Alternatively a per-project configuration can list a custom set of actions to be run for that project.

When writing godo it was important to me that it be a gem from the start so I turned, once more, to hoe when building it. I've tried to address all the issues that had made gp unwieldy like it's use of a pre-built folder index (that was never up to date), the clumsy configuration, and the lack of separation from iTerm. This last turned out to be very useful.

This was also a good opportunity for me to test out GitHub. From the beginning I made godo available as a GitHub project. I was surprised and delighted when Lee Marlow forked godo and pushed up a bunch of changes including support, depth pruning, and per-project configuration.

It meant I had to figure out how to add Lee's repository as a remote with a local tracking branch:

git remote add lmarlow git://
get fetch lmarlow
git branch --track lmaster lmarlow/master

take a look at the changes he'd made:

git log -p master..lmarlow/master

then merge them into my own branch for release:

git merge lmaster
git push origin master

I might have preferred to cherry pick his changes and integrate them separately but it felt like a bridge too far, for me, in Git terms. I was just pleased finally to have his changes integrated.

godo is, i think, more or less ready for serious use. If you want it:

sudo gem install godo

to get the latest version (1.0.5) which supports both iTerm and Terminal. If you like it please leave a comment or something. And if you find bugs or missing features, you are welcome to fork the project and push some changes!

My thanks to Lee Marlow & Solomon White for their contributions, and to Tom Copeland for resolving the RubyForge pickle I created for myself.

14/03/2008 13:51 by Matt Mower | Permalink | comments:
More about:

Little flies

Steve Dekorte quotes Honore de Balzac:

Laws are spider webs through which the big flies pass and the little ones get caught.

And let's not get started on the flies having to pay the spiders to build webs.

13/03/2008 08:04 by Matt Mower | Permalink | comments:
More about:


Okay suppress your gagging reflex. Ick is actually the Invocation Construction Kit by Reginald Braithwaite which is a kit for building language abstractions like #andand, #if_not_nil, and #try in a more structured way.

For example a common pattern in code is:

x = some_expr
do_something_with( x )

There's nothing inherently wrong with this code but it leaves x in scope past the point where it's needed and, implicit in that, is that it's a little harder to separate the expression using x from the code around it if we want to refactor it later on.

Ick defines #let() for exactly this purpose:

let( someexpr ) { |x| dosomething_with( x ) }

In this example it's very clear what the required scope is for x and that it can be moved without affecting other code (obviously taking into account if the return value for let is used).

Now lots of people are defining methods like #let and #maybe, so how is Ick different? It's different in the way #let is defined:

class Let < Base
  evaluates_in_calling_environment and returns_result

There is some magic going on by which this Let class is used through a method on Object but ignoring that, the definition of #let is in terms of fundamental operations of evaluation. Ick has abstracted what it means to evaluate an expression.

By the same means other forms such as #try and #maybe are built up. If you want to create a new abstraction you can build it from the building blocks like evaluates_in_value_environment and create new building blocks.

Ick seems to me to be a very powerful tool for Ruby programmers.

11/03/2008 15:23 by Matt Mower | Permalink | comments:

Morpho what... never mind, me want!

Morphogenesis Chaise

11/03/2008 15:00 by Matt Mower | Permalink | comments:
More about:

Selecting for deaf children seems crazy to me

Listening to Radio4 this morning there was a debate about IVF and screening and the suggestion that a deaf couple might want to screen their embryos in order to select for a deaf child. This sounds crazy to me.

Hearing is a normal, useful, sense. We talk of "hearing loss" because it means a diminution of something useful. Why would you wish to deprive your child of the power of easy conversation? Of the love of music? Of all the advantages hearing brings. Being deaf may have some compensations but do they really equate to the wonderful ability to hear?

And what do you say to your child? How do you tell them that you deliberately insisted that they be deaf. Okay you are selecting among embryo's, this child was always - if born at all - going to be deaf. But that's going to be little comfort, I think, to a child who will wonder if it could have had hearing but was denied it.

I'm not saying it's wrong or trying to condemn deaf parents. I'm sure they feel it's right somehow. But I definitely don't understand it.

11/03/2008 10:16 by Matt Mower | Permalink | comments:
More about:


I'm happy today and it's not just because I was listening to the excellent P.J. O'Rourke on Radio 4 this morning (His descriptions of Hilary Clinton as "America's ex-wife" was spot-on).

10/03/2008 08:54 by Matt Mower | Permalink | comments:
More about:

Switching to git (almost)

I've been slowly switching my version control allegiance from Subversion to Git such that, at this point in time, when I start a new project my inclination is to type git init and not try and work out where my personal svn repository is these days.

In the case of we've used Subversion because it was easy to get everyone who needed to be involved in the project using it. But as things have gotten more complex I have come to wish that I could be using Git myself.

So, today, I finally had a crack at git-svn and checked out a git working copy of the application. Typing git checkout -b update-rpm-agent was certainly a happy moment.

But then it dawned on me that I was about to update a plugin and for plugins in svn repositories (i.e. most of them) I use piston to manage the external dependency. But my working copy was no longer an svn working copy, piston was lost, and where was the existing dependency data for the many plugins I already have?

I've googled but haven't come across anything too promising. The closest I found was an article about converting svn:externals to git submodules. I won't even pretend I understood how that was going to work.

Now it's a cheap, polyester shirt, kind of solution but it occurs to me that I still have my svn working copy. I could just go back to that and use piston to update my plugins. Check that in, then go back and git-svn rebase (is that the right?) to pick up the changes in git.

Essentially continuing to manage my vendor externals using native svn and manage the application code in git.

Unless there is a better way today..?

05/03/2008 09:44 by Matt Mower | Permalink | comments:

Someone burned all my teddies

Eddie loves you is a hilarious disturbing movie from Darkline Entertainment. Well worth a watch but if you have kids who loved stuffed toys you might want to give it a miss ;-)

I came across it via fellow Rails dev Alan Bradburne about whom, more later...

04/03/2008 15:12 by Matt Mower | Permalink | comments:
More about:

Another day, another belt

Yesterday was my green belt (6th kyu) grading in Shotokan karate.

This being my fourth grading I was a lot less nervous generally although my ushiro mawashi geri (reverse roundhouse kick) still being very much a work in progress meant I wasn't entirely relaxed and confident.

Nevertheless I was good enough on the day and now sport a green belt which looks, I have to say, pretty spiffy compared to mustard yellow one it replaces!

I notice it's also getting on for a year since I started practicing karate. I think it was March 13th 2007 that I went to my first lesson as a very wobbly white belt. Wow... a year. It's flown by.

I must be having fun :-)

My thanks go again to Sensei Richard Hughes whose classes I attend in Maidenhead and Woodley each week.

03/03/2008 19:41 by Matt Mower | Permalink | comments:
More about: