Archive for May, 2008

RailsConf 2008 Part 1 (Quotes)

Posted in Development, Zen with tags on May 31, 2008 by osake

RailsConf this year has been a lot better for me than last year.  I’m actually talking to people…crazy, I know.  The talks have been hit-or-miss for me just like last year.  I think it still lacks the extra Lightning Rounds.  But enough of that.  Here’s some quotes that I really liked.  I’ll apologize now if they’re not exactly what was said, but I believe they still convey the points:

Developers can write documentation that is comprehensive, not comprehensible. —Jim Weirich

Programs that are hard to write should be hard to understand. —Jim Weirich

People like choices a lot better than actually having to choose. —DHH

While talking to Jim, we were discussing documentation and the end-user.  This discussion spurred his two quotes.  Lastly, anyone attending tonight’s keynote likely picked up on DHH’s (no I won’t spell his name out) quote.

I guess I could stop there, but I just wanted to add that Joel Spolsky of did a fantastic job of getting the main conference started.  He was a hoot.  Let the Angelina Jolie jokes run freely now that he’s broken the ice.  And with that said, I’m headed to bed.


Ferrets Gone Wild

Posted in Development on May 21, 2008 by osake

Sometimes, acts_as_ferret can get a bit squirrely. I’m talking about a helper in a Ruby on Rails application in case you’re lost. The problem I had was that my index was jacked up. So what do we need to do about it? Rebuild the index! It’s the only option that I know of right now.

Two options that I’m clued into:

1. Nuke indexes out of the index directory
2. Call the class method rebuild_index

So what I did first was option number one. I didn’t really like that, although it is definitely easy. But I don’t want everyone doing that option when the application is being maintained down the road. The I’m not sure how root access or file privileges are involved either, but I’m betting that number two is going to work for you if you’re an application maintainer.

I want a rake task for option two. We know that rake can use ruby, so let’s do it. In your application’s lib/tasks directory, create a .rake file. Let’s call it utils.rake. It’ll be useful later on if you have other utility-type tasks that you might want.

Inside this file put:

namespace :utils do
  namespace :ferret do
    desc "Rebuild the ferret indexes for Kodo and Podo"
    task :rebuild => :environment do
      [Kodo, Podo].each do |klass|
        puts "rebuilding the Ferret /#{RAILS_ENV}/ index for : #{klass}.."
        puts "  done."

Dar would be proud. The only real improvements might be to detect which models utilize acts_as_ferret and some error handling.

Indy 4

Posted in Movies, Rant on May 21, 2008 by osake

Indy, indy, indy, indy, indy, indy…

…I can’t wait. Like the masses of Indiana Jones fans who don’t really care about the quality. It’s another moment for us to enjoy another page in this character’s life.

Hey, Star Wars Episode 1 wasn’t that bad. I’m not a Jar Jar fan, but there are moments in that film which I still like. So if Star Wars wasn’t a total ruinous mess, then neither will the Indiana Jones sequel be. Besides, this should be the last go for ol’ Ford.

I will boycott any Shia Lebeouf follow-up stories though. River Phoenix covered the prequel series on TV and I’m not asking for anything more than one last “hurrah” from Harrison Ford.

Square Peg, Round Hole

Posted in Food on May 7, 2008 by osake

I normally don’t enjoy burgers (or sandwiches to be more general) where the meat doesn’t look at least somewhat befitting of the bun. Yeah, it’s fun to go to a home cookin’ restaurant and eat a pork tenderloin that is larger than the plate, yet sits between slices of a White Castle bun. It’s smashed meat, what do you expect in that case?

Wendy’s has square patties, and I don’t really care, they’re not too crazy with the 2-dimensional properties, they prefer to “wow” you with the girth on the z-axis.

Enter Burger King’s Steakhouse burger. It’s hilariously huge. Completely unfit for on-the-drive consumption. But overall, the flavor was fun…like the commercial where people are wrecking their cars to get one. They even make one with mashed potatoes on top. It’s madness I tell you! That’s not even the end of the insanity. It’s a square burger.

Okay, I can breathe now. I did enjoy it. It was fun to eat (as long as are sitting at a table). Rickshaw out!