Hi, I'm Bruce Williams.

Donate through Pragmatic Studio(2007-05-18)

This morning at the RailsConf welcome talk, Chad gave an impassioned speech urging conference attendees to help “change the world” by donating to charity through Pragmatic Studio. Pragmatic Studio, known for their excellent commercial tutorials, raised over $10k through donations by attendees of their Guidebook yesterday.

This is something anyone can participate in, whether you have the opportunity to attend RailsConf or not. How much money can the community, as a whole, raise?

Donate at http://pragmaticstudio.com/donate/

When "V" is for "Vexing"(2007-05-18)

For those looking for the slides and code examples from the tutorial I presented with Marcel Molina, Jr on Thursday at RailsConf:

Here are the slides in PDF format; I’ll be posting the code for the folder_for controller DSL sometime later in the day. If you have any questions, comments, or just want to chat about the ideas that were covered, see my “contact information:/contact (or just catch me at the conference).

A few people have asked how to get the code for the Stencil Plugin that was mentioned; you can check it out via RubyForge SVN (YMMV; keep in mind it’s still somewhat “pre-release” a this point).

  svn co svn://rubyforge.org/var/svn/stencil/trunk stencil

fast_forward 1.0.0(2007-05-14)

Just a note that I recently released a new gem, fast_forward, which adds support for delegation of all missing methods to another object, and does a bit of dynamic method generation to reduce overhead for subsequent calls. The API looks something like:

class Foo def some_foo_method "Hello" end end class Bar fast_forward_to :@foo def initialize @foo = Foo.new end end

(Note I could have used fast_forward_to :foo if there was an attr_reader for it)

Now, if I create a Bar instance, I can call Foo#some_foo_method transparently using Bar#some_foo_method:

bar = Bar.new bar.some_foo_method => "Hello"

What’s cool with this setup is the fact that methods are added automatically to the delegating object when they’re invoked for the first time—future invocations don’t need to check up the object hierarchy and resort to method_missing:

bar = Bar.new bar.respond_to?(:some_foo_method) => false bar.some_foo_method => "Hello" bar.respond_to?(:some_foo_method) => true

fast_forward is a small library—but the concepts rolled into it have been pretty handy for me in recent projects.

Broccolini Cous Cous(2007-04-23)

This is a quick on-the-fly recipe I created for lunch today, with mixed Indian/Arabic flavors. Broccolini is a recent addition to my refrigerator; it’s a broccoli/chinese kale hybrid, sweeter than broccoli, and can usually be found packaged in small trays somewhere near its cousins in supermarkets (especially organic stores, though I buy mine at Safeway).

2 tbsp olive oil
1 tsp cumin seeds

Heat oil on high in a saucepan, add cumin seeds and cook until browned.

5-6 stalks broccolini
1 shallot, minced
1 pinch kosher salt
1 1/4 cup water

Add broccolini to saucepan, quickly turning to coat. Stir fry for a few seconds, then lower heat to medium. Add water, shallots, and salt. Cover and cook for for 3-5 minutes.

About 3/4 cup uncooked cous cous
1 tsp tumeric
Sumac
Kosher salt

Uncover saucepan and remove from heat, adding enough cous cous to soak up the water. Add tumeric and mix.

Plate and sprinkle with sumac and salt to taste.

An tv Aside(2007-04-20)

I love my tv, but here’s a tip: use the Photo screensaver option very carefully.

Recently, when I was in Texas, I took a day trip out to the graveyard where some of my family is buried (4-5 generations back), and took a few pictures for relatives.

Seeing the gravestone of your Great-Great-Great Grandfather float by (though very prettily) in the midst of a particularly rockin’ song totally kills the mood, I promise.

Another Day, Another Language(2007-04-20)

The smart folks over at Pragmatic Programmers have done it yet again… I’ve bought another book from them; this time it’s Programming Erlang in the wonderful Beta Book format—how wonderful is it that we developers, mostly an impatient lot to begin with, now don’t even have to wait for a book to be published to start reading?.

Back a few years ago (2002, it seems), I took part in the Language of the Year project, and it really changed my feelings about language learning. Someone that had always been interested in languages, be they natural or … unnatural, I’d already been bouncing around from one programming language to another, but I had this slightly erking feeling that it was a bad idea and that it made me a bad developer. After all, couldn’t I just stick with anything? Was I destined to be a mere dilettante, completely without “professional” focus?

After LOTY, I felt completely vindicated. Through the experience, I came to fully appreciate the reason I love to learn new languages, and how valuable allowing myself to try them out can be. It’s made me a much better developer than if I had just put my head down and let Ruby fill my entire universe—what a shame it would have been without Haskell, Erlang, Smalltalk, OCaml, Io, Lua, Self, et al to help me see the different approaches, new possibilities, and beautiful variations in technique that I’ve been able to incorporate into my problem solving process, code, and outlook!

So, it’s time to revisit Erlang for a bit (along with several others I’ve spoken to recently and read), and nothing makes me more happy at this moment than finding the perfect book to help.

iStalkr(2007-04-02)

An interesting web application that recently popped up into beta is iStalkr, a “social feed aggregator” which allows you to add your RSS feeds to your profile (ie, for me that would be this blog, twitter, flickr, last.fm, delicious, and others), and follow your friends’ without the need for manual intervention (since they manage their own lists). Shareable, personal aggregation, I suppose.

Has anyone seen a similar concept? I think it’s pretty neat.

Hotkey Plugin(2007-03-27)

Rails Plugin Name RubyForge Project
hotkey hotkey

Rails plugin to allow javascript-based hotkey assignments to remote and client-side actions.

param_types(2007-03-27)

Rails Plugin Name RubyForge Project
param_types param-types

Param Types is a Rails plugin that add support for user-defined, on-the-fly param hash manipulation, useful for transforming simple data into more complex objects (dates, etc).

RTex(2007-03-27)

Rails Plugin Name RubyForge Project Documentation
rtex rtex View

A template engine allowing the inclusion of ERB-enabled TeX template files.

The resulting tex is passed through pdflatex and generates a PDF file for the user.