We're going to Detroit!

January 23, 2006 Link to post  Permalink

At the halftime of the best football game I’ve ever been to, I’m heading to the fridge in the suite to get a beer, when I bump into two guys I recognize. Bill Gates and Steve Ballmer turned up to say hello to Dinarte!

They chat for about 10 minutes, drawing a crowd at the stairs that go past our suite, and then head back up to Paul’s suite to watch the second half.

We did get our pictures with them – I think my hat is the difference maker this year.

Rails named routes make refactoring a cinch

January 21, 2006 Link to post  Permalink

I have some code that needed to be refactored. I had a controller with actions that should have been somewhere else. Here’s how the refactoring went.

The key part here is the way Rails’ Named Routes make this so easy. Not a line of view code was changed.

Almost all examples of URLs in Rails code I’ve seen use regular routes, but this makes for hard to read code:


Rails Action Cache now available as a plugin

January 20, 2006 Link to post  Permalink

I’ve packaged my Active Cache upgrade as a Rails plugin.

Original post

Rails plugin page

update I’ve added two new features to this code today.

OutputCompression filter now available as a Rails plugin

January 19, 2006 Link to post  Permalink

I’ve taken the OutputCompression filter and made it into a Rails plugin. I’ve added it to the Rails plugin page (towards the botom) and have a publically available subversion repository containing the code.

This code includes the fixes by Sebastian for handling Component rendering correctly.

Bug in my memcache usage post

January 17, 2006 Link to post  Permalink

I found a bug in my setup of memcache code in a previous post. Here’s the update:

The Seahawks Rock!

January 15, 2006 Link to post  Permalink

On Saturday the Seahawks won their first playoff game in forever – woot!

Before the game, we attended a large breakfast with the CEO Tod Leiweke and President of Football Operations Tim Ruskell. Steve Raible was there too.

In addition, they had three of the Seahawks Ring of Honor inductees there – Curt Warner, Jacob Green and Steve Largent. Lisa ran to get our Steve Largent Wheaties box and had Steve sign it for us!

80 of us managed to get into a group to do the flag ceremony before the game. We went down to the field just after 10:30, and then spent 20 minutes doing a run through of the whole flag thing. Then we had to wait around on the field for the next two hours before the game.

Rails using memcache for everything

January 13, 2006 Link to post  Permalink

The Rails documentation for using memcache is a little skimpy. I eventually worked out how to use it for a Session store by googling. The Fragment cache store was a little easier.

Here’s the relevant parts of my environment.rb file:

The order of these things is important – the DEFAULT_SESSION_OPTIONS can’t be changed until after the Initializer has finished, for instance.

This configuration gives me:

WEBrick failure with large database requests

January 10, 2006 Link to post  Permalink

I tracked down a bug with WEBrick today that I reported with a patch

I think the key is that I have a few large images (60K+) being served from the database, causing the dynamic thread to run long enough for a second dynamic thread to get into trouble once a static request has cleared the REQUEST_MUTEX that is meant to keep the second dynamic request out.

The size of the image is key. This doesn’t happenn with smaller images. The database IO is probably causing the first thread to wait, causing the second to run, and its all downhill from there.

I’m using one of Rick’s snippets to apply patches to my Edge Rails.

Two topics come together - Cheese and Rails

January 6, 2006 Link to post  Permalink

Today’s Yakima Herald-Republic has an article about cheese made in the Yakima area.

Although it’s not obvious, the Yakima Herald-Republic web site is one of the early Ruby on Rails sites, written by Ezra

Cheese and Rails – can’t go wrong with either.

Running memcache for Rails sessions and caching

January 4, 2006 Link to post  Permalink

After setting up a Linux machine using these excellent instructions I wanted to expand my configuration to run some memcached processes to test session storage and caching

Having followed the original instructions, I knew that this ‘runsv…’ thing would be useful. It turns out to be something called runit that allows apps to be started, stopped, logged etc. Sounds similar in scope to Windows Services, but much easier to setup for an application.

How runit works is by monitoring a specific directory for sub-directories. For each subdirectory, it will run the run command until it exits for some reason, then it will run the finish command, and then go back and execute the run command again. If there is a log sub-directory, it will do the same in there too.