Justin Richard's blog



Justin RichardJustin Richard
Standup 5/3/11 - It's Tuesday All Day
edit Posted by Justin Richard on Tuesday May 03, 2011 at 02:12PM

Interesting

  • Check your instance variable and methods names for conflicts with libraries or frameworks you are using if you get unexpected failures

    Example 1: defining @response in your RSpec test setup when expecting to use the response from a HTTP request overwrites the result of the request. (don't expect @request or @url to do you any favors either)

    Example 2: Don't define a #process method on a Rails controller

  • SF Dev Ops meetup is tonight

Help

"What's a good way to disable/enable features in an application? Sometimes our client needs to deploy, but not enable all the currently in progress features."

It was recommended that you make branches in your source control manager for features and avoid global variables to use and switch on in your code.

"How are others authenticating requests to their API?"

One team uses Mashery to manage the public facing connection points to their API. Mashery manages the developer API keys, authentication, response caching and metrics. So far it's worked well for them.

Interesting

  • bunny is a gem that does synchronous pub/sub to an AMQP server. It provides and exception on failure when the server is unavailable. The asynchronous amqp gem silently fails when the AMQP server is unavailable.

Justin RichardJustin Richard
Standup 7/16/2009: Palm Mojo SDK now available to everyone
edit Posted by Justin Richard on Thursday July 16, 2009 at 09:57AM

Interesting

  • The Palm Mojo SDK for webOS is now publicly available. Go try it out for yourself and create your own app for the Palm Pre.
  • Rails does not do class preloading if cache_classes is set to false. This is what you'd expect in development mode, but it also effects test, staging and production modes!

Help

"How to modify a URL with rack middleware before it hits rails routing?"

Interesting

  • The latest versions of webrat, selenium-client and cucumber gems all work together out of the box now. The only caveat is the latest webrat (0.4.5) hasn't been packaged as a gem yet. Until the official one is available you can use pivotal-webrat. It's a gem of the latest webrat.
  • Test pollution between RSpec examples was observed when two sequential examples in the same describe block depended on rails flash messages. Moving each of these examples into their own respective describe block eliminated the cross test pollution. This seems to be a bug in RSpec.

Ask for Help

"How have others effectively tested their code that uses Event Machine?"