Nick Rutherford

GitHub has a useful page on how to install gems directly from github.

A recent OS X example is

$ sudo gem install spicycode-rcov
Building native extensions.  This could take a while...
Successfully installed spicycode-rcov-0.8.1.5.0
1 gem installed
Installing ri documentation for spicycode-rcov-0.8.1.5.0...
Installing RDoc documentation for spicycode-rcov-0.8.1.5.0...

MateWatch revisited '08

November 8th, 2008

Nick Rutherford

The Background

Recording worked hours can be something of a chore, thankfully help is at hand. Matewatch is a bare-minimum solution to the problem, providing you with the data you need (hours spent on a textmate project) and nothing more. It's free, inherently, in the sense that the Ruby code is being given away.

Ian White produced MateWatch and we use it in-house for time tracking. I haven't really used it yet so can't vouch for it, but a year on I doubt Ray and Ian would be using it if it wasn't doing what they wanted.

For installation and use instructions see the original posting

Gotcha

If you're doing this ~ now you may hit upon issues with the current Macports version of Rubyosa (0.4.0) when trying to start Matewatch.

I hit upon this error:

Library/Ruby/Gems/1.8/gems/rubyosa-0.4.0/lib/rbosa.rb:530: [BUG] Bus Error
ruby 1.8.6 (2008-03-03) [universal-darwin9.0]

Abort trap

The solution is to install an older version ruby gem and modify a source file for rubyosa to use this package instead of the most recent.

sudo gem install libxml-ruby --version 0.3.8.4 
sudo sed -i -e "s|require 'xml/libxml'|gem 'xml/libxml', '= 0.3.8.4'|" /Library/Ruby/Gems/1.8/gems/rubyosa-0.4.0/lib/rbosa.rb

My solution is from here and the issue is bug-reported here.

Nick Rutherford

A bash script to update macports system & installed ports, and the same for ruby gems.

Read the rest of this entry
Nick Rutherford

This is a really good way of doing CI testing, as when you break your spec tests you'll get notified about it by Growl, and whatever image you chose (be it Bob the builder, Mr T, or whoever scares you ;).

I stepped through this process recently and hit on some snags so thought I'd list a process here. I'm on Leopard 10.5.5 using the Apple Ruby install.

Read the rest of this entry
Nick Rutherford

This is just a quick note on how to get NTFS with read & write access installed on Leopard, and also a neat trick called SSHFS which lets you mount a remote filesystem which you have ssh access to, as if it were a samba share or similar.

This makes it trivial to send files to work, uni, etc, using a provided ssh remote login.

Read the rest of this entry
Nick Rutherford

I can't emphasise enough how useful it is to learn keyboard shortcuts, at very least for cursor navigation coupled with shift selection, if you are doing a lot of typing. My driving reason for using them is RSI evasion, but they are also just pretty damn cool to use.

I'm a recent TextMate convert, and as I pick up tricks I'll share them here. This isn't going to be a complete reference, rather it'll be things I find useful.

Read the rest of this entry

A trivial bash script

October 4th, 2008

Nick Rutherford

Over the summer I was working with another company doing some build system work, which involved a lot of shell scripting (it was more to do with integration than make).

I’ve not got to the stage where I use Ruby on a daily basis for everything yet, which is where I used to be with Java (which was horrible for it!). Currently the weapon of choice is bash scripting, alas, I don’t have my handy O’Reilly book to reference anymore and I’m starting to forget things. Man pages and Google go a long way, but the reason I got the book in the first place was to save time!

Anyway, here’s what I’m using to update all my textmate bundles, which are a mixture of svn and git repos. Usual disclaimer: Y.M.M.V., don’t use it to baby-sit your kids while they play in traffic, etc. An obvious flaw with it is if git or svn fails you won’t get any feedback about it, and if the svn message changes it’ll stop working!


#!/bin/bash
cd ~/Library/Application\ Support/TextMate/Bundles/

export LC_CTYPE=en_GB.UTF-8

for f in ./*; do 
    cd "$f" #enter bundle dir
    echo "Updating $f" 
    git pull &> /dev/null \
        || svnres=$(svn update) \
        && [[ $svnres  = "Skipped '.'" ]] \
        && echo "*** Failed to update $f (is it a local setting not a repo?)" 
    cd .. #return to bundles dir
done

Feel free to comment / improve / re-implement in Ruby.

Nick Rutherford

This isn't really a web issue, but it's not something I found any help with on Google so I thought I'd share here (as we are Mac users at ArDes).

I recently installed Matlab for Uni work and it wouldn't load, seemingly with Java issues, complaining of being unable to load a native library. I then noticed that Vuze and TuxGuitar also wouldn't load, yet I could run a simple Java application I'd written without error.

This was odd, and worried me. However, it turned out to be quite simple, and something I'd caused myself by trying to be clever. It's to do with the Leopard Java 6 runtime environment which you may have installed as an update a few months ago.

If after doing this you may have gone into Java Preferences and told it to use this new runtime environment as the default things probably stopped working. The trouble is it's 64-bit only, which causes compatibility issues with 32-bit code (such as the windowing/graphics library SWT that you see in many applications).

Symptoms

  • Java applications won't load
  • Error -10810 given in console when using open -a /Applications/appname.app and elsewhere
  • Reports of 64bit SWT issues in the Console (which you can find with spotlight, in /Applications/Utilities/ )

Console log content

  • [JavaAppLauncher] A 64-bit JVM is available for 1.6.0
  • [JavaAppLauncher] and it is the only version available
  • [JavaAppLauncher] JVMArchs not found in Java dictionary
  • java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM

Solution

Search for Java Preferences in spotlight (/Applications/Utilities/Java/ ) and when it loads set Java version back from Java SE 6 to J2SE 5.0 Make sure that you put 5.0 above 6.0 (64-bit) for applets too or you'll have the same problems with things like the Matlab student product activation applet.

Good luck!

Nick Rutherford

If you find yourself in Oslo and in need of net access head for Rooster Coffee, in the old Østbanehallen (train station), which is by the current central station you get from the airport. Big orange building, hard to miss it.

There’s a few open net’s there ran by bars, sandwich shops, and the coffee shop itself. The coffee’s some of the best in the city too!

Myself and the friends I’m visiting seem to end up here a few times a week whenever I am here, usually for the coffee, but this time the net’s been invaluable for checking emails and getting hold of bits and pieces like the Prototype javascript library.

Developing offline makes you appreciate how valuable online resources are, and how downloadable manuals seem to have fallen out of use. wget helps, but only so far.

I should probably introduce myself too. As Ray mentioned previously I’m a student at the University of Sheffield studying Computer Science, which also includes aspects from A.I. and software engineering. The ArDes position is a great opportunity and I intend to make the most of it, Ray and Ian’s choices of method and technology for web design are in agreement with what I’ve studied, which isn’t always the case in industry, alas.

I’m new to Ruby, but finding it a nice language, and am gradually losing my affection for Java – expressive code is lovely to work with.

My current reading material is on Prototype and Script.aculo.us. I find it amusing that there is a need for Prototype to abstract away the browser idiosyncrasies, better that than tears.

Battery failing, time to catch a train. Toodles.

Welcome, Nick!

August 28th, 2008

Ray Drainville

As I mentioned previously, we’ve been incredibly busy over the past several months. In fact, looking over the course of nearly a year, we’ve not just been working full-tilt, but at some level far past that. Some time ago, we realised that we’ve been working to the point where we’re just going to fall over unless we expand.

To that effect, we started searching for someone to join our team. Enter Nicholas Rutherford, who will be joining us in a trainee position at Argument from Design. He’ll be working under Ian White on programming jobs.

For a student, Nick already has a lot of real-world experience in the industry. We hope to add to that experience by exposing him to the rigours of working with Ruby on Rails within the Agile Programming methodology that has served us so well for the past few years. Speaking more concretely, in addition to the aforementioned Ruby on Rails work, he’ll be using Ian’s powerful resources_controller and getting used to Test & Behaviour-Driven Design with RSpec & unobtrusive Javascript development using LowPro. Finally, we’re also encouraging Nick to blog about his experiences as he works with us.

So welcome, Nick! We hope you enjoy writing tests for stuff you haven’t written yet :)