Saturday, May 20, 2006

I still want to make a documentary film

When I first moved to Seattle in the early 90’s, my goal was to learn documentary filmmaking and make some films about how globalism and modernization were transforming indigenous cultures. I wanted to draw attention to how there was wisdom being lost there, wisdom which modern societies should try to preserve and use to guide their direction (appropriate use of technology, maintaining balance with ecosystems and the human body, preservation of cultural history and diversity, etc.).

So I took some courses at the University of Washington, got a certificate in film and video production, and even wrote and directed a little student project short.

But this was before the days of cheap digital video production. I was short on cash, couldn’t afford any equipment, and the need for food and shelter pulled me into the 9-12 world of software development. I suppose like many others fresh out of college, I got side-tracked.

Nevertheless, the dream lives on, and every now and then I get the urge to pick up the videocam and head out the door to see what may be left of those indigenous societies in this ever flattening world.

I want to master TextMate

Sadly, my powerbook is currently kaput (I dropped it). I'm trying to decide whether to pay to fix it or just get a new MacBook. While RadRails is a nice stand-in on Windows and Ubuntu, I am going through TextMate withdrawal.

In the meantime, I can live varicariously through others.

Mike Clark has posted a nifty cheat sheet for Rails coding in TextMate.

There are several others out there:

It might be nice to collect all these into a concisely formatted little popup/tool-tip you could invoke while using TextMate.

Wednesday, May 03, 2006

Dave Astels makes some RSpec revisions

Canada on Rails was a great chance to meet some new people and pick up some more Ruby and Rails tidbits.

Dave Astels gave a presentation on the state of RSpec, which seems to be coming right along. They've made some major revisions since my previous post back in October to provide some very nice syntactic sugar. I think he's spot on with most of the changes, but I agree with what he's said about changing "should" to "must."

If you missed his presentation in Vancouver, here's a similar one on google video.

To compare the old way with the new way, here is what the spec from my earlier post would look like now.

movie_list_spec.rb:
require 'spec' 
require 'movie'
require 'movie_list'

context "An empty movie list" do

setup do
@movie_list = MovieList.new
end

specify "should have a size of zero" do
@movie_list.size.should.be 0
end

specify "should not include the movie 'Star Wars'" do
@movie_list.should.not.include "Star Wars"
end

end

context "A movie list with one movie" do

setup do
@movie_list = MovieList.new
@movie_list.add Movie.new("Star Wars")
end

specify "should have a size of one" do
@movie_list.size.should.be 1
end

specify "should include the movie 'Star Wars'" do
@movie_list.should.include "Star Wars"
end

specify "should not include the movie 'Serenity'" do
@movie_list.should.not.include "Serenity"
end

end


As you can see, they've done away with the class and method definitions, in favor or a more expressive DSL with methods like 'context', 'setup', and 'specify' to which you pass in a block of assertions. And they've removed the underscore named methods with a method chain ('should.not.be', 'should.not.include') that, while maybe a bit unrubish, you could argue reads a bit more naturally - in English, anyway.

Dave has also said that they will be porting RSpec to Java and C# at some point, though it won't be quite as pretty an API as Ruby. ;)