Pivotal Labs

Main menu

Skip to primary content
Skip to secondary content
  • About
  • Case Studies
  • Team
    • Executives
    • Locations
      • San Francisco (HQ)
      • Boston
      • Boulder
      • Denver
      • London
      • Los Angeles
      • New York
  • Community
    • Blogs
    • Tech Talks
    • Events
  • Careers
    • Lifestyle
    • Principles & Practices
    • Benefits
    • FAQ
    • Apply
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker

Standup 11/5/2010: Happy Friday Edition

Sarah Mei
Friday, November 5, 2010

Interesting:

  • bundle install --without test excludes the test group in your Gemfile from the install. It works well for reducing the size of your Heroku slug. However, there’s a glitch with this option on Heroku — when you specify it, Heroku reinstalls every included gem every time you deploy. It does respect your Gemfile.lock, so you’re trading a smaller slug for a longer deploy.

  • Pivotal’s open source CIMonitor project now supports OpenID! Thanks Tyler and Josh.

  • Arel has a bug that makes it difficult to use in rails console. Every time you add a predicate, the number of internal objects in the Arel result increases exponentially. So, by the time you have 5 or 6 predicates, the console finishes generating the expression more or less instantly, and then spends 15+ minutes calling to_s on the resulting Arel object in order to display it to you. tl;dr: when you’re playing with Arel in rails console, end every line with ; nil to avoid having it print out the result. The exponential object explosion will be fixed in Rails 3.1.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Standup 11/4/2010: sweeping-up-the-ticker-tape edition

Sarah Mei
Thursday, November 4, 2010

Is it possible in Jasmine to spy on a getter such as myObject[key]? We want to know when local storage is accessed.

No. Jasmine‘s spyOn only works with functions, and in JavaScript getters are not implemented as functions.

Local storage has a functionally equivalent getValue function, which you can spy on, but the spy is not triggered when you access the value via [].

Interesting:

  • On unicorn, the random number generator is seeded before the fork. So if you are depending on a set of unicorns to generate different random numbers, you need to reseed the random number generator manually after the fork.

  • If you want to make absolutely sure you aren’t generating any queries in your Rails views, try no_querying_views – which explodes if your query comes from view code.

  • Other ways to track down inefficient queries that folks have successfully used: bullet and query_reviewer

  • Skype 5 beta is out for Mac, which allows group video chat. Everyone must be on the beta for it to work.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Oh look a parade!

Sarah Mei
Wednesday, November 3, 2010

Help:

Do people put bundler in the Gemfile?

Yes. Bundler is smart enough to omit it from the cache. It does, however, still follow the rules for version. We recommend using ~> 1.0.0 as the version string, because 1.x is supposed to be backwards-compatible with the current Gemfile format.

If you instead use = 1.0.0 and your managed hosting environment updates bundler to something more recent, things will ASPLODE.

Interesting:

  • Tech talk that was going to be today has moved to Thursday, due mostly to noise concerns. See you tomorrow.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Election Day Special!

Sarah Mei
Tuesday, November 2, 2010

Help:

We made a branch in git called “–track” by accident, and now we can’t get rid of it. git thinks it’s a command-line argument, even when it’s in quotes.

Here’s the command what did it:

$ git checkout -b --track origin/actual_branch_name
Branch --track set up to track remote branch refs/remotes/origin/actual_branch_name.
Switched to a new branch "--track"

Consensus: kill it through RubyMine or gitX. There is also a way through the command line:

$ git branch -d -- --track

…but make sure you get the dashes in all the right places.

Interesting:

  • reset after tail – sometimes, if your PS1 has colors (or square brackets, or … ?) you can lose your Terminal after tailing a file. To get it back, type reset, which should work even if you can’t see it echoing. You may need an extra return before it.

  • The Giants seem to have won! There’s a parade tomorrow, right in front of the office. If you’re coming for the tech talk, leave extra time as streets will be closed and they’re expecting a crowd.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Standup for St. Patrick's Day

Sarah Mei
Wednesday, March 17, 2010

Help:

  • Testing blocks. If you have a block and you want to spy on the internals as it executes, what do you do? Suggestions were:
    • Have each method called internally throw a symbol and check for that.
    • Turn it into a proc, and set expectations on that.
    • Stub the methods being called internally and set expectations on those.
    • pass the block to a spy object.

Other suggestions welcome. The project is using rr, which apparently can’t do this last option, though that would be ideal.

  • Routes in Rails are case-sensitive? /products/1/edit and /Products/1/edit don’t both resolve to the same place (unless you specify in routes.rb). Rumor has it that the RFC for URIs says that the path portion of a URL is case-sensitive, as opposed to the case-insensitive domain name.

If anyone wants to read through that document and confirm…feel free.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Standup 3/16/2010

Sarah Mei
Tuesday, March 16, 2010

Help

  • Latest Rails book? One pivot is coming back to Rails after several years away. Recommendations: The Rails Way, Rails Guides, Railscasts.

Interesting

  • The on302 callback is a myth! One team discovered that if you set a 302 (redirect) callback for an AJAX call, like in Prototype, the redirect is followed by the browser and the callback is never called. Suggestions: hack the library so that if the response URL doesn’t equal the request URL, call the on302. Or do that in your application Javascript.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Standup for the Ides of March

Sarah Mei
Monday, March 15, 2010

Help

  • One team is starting to use Sunspot and is curious about testing strategies. Sunspot provides a method that stubs out the backend, but search blocks aren’t executed, so it’s hard to test actual searching.

  • Objective C needs a BDD framework. How does Xcode magically know about OCunit? We need to hook in there to have a usable framework.

Interesting

  • Mountain West Ruby Conf was awesome.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Sarah Mei

Sarah Mei
San Francisco

Subscribe to Sarah's Feed

Author Topics

agile (7)
arel (1)
bundler (2)
cimonitor (1)
heroku (1)
git (2)
jasmine (1)
  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • Contact
  • Labs
  • Events

Contact Us

contact@pivotallabs.com
+1 415-77-PIVOT
TwitterLinkedInFacebook

Pivotal Tracker

Tracker is the award-winning agile project management tool that enables real-time collaboration around a shared, prioritized backlog.
Visit pivotaltracker.com >