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

Monthly Archives: August 2010

Davis W. Frank

Standup 2010.08.06: Evil Scopiness Edition

Davis W. Frank
Friday, August 6, 2010

Interesting Things

find_in_batches has Evil Scopiness

ActiveRecord::Base#find_in_batches() (and therefore #find_each()) is applying a scope around the block it is given, which applies to any subsequent find call on that model:

Let’s say we have a Comment model that act_as_tree so comments can be threaded. In the following code:


Comment.find_each(:conditions => "comments.state = 'published'") do |comment|
puts comment.parent.content
end

The association call to .parent will also have the scope {:conditions => "comments.state = 'published'"} applied to it. This can have highly unexpected side-effects.

The way to get around this is:


Comment.find_each(:conditions => "comments.state = 'published'") do |comment|
Comment.with_exclusive_scope(:find => {}) do
puts comment.parent.content
end
end

Easy Ruby profiling

If you’re profiling Ruby code often, here’s a code snippet that can be useful:

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Abhijit Hiremagalur

Standup 08/05/2010: ‘bundle check’ and Websockets

Abhijit Hiremagalur
Friday, August 6, 2010

Ask for Help

  • How to specify compile flags when installing the mysql gem with Bundler 1.0.0RC1?

Don’t. Instead use version 2.8.1 of the mysql gem and ensure mysql_config is on your PATH.

Interesting Things

  • The team whose CI build was running Bundler too many times addressed this by wrapping bundle install in a conditional using bundle check.

 

This saved about three minutes of build time (from what used to be 11ish runs of bundle install instead of bundle check.)

  • Websocksets are easy, use them if you need to ‘push’ to your webapp and your server can handle many persistent connections.

This was in reaction to some recent conversation between Pivots about Pusher, which will keep persistent connections on your behalf.

This said, here’s a quote from websockets.org:

WebSockets represent an alternative to Comet and Ajax. However, each technology has its own unique capabilities. Learn how these technologies vary so you can make the right choice.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Mike Gehard

Using RSpec-rails2 to test Rails3 ApplicationController functionality

Mike Gehard
Friday, August 6, 2010

The other day I was looking to test some rescue_from functionality in a subclass of ApplicationController and found an easy way to set this up, the controller() method.

Note: Testing of ApplicationController subclasses is a new addition and not available in a released beta of rspec-rails2 as of the writing of this post.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Dan Podsedly

New 3rd Party Tools for Pivotal Tracker this week

Dan Podsedly
Friday, August 6, 2010

Three interesting new user-contributed Pivotal Tracker tools have been added to the growing 3rd party tools list this week:

Pivotal Tracker Story Board

From vizio360, this is a Google Chrome extension that allows you to visualize your current iteration as a card wall, with columns for each story state.

whereuat

Adds a slide out panel to your rails app that directs clients to test stories that have been marked as ‘delivered’ in Pivotal Tracker. Thanks to PLUS2 for this one.

Pivotal Attribution

Text-based tool for tracking story completion per-user on Pivotal Tracker, from Joshua Szmajda.

We’re looking forward to trying these on some of our own projects at Pivotal. Thanks to everyone who’s shared their work with the Tracker user community so far, and let us know if you’ve written something new that you’d like to share.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Christian Sepulveda

Version 1.20: Photo tweets and other bug fixes

Christian Sepulveda
Wednesday, August 4, 2010

Version 1.20 is available in the App Catalog.

  • photo tweets (only TwitPic and Posterous)
  • video upload switched from TwitVid to Posteous (authentication issues)
  • refresh on lists would reload current tweets
  • lists causing duplicate/false notifications

Limited Media Upload Options

As Twitter is migrating to its new authentication mechanism, the various photo services are also doing their migration. However, they are in different stages of readiness, so at the moment only TwitPic and Posterous photo upload are supported.

Similarly, video upload has been switched to Posterous because of authentication support.

In a rush to release this version, some text in Tweed was not translated to the various languages and will only appear in English (though this version of Tweed is available in all international Palm App Catalogs).

Sorry again for the hassles with the new authentication model.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Abhijit Hiremagalur

Standup 08/04/2010: Accounting on Rails anybody?

Abhijit Hiremagalur
Wednesday, August 4, 2010

Ask for Help

  • Double-entry/ledger based accounting in Rails (i.e. Quickbooks in Rails for free)

Ideally would be tied in with user/role system where each accounting entry would be tied to a user, but also reconciled against a master account.

Recommendations? Latest and greatest?

One suggestion was to look at the code that Wesabe open sourced code when they closed their doors.

  • Error message when opening Rubymine “Invalid Git Root”

This is likely because the project included a submodule that wasn’t configured correctly, fix this in under Rubymine’s version control preferences.

Add submodule screen in Rubymine

Interesting Things

  • Test 404 handling (e.g. rescue_from ActiveRecord::RecordNotFound, :with => :render_record_not_found) with Cucumber by temporarily setting ActionController::Base.allow_rescue = true. This is usually set to false in features/support/env.rb
  • JSON.pretty_generate hates Rails 3 Hashes

 

  • Use window.postMessage to communicate between IFrames in a standard way

This should work in most modern browsers. Follow the Mozilla docs, NOT the various blog posts about this.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Abhijit Hiremagalur

Standup 08/03/2010: Bundle me this Batman!

Abhijit Hiremagalur
Tuesday, August 3, 2010

Ask for Help

  • I asked if there’s a date library in Ruby as rich as Java’s JODA

Suggestions included Chronic and RI_CAL though I’m hoping for something that can represent arbitrary periods (ranges?) of time JODA and handles interval calculation and other such date/time arithmetic.

  • is(‘:visible’) doesn’t always work as expected in Jasmine

One project reported that using this to as part of a Jasmine spec to ensure that an element becomes visible doesn’t appear to be reliable.

  • Annotate and Git History failed for a team using Rubymine 2.0.2 and git 1.7.2.1 in combination with svn.

They solved the problem by downgrading to git 1.7.1.1:

I followed instructions here to create a local set of portfiles:

http://guide.macports.org/#development.local-repositories and grabbed the older portfile from here:

https://trac.macports.org/browser/trunk/dports/devel/git-core?rev=69357

After I could do a port search git-core and have 1.7.1.1 show up, I was able to sudo port deactivate git-core @1.7.2_0+doc+svn and sudo port install git-core @1.7.1.1+doc+svn

  • One person was experienced compile errors when installing memprof on Ubuntu, fortunately somebody else had gotten this working before and offered to help him through thee.
  • A team noticed that Bundler ran multiple (4) times on CI taking nearly 11mins overall and wanted to know to make Bundler run only once

It was suggested that the problem may be due to the way they’d setup their preinitializer.rb and they should move the bundle install into a Rake task.


if ENV['IS_CI_BOX']
puts "IS_CI_BOX is set, running bundle install..."

system(‘bundle install’) || raise(“‘bundle install’ command failed. Install bundler with gem install bundler.”)

end

It was pointed out that they should make sure their Gemfile.lock file is checked into version control, which it was. Additionally Bundler 1.0.0 RC1 will allow isolating gems to a local path using bundle install path --disable-shared-gems

Interesting Things

  • The Facebook Graph API doesn’t appear to implement OAuth 2.0 properly/completely so it doesn’t work with the OAuth2 gem
  • One Pivot noticed that the version of ImageMagick installed on the default EngineYard solo image is out of date and had to upgrade this manually.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Dan Podsedly

Data center maintenance affecting Tracker tonight at 11pm PDT

Dan Podsedly
Tuesday, August 3, 2010

We received notification from our hosting service provider Engine Yard, about scheduled data center maintenance tonight (Tuesday Aug 3) starting at 11pm PDT, lasting approximately one hour.

During this maintenance, Engine Yard’s infrastructure partner Terremark will be updating the configuration of spanning tree on network switches, to be able to hot-add resources in the future. A direct outcome of the maintenance will be increased network stability.

During this maintenance window, Tracker may experience high latency or downtime for 5-10 minutes at a time. There may be a number of short latency/downtime periods during the window.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Sean Beckett

Sequoia Capital Seeks UI Developer in Menlo Park, CA

Sean Beckett
Monday, August 2, 2010

At Pivotal Labs, one of the services we provide our clients is helping them interview and hire. Pivotal Labs and our clients place a strong emphasis on Agile development and its many aspects: Pair Programming, Test-Driven Development, rapid iterations, and frequent refactoring.

Sequoia Capital, a Menlo Park, CA company, is looking for an Agile UI Developer to join their team. The full job posting follows.

Us: Sequoia Capital is a Venture Capital firm with a lot more interesting stuff going on in web development than you might expect. We are engaging with Pivotal Labs to develop the next generation of tools for our investment team and are seeking the right full time resource to join us, build cool stuff, own it, and iterate.

You: Driven by creating amazing user experiences and by making software that actually gets used. Interested in touching all aspects of the development cycle from product definition to first release to continuous improvement and evolution of features. Excited about being around startups and startup culture, you’ve worked at startups, but maybe now you’re interested in giving up some of the adrenaline for greater stability and work weeks under 60 hours (usually).

Skills: We need a Javascript and UI ninja with experience creating highly functional, sophisticated, yet minimalist tools that people love to touch. Our most recent stuff uses Rails so experience there is a plus but fundamentally we are looking for energetic, intelligent, creative people who can’t imagine working any way but agile. We are ready to learn and implement new and different tools. We haven’t even ventured into HTML5 and mobile versions of our apps but are eager to find someone to lead us there.

Culture: The tech organization is small and flat so you won’t be managing a team but collaborating with peers. Sequoia is an innovative and demanding environment where, refreshingly, people have just as high expectations of themselves as they have for others.

Logistics: We believe in the value of bumping elbows with the team and the customers on an hourly basis so this is not a position that works well for telecommuting. We are located at Sand Hill Rd and Hwy 280 which is 30 minutes on 280 from the southern parts San Francisco like Glen Park, South Beach, Sunset, etc. While we are engaged with Pivotal there will be some work onsite at their office in San Francisco.

Sequoia provides great comp and benefits, lunch every day, and workout facilities onsite.

Please send cover letter and resume to jobs-tech@sequoiacap.com

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Sean Beckett

EMI Seeks Rails and Java Developers in San Francisco and New York

Sean Beckett
Monday, August 2, 2010

At Pivotal Labs, one of the services we provide our clients is helping them interview and hire. Pivotal Labs and our clients place a strong emphasis on Agile development and its many aspects: Pair Programming, Test-Driven Development, rapid iterations, and frequent refactoring.

EMI Capitol Records is hiring Ruby, Java and Javascript engineers in San Francisco and New York City to build applications that help connect fans with their favorite artists. This is a chance to be a part of something very new and innovative, while representing some of the greatest musicians in history. Send us your questions and resume ASAP, we are interviewing candidates now.

Contact: eric.mittler@emimusic.com

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Topics

  • agile (780)
  • rails (113)
  • testing (88)
  • ruby (83)
  • ruby on rails (70)
  • jobs (62)
  • javascript (55)
  • techtalk (44)
  • rspec (38)
  • ironblogger (32)
  • productivity (30)
  • activerecord (29)
  • gogaruco (29)
  • git (28)
  • nyc (27)
  • rubymine (26)
  • bloggerdome (23)
  • mobile (22)
  • process (21)
  • pivotal tracker (20)
  • cucumber (20)
  • jasmine (19)
  • design (18)
  • ios (18)
  • webos (17)
  • objective-c (17)
  • android (16)
  • palm (16)
  • "soft" ware (16)
  • fun (15)
  • tracker ecosystem (15)
  • ci (15)
  • cedar (15)
  • rails3 (14)
  • performance (14)
  • bdd (14)
  • gem (13)
  • css (13)
  • tdd (13)
  • selenium (12)
  • goruco (12)
  • bundler (12)
  • meetup (11)
  • railsconf (11)
  • nyc-standup (11)
  • capybara (10)
  • mac (10)
  • mojo (10)
  • chef (10)
  • api (10)
Subscribe to Community Feed
  1. ←
  2. 1
  3. 2
  4. 3
  5. 4
  6. 5
  7. 6
  8. →
  • 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 >