October 2007 Archives

A time to revisit old gunk

Steven Bristol noted that the posted version of my “Change IM Status” script doesn’t work in Leopard. That may be as I’ve tweaked the heck out of it over the past several months but never posted the updates.

Hell, this is the first that I’ve heard of anyone else using the little beast. Cool!

What I really want to do with my IM/messaging apps is selectively block contacts programatically. This would let me build an “I’m Working” state where I could block out the world except for my immediate colleagues, for instance. Being somewhat ADD-ish (show me a developer who isn’t!) and a nearly-compulsive checker of incoming e-mail/IMs, this would be huge for me. I’m DYING for this.

Sadly, neither app seems to provide that level of event to OSA such that I could “veto” an incoming chat. I’m probably SoL regarding Skype but perhaps not so with Adium. I taught myself Objective-C for shits and giggles a few months ago after a chat with uber-hacker Marcel Molina. Maybe the Adium folks would be amenable to a new feature?

I’d still prefer for an event-based architecture where I could register my app for OSA events from Skype/Adium and use them to effect Skype/Adium.

Hrm. I wonder if iChat provides a more robust OSA model? Worth a looksy.

P.S. I’m ticked that the “Current Application” -> “Show Menu Items” feature of Quicksilver seems to be broken in Leopard. I loved this feature for blog posting from TextMate…

Posted by evan on Oct 31, 2007

Ruby East

Ruby East, on the whole, was a fine conference. I, and several other conference attendees, noted that the local Ruby conferences seem to be just that: Ruby conferences. They seem to eschew addressing Rails and prefer to discuss a wide range of topcs.

I really like this.

I was among many who expressed disappointment with the high level of abstraction in the RailsConf ‘07 talks. Very few of them got into the weeds, talked about the code, and challenged the listener technically. I’m not sure about the (extremely few) rest of you but I go to these conferences to hear what my peers are doing, why, and determine if I should consider trying new technologies and techniques. For that to occur, I need to obtain at least a certain minimum depth of technical knowledge of a topic. Hoedown (especially) and Ruby East proved satisfying in that regard.

And, of course, there was Werewolf. Travel to exciting conferences, meet new and interesting people, and lynch and/or eat them. Who would imagine that a game involving argument, bluffing, and outright coercion could be such a team building exercise? It was a pleasure meeting, eviscerating, and being eviscerated by everyone.

Anyhow, below are my notes from Ezra’s Ruby East talk – far and away my favorite talk. For more notes from Ruby East, see Giles Bowkett’s notes on Pastie.

symbol to_proc bad

yield vs. proc.call yield is MUCH faster

Ruby interpreter optimized for anonymous blocks

inject is twice as SLOW as using each for creating an accumulator. OUCH!

Ezra is using ‘benchmark’ (part of core)

=~ vs match: =~ is faster. match has to create MatchData objects

method invocation vs “send” => similar performance

positional params vs options hash => lots of overhead on the options hash (factor of 5!)

eval is expensive (makes sense)

Rules of thumb:

  • Object creation == expensive
  • Method calls surprisingly expensive

Gem: ruby-prof

  • Profiles arbitrary blurbs of code within a passed in code block
  • Graphical result representation
  • Super cool for profiling bottlenecks in applications

Merb uses about 12MB per VM Merb + Sequel =~ 17MB ActiveRecord bulks it up to 25MB

Event driven mongrel == 2x performance gain

.rubinius -dc When finishing a statement, compiles the expression and spits out the “normalized S expression”, rubinius assembly, and the byte code.

Posted by evan on Oct 01, 2007