Article  |  Development

OS X Mavericks, failing specs and libxml

24 Oct 2013

After an OS X upgrade from 10.8 to 10.9, I noticed some previously-passing Capybara specs were failing. The failing specs all shared a similar structure:

  it 'should show some text in the 2nd tr' do
     visit some_path
     page.should have_selector('tr:nth-child(2)', text: 'some text')
  end

Notice nth-child pseudo-selector; this seemed likely to be involved as other specs using have_selector with plain class selectors continued to pass.

I applied a number of patches that folks seem to be performing on their new 10.9 installs (installed XCode 5.0.1 and then dev tools via xcode-select --install, running brew updates, etc) and nothing changed. What led me to a solution was this Nokogiri Github issue from the Mountain Lion release:

https://github.com/sparklemotion/nokogiri/issues/742

I ran one of my failing specs with the DYLD_PRINT_LIBRARIES=1 flag mentioned in this issue:

dyld: loaded: /usr/lib/libxml2.2.dylib
dyld: loaded: [repo]/vendor/ruby/1.9.1/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin13.0.0/libxml2/2.8.0/lib/libxml2.2.dylib

As the issue suggests, I added a reference to Nokogiri directly below Rails in my Gemfile (it did not have an explicit reference in the Gemfile before this). After that, I see this load order:

dyld: loaded: [repo]/vendor/ruby/1.9.1/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin13.0.0/libxml2/2.8.0/lib/libxml2.2.dylib
dyld: loaded: /usr/lib/libxml2.2.dylib

With the libxml dylib loaded first from the bundled Nokogiri, my specs pass again.

Continue Reading

Article  |  Development

Neil's Three Favorite Wicked Good Ruby Talks

21 Oct 2013

Last week Neil ventured to Boston for the inaugural Wicked Good Ruby Conf, an event drawing technologists from many disciplines who share a common trait: it was for those who love Ruby and use it to get work done. The two-day, two-track event provided a rich array of talks, from the pragmatic and studied, to the irreverent, theoretical and forward-looking. It speaks to the ambition of the conference that within its span, one could learn how to fine-tune a Rails backend, learn the innards of a linotype machine, use one language to bridge the chasm between desktop and mobile, predict capital market behaviors, and see how JRuby might come to eat the world. Here are his favorite three.

  1. MRI Magic Tricks by Charlie Somerville

    A hacker's hacker, Charlie used his time to decimate the Ruby language, peeling off the layers of the MRI implementation and revealing what it takes to build a dynamic language with the flexibility and power of Ruby. His initial caveat of "Don't try this at home" set the tone, as he proceeds to exhume the secret core classes of MRI, and use his findings (with some clever dynamic programming) to redefine some of the language's most basic behaviors, such as hash construction and method aliasing. He concludes by rewriting class hierarchies at runtime and patching the language to rescue itself from pesky segmentation faults.

  2. RubyMotion: Under the Hood by Joshua Ballanco

    Joshua's talk was the kind that adds to the depth and breadth of your knowledge. He uses RubyMotion, the increasingly popular iOS development platform, to convey some of the core abilities and limitations of code execution on desktop and mobile devices. He details the work that went into MacRuby on the OSX platform, highlighting the balance achieved through direct source compilation and the OSX Ruby VM. He then notes why RubyMotion relies on direct compilation alone: the memory isolation inherent in iOS. Meanwhile, we learn some of the nuances of garbage collection and reference counting on those platforms, and when one would need to be explicit in writing mobile Ruby code that interacts pleasantly with ARC. The power of these parallel platforms becomes more clear as he hits the REPL to express the same objects in both Objective-C and Ruby.

  3. Understanding Ruby's Method Cache by Rachel Myers and Sheena McCoy

    As as web developer, you typically would spend your time optimizing for reduced network and backend invocations, and so it was a nice break to get an introduction to language-level caching with Ruby. Rachel and Sheena led us down this path with a sense of humor and copious Jurassic Park references. We start with method-caching (or lackthereof) in Ruby 1.8, how everything changes in 1.9 with the merge of of the YARV implementation, and what lies ahead for more advanced, context-sensitive caching. Tips to avoid invalidating your cache are presented (hint: don't go crazy with define_method, alias_method, openstruct, refinements, etc), and we get a clear picture of how Ruby is evolving alongside its big-brother languages.

Continue Reading

Article  |  Development

A chat with Ken Stowell - local Javascript expert from Metal Toad

7 Oct 2013

I’ve been scouring the internet to find some folks in our fair city of Portland, OR who are willing to talk about their developer experience.

I was lucky enough to connect with Ken Stowell of Metal Toad Media. Metal Toad Media has an agency here in Portland as well as L.A. and San Francisco.

Ken lives here with us in Portland and was happy to answer my questions. I was hoping to learn a little more about Javascript developers and how developer interns like me could find our way into the industry.

Ken Stowell

Continue Reading

Quote  |  Strategy

Ambiguity

17 Sep 2013

Take advantage of the ambiguity in the world. Look at something and think what else it might be.

Roger von Oech

Quite often, we're approached by clients with a very specific idea in their mind. It's our responsibility to question it, tinker with it, evolve it, dismiss it, embrace it, and show them what we see it as. This process is riddled with ambiguity--until something comes to life that we can see and touch, both parties rely on trust. Trust that has been nourished throughout the course of our relationship. If our client doesn't believe that we'll act in their best interests, we'll never be able to make this journey through ambiguity together.

Article  |  Studio

I Survived the Company Picnic and All I Got was this Lousy T-Shirt

6 Sep 2013

I received the honor to design this year’s company picnic t-shirt. Of course, the first thing I thought was “Oh crap, I draw and make art outside of work all the time, but in my happy little sketchbook that no one has to see. Now I actually need to follow through with an illustration that people would actually want to wear?? Pressure is on…” Hmmm. What to do, what to do?

Continue Reading

Article  |  Studio

Remembering Our Mentors

4 Sep 2013

Having our recent 14 year old intern, James, got us thinking about the people our team looked up to in the early stages. I asked some of the folks here in the studio to think a little bit about the people who were inspirations and guides to them throughout their lives and/or careers.

Continue Reading

Have a project that needs help?