Rails Camp Three
25
JUN
RailsCamp 3 just finished, and it was another fantastic weekend of hacking with mates.
what a kerfuffle!
You’ve probably heard by now that Ben (the organiser of RailsCamp) and Kaz’s munchkin Liam came six weeks early. We’d been talking about babies coming early just the night before, since my son Toby was five weeks early. It was an eerie shock to hear that nearly the same thing had happened to Ben & Kaz! Liam is doing well, but is still in hospital for a little while.
The upshot of this twist was that Glenn Davy and I ended up running the camp. It was a pleasure as most of the heavy lifting had already been done by Ben. Thanks so much to Glenn and Ben for making the camp awesome, and to everyone else for being so easy-going over the weekend.
codings
Lack of internet is a key feature of the RailsCamp fun. To offset this, Lincoln Stoll set up a server chock full of VPS’s for hosting our apps. On top of that it served DNS and hosted gitorious. At camp it was at http://git.railscamp.net, and now we’re back its still at http://git.railscamp.net. (Some of these apps will no doubt go across to github in time).
A bumper crop of code came home from the camp this year:
- Gitjour refactor
http://git.railscamp.net/projects/gitjour
A group of guys made their dissatisfaction with the current gitjour implementation manifest by refactoring it, waay into early saturday morning.
- Gitnotify
Broadcast a growl notification each time you commit to git.
- Gitman
http://git.railscamp.net/projects/gitman
Manage your git sharing, simply. By Mike Bailey
- Swords
http://git.railscamp.net/projects/swords
A great start on a thesaurus based crossword generator. It has ascii and web interfaces.
- Duke
http://git.railscamp.net/projects/duke
The return of the network jukebox. Gaming the duke voting system provided plenty of fun for all.
Myles Byrne and I were duke’s latest developers (everyone works on duke, some time). I failed to provide events for Myles, and I’m sorry.
- bit-tags
http://git.railscamp.net/projects/bit-tags
Taggable snippets by the Brisbane boys.
- iShare
http://git.railscamp.net/projects/ishare
An app for letting know what you’d like to hear or talk about at railscamp!
- twonklist
http://git.railscamp.net/projects/twonklist
An anti-social networking application.
- Twetter
http://git.railscamp.net/projects/twetter
A local twitter. Linc pointed twitter.com at twetter so that everyone’s Twitterific just worked. Matta writes about it here
Max dropped in and wrote up a Flex based client, too.
- starjour
http://github.com/lachie/starjour/tree/master
I did some work on refactoring starjour. Still not really sure where this app is going, but it was good to see is list full of *jour services.
If I’ve forgotten any projects, let me know.
jq
I gave a talk on jQuery, which was a bit of a shamozzle as my version of firebug wasn’t playing with firefox 3. Preparation? Next time I suppose. Thanks to Hugh Evans for having a working ffx and some elegant jq code to show off.
feedback
If you have some feedback on the camp, please let me know: lachie (at) this domain.
One thing I’d like to see is some more emphasis on family at RailsCamp. Brodaigh brought her daughter Crystal to this one and Lone and I brought Toby to the first one. It adds a mellowing element to the camps that I really enjoy. And, I want a chance to beat Crystal at Set.
saving the day
When people started leaving on Monday morning, we hit a problem: someone had inadvertently taken Phil Oye’s bag.
After we’d finished tidying up and had hit McDonalds, I got a Twitter direct message on my phone from Dr Nic “what’s your ph num? we have someone’s black bag @ airport.”
I was able to put Phil in contact with Greg Fairbrother and it all ended happily ever after.
Twitter FTW
Summer 08 ? Winter 09 ?
So who’s going to step up next? Railscamp happens where ever someone organises it. It may be a structure-less weekend, but its still non-trivial to set one up If you think you’d like to give it a go, let me know and I’ll put you in touch with people who’ve done it before. lachie (at) this domain.
The guys from Brisbane are keen to put on a camp, probably in Winter 2009.
Who wants to organise an event for Summer 2008/9 ?
I love me some source
01
FEB
I don’t know if its because I’m nosy, or because I’m a control freak, or perhaps both, but I really do like to read the source code. It occurs to me that this is probably why I feel so at home in the open source world.
As much as I like something like Cocoa, it pains me not to be able to trace problems all the way down the stack. Even java solved this problem by shipping with its own source.
Proclivities aside, I really like source, and am always looking for ways to make it easier to get at. cd /usr/lib/ruby/gems/1.8/gems gets old quick.
I started with this little cough gem from Dr Nic. Integrating it with my shell, I could now type
$ gems activerecord
and up pops the activerecord gem in Textmate. So some new releases of activerecord came out, and suddenly my naive script is giving me the old version. Without looking too far into it I added gem requirement support so that I could type
$ gems activerecord '>=2'
and get a recent activerecord in Textmate. As good as this is, I was really after something with less typing and smarter pants. Well tonight I cracked it and I thought I’d open the source:
#!/usr/bin/env ruby
require ENV['TM_SUPPORT_PATH']+"/lib/ui"
require 'rubygems'
gems = Gem.source_index.latest_specs.collect {|spec| spec.full_name}.sort
TextMate::UI.request_item(:title => 'open a gem', :items => gems) do |selected_gem|
gem_path = Gem.source_index.specification(selected_gem).full_gem_path
%x{open -a TextMate #{gem_path}}
end
Honestly, that’s it! Bung that in a command using Textmate’s Bundle Editor and assign it a key (I gave it cmd-shift-G, as I don’t regularly search backwards).

Double click on one and you’re golden… neat.
Hornsby
29
AUG
A while back I gave a talk at the Sydney Rails Group about Hornsby, my plugin for example based modeling. I always meant to release it, but as it got a work out it never really gave me the satisfaction I craved.
Recently, there was an Err post about layering a DSL over fixture scenarios. The idea of an expressive DSL for setting up test or spec data was super, but I had trouble getting it to work with RSpec. Oh and fixtures? Why cling to these much maligned giblets of yaml?
So here’s Hornsby, reborn: A Scenario Builder without the fixture pain.
Read the rest of this entryIn #ror_au we were discussing using array.any? as a more elegant way of saying !array.empty?. As tempting as it is, its actually not a great idea. Read on for a better way…
serve a directory
20
NOV
Temporarily serve any directory via HTTP, with nice handling of privileged ports.
Put the following on your path in a file srv. Make it executable.
Then, just go to the directory you want and run srv
#!/usr/bin/ruby
port = ARGV[0] || '80'
if port != 'sudo' and port.to_i < 1000
puts "trying privileged port #{port} with sudo"
exec "sudo #{$0} sudo #{port}"
end
if port == 'sudo'
port = ARGV[1]
end
require 'webrick'
include WEBrick
s = HTTPServer.new(
:Port => port,
:DocumentRoot => Dir::pwd
)
s.mount("/", HTTPServlet::FileHandler, Dir::pwd, true)
trap("INT"){ s.shutdown }
s.start
