Mike Dalessio's blog



Mike DalessioMike Dalessio
NYC Tech Talk: 19 Jan 2010
edit Posted by Mike Dalessio on Tuesday January 19, 2010 at 02:19PM

Pivotal NYC was lucky enough to have Ben Stein in the office to give a beta presentation entitled "Beyond the Hype: What it Really Takes to Build a Technology Business on the Cloud". Ben has built his own successful startup, Mobile Commons, using some of the principles he discussed.

Boiled down to its essence, Ben's theme was (with apologies to Chris Carter): Trust No One.

More specifically, Ben talked about ways to build your business and technology to better handle the inevitable failures of your vendors, partners and infrastructure providers.

Technical highlights from Ben's talk included a recipe for constructing a vendor-agnostic library (heretofore known as the "Stein Stack"), and actionable rules-of-thumb to make API consumers and producers more robust and debuggable.

If you're interested in attending a future Pivotal NYC Tech Talk, please subscribe to the mailing list.

Mike DalessioMike Dalessio
NYC Standup Round-up for Dec 28th - Jan 8th
edit Posted by Mike Dalessio on Monday January 11, 2010 at 11:54AM

Points of Interest

  • Following a recipe from Dan Chak's Enterprise Rails, we came across code following this pattern:

    class Thing
      def foo
        def bar(args)
          # some code        
        end
        # some code that calls bar()
      end
    end
    

    The structure of this code suggests that bar is scoped only within the context of foo. But alas, that is not the case. Ruby simply defines Thing#bar the first time foo is called, analogous to define_method :bar. Misleading syntax, for sure.

  • Ryan Davis's Flay is awesome. If you're not familiar with it, Flay parses your Ruby and compares subtrees with each other to find where code has been duplicated (or nearly so). Run on a codebase of over 20,000 lines of Ruby, Flay was able to quickly indicate places where we had duplicate code lying around, as well as many likely targets for refactoring work. We've found it to be helpful in keeping code DRY.

  • This looks interesting: MagicPrefs gives you gestures for your Magic Mouse (Yes, Pivotal NYC has Magic Mice, as well as 27" iMacs. Apply today!).

  • In Snow Leopard, mapping CapsLock => Ctrl when two keyboards are plugged in is problematic. You can do it by plugging in one keyboard at a time and mapping each one individually. If anyone knows the story behind why this is, or how to deal more easily, please comment!

  • Another interesting link: Open Frameworks is a "creative coding" toolkit (like Processing) that's implemented in C++. Why ask why?

  • Another lesson learned the hard way: starting up a bunch of leopard machines at the same time wreaks havoc on the network for a few minutes. Packet storm, dropped packets, etc. Is Bonjour to blame? Inquiring minds want to know.

  • If you're trying to stub a subclass of ActionMailer::Base with Double Ruby (also known as RR), and you're having issues, try stubbing the method on ActionMailer::Base directly. There's some weirdness there with method_missing in Rails 2.3.

Help Wanted

  • Does anyone know how to make command-1 through command-9 switch tabs inside of Term.app? By default, these keys are bound to switching windows, and we'd love to be able to do this on tabs instead.

  • Rails's select_tag(..., :multiple => true) option doesn't properly set selected on the generated options. This appears to be a boog, and anyone who's interested in helping a Pivot write a patch, please comment below!