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: September 2009

Pivotal Labs

svn to git protips

Pivotal Labs
Wednesday, September 30, 2009

When you’re moving a codebase from subversion to git, here are a few things that make the move go a bit more smoothly.

In the svn project, you can discover some things you’ll need to adjust in git after the import.

Show all files being ignored

svn propget -R svn:ignore .

Add these files to the .gitignore file at your project root, or in appropriate subdirectories. I prefer keeping it all in one place at the top level.

Show all externals

svn propget -R svn:externals .

You’ll either have to switch to using a submodule in git, or just pull the files into your project if that’s not possible for some reason.

Find all empty directories

find . -type d -empty
touch /path/to/empty/dir/.gitkeep

Since git doesn’t keep empty directories, you can add a .gitkeep file to empty directories that you don’t want to go away. Some people add a .gitignore file to keep the directory around, but that sounds totally backwards to me. You want to keep it, not ignore it.

By the way, if you are already ignoring dir/*, that will ignore the .gitkeep file as well. Make sure it isn’t missed by adding !.gitkeep to the end of your .gitignore file.

Find all authors

If you want to properly attribute commits, you’ll need to set up an authors file. But if you miss any authors, the clone will stop and complain. You can discover all the svn users that you need to put in the authors file with this command:

svn log | grep -E 'r[0-9]+ ' | cut -d  -f3 | sort | uniq

init + fetch > clone

If git svn clone doesn’t complete, try doing the init/fetch as separate operations. The clone subcommand is pretty much just doing an init followed by a fetch, but I’ve found that if the clone fails, doing the commands separately can have better success.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Davis W. Frank

Standup 9/29/2009: "Half The Battle" edition

Davis W. Frank
Tuesday, September 29, 2009

Ask for Help

“Has anyone run into issues moving their SVN project to git, where externals move to submodules, and multiple team members’ check-ins keep screwing up merges & pulls?”

Why, yes. Many folks have. And Pivot Sam has written up a nice how-to over here.

Interesting Things

  • Ruby eql? vs. == vs. equal in Ruby

Plenty of discussion of this in other places, so I won’t recap.

However, note that Numeric classes cast when calling ==, but not when calling #eql. Which means (he says, pretending to fire up irb):

>> 1.0 == 1
=> true
>> 1.0.eql?(1)
=> false
  • The latest Github Rackspace move status is posted on their blog.

It looks like the gems are still not building yet, which meant that you’ll need a gem server in the meantime. Say, one at Rubyforge, which is where you should be releasing your gems anyway.

  • Public Service Announcement: your named_scope‘s get evaluated when the class is loaded, not when an instance is created.

So, for example, if you’re building a named_scope for “articles posted in the future” and want to use Time.now, do it in a lambda. Now you know.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Lara Owen

Need a Job? Come Work with Pivotal Clients!

Lara Owen
Monday, September 28, 2009

At Pivotal Labs, one of the services we provide is bootstrapping startups, including helping them interview and hire. We currently have clients looking for skilled engineers to build their development teams. This is an excellent opportunity to learn Extreme Programming by working side-by-side with Pivotal’s talented and experienced developers while at the same time getting in on the ground floor of a small and dynamic product team.

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. General technical requirements include serious web development experience, and a significant subset of Ruby, Rails, CSS, JavaScript, or MySQL.

Here are short descriptions of The Bold Italic and Honk, San Francisco-based clients of Pivotal Labs currently looking for developers. The full job postings follow.

The Bold Italic is an online collection of stories uncovered by the city’s most passionate citizens. We’ve spent the last 6 months in San Francisco discovering what people want to know about their city. We found that people are looking for an insider’s backstory – the story behind the story. We see a great opportunity to connect citizens to merchants in a way that celebrates and supports the city’s culture. A 100% Ruby on Rails web project developed exclusively by Pivotal Labs over the last 3 months, The Bold Italic also stems from a collaborative effort between Gannett’s Design and Innovation group and IDEO. We are looking for a smart, creative, analytical, visionary web developer to join our San Francisco based team on contract for the next 3 months.

Honk.com is a new online automotive website that will make car shopping fun and social. We will enable consumers to experience a new way to explore new cars. We have partnered with a top social website to deliver this new way of car shopping and are funded by one of the largest media companies in the world. Our small team is made up of an experienced group of humble, efficient, and hyper-passionate individuals who are veterans of the automotive industry and social media space. We are proud of our ego-less culture, one that promotes team thinking, not individual accolades. If you’re interested in helping prove that social media and car buying go hand in hand, social networks serve a bigger purpose than keeping up with one’s day, and a small team can outdo the work of an army – then we may have a seat waiting for you.

If you are interested or for more information please contact the company directly. This is an exclusive service provided to our clients, no external companies or recruiters please.

Full job postings follow.

The Bold Italic

The Bold Italic is a start-up offering funded by Gannett, Co. Inc the owner of USA Today, over 80 local newspapers, and 23 local television stations. The site takes a new, fresh approach to providing San Francisco with local news and information through rich visual design and new storytelling methods. A 100% Ruby on Rails web project developed exclusively by Pivotal Labs over the last 3 months, The Bold Italic also stems from a collaborative effort between Gannett’s Design and Innovation group and IDEO.

We are looking for a web developer to work full-time, on contract for the next 3 months, in San Francisco. The right person for the job will have the following attributes:

Talent: We are looking for a smart, creative, analytical, visionary web developer to join our San Francisco based team.

Experience: A college degree required and a demonstrable experience as a web developer. You should have deep experience working on Ruby on Rails, JQuery, CSS and Agile Methodologies, and be able to deliver high-quality results. Experience with Test Driven Development (TDD) is a must.

Personality: We adhere to human centered design thinking in all that we do. You should enjoy creating offerings that delight consumers and aim to meet their needs first. We’re a small group accustomed to playing whatever roles necessary to make things work. Hopefully, you thrive in a start-up environment that requires teamwork, flexibility, enthusiasm, and a proactive attitude.

Responsibilities: You will be the first in-house developer for The Bold Italic! As the first technical hire, you will be responsible for working independently to build new site features, provide technical expertise, as well as maintain the site on a daily basis. We like what we’ve learned from Pivotal and intend to use Pivotal Tracker to plan out site development.

Timing: You should be able to start immediately.

What is The Bold Italic? The Bold Italic is an online collection of stories uncovered by the city’s most passionate citizens. We’ve spent the last 6 months in San Francisco discovering what people want to know about their city. We found that people are looking for an insider’s backstory – the story behind the story. We also found that commerce is the glue that binds together culture and community. We see a great opportunity to connect citizens to merchants in a way that celebrates and supports the city’s culture. Ultimately, we believe that through The Bold Italic, San Franciscans will become better locals through the sharing and uncovering of distinctive, offbeat local experiences.

The Bold is releasing its Beta version in mid-October!

If you’re interested, submit your resume to work@thebolditalic.com

Honk

Honk.com is a new online automotive website that will make car shopping fun and social. Consumers experience a new way to explore new cars, focusing on what other real people actually think, not product specifications or biased editorial. Our site is 100% consumer driven with no journalists or former race car drivers telling you what minivan or sedan you should purchase. Instead, users find real people sharing their opinions and experiences. We have partnered with a top social website to deliver this new way of car shopping and are funded by one of the largest media companies in the world. Thankfully, our partners allow (and encourage) us to remain financially independent, unpolitical, and fast-moving… a true start up.

Our small team is made up of an experienced group of humble, efficient, and hyper-passionate individuals who are veterans of the automotive industry and social media space. We are proud of our ego-less culture, one that promotes team thinking, not individual accolades. If you’re interested in helping prove that social media and car buying go hand in hand, social networks serve a bigger purpose than keeping up with one’s day, and a small team can outdo the work of an army – then we may have a seat waiting for you.

Honk is developing a platform of distributed applications and a destination website that will engage consumers’ existing social networks. To be clear, we are not building yet another community or social network. Many of our social applications will reside on our partners’ sites with the intent to drive users to honk.com for a richer experience, including unique content, interaction, and transaction-oriented tools. We will continue to expand our product over the next twelve months. In addition to deep knowledge of Ruby on Rails and Agile / Test-Driven Development precepts, we hope you have a thorough understanding / are comfortable with:

  • Amazon S3/SQS/EC2
  • CSS/Javascript/JQuery
  • Thin/NGinx/Mongrel
  • RSpec/Webrat/Selenium
  • CSV and XML data feed integration

Previous experience working in online automotive or social media is desired, but definitely not required. Honk is currently located in San Francisco with some ties to Los Angeles. Our ideal candidates should reside in one of these two major metro areas, although we are open to “off site” developers who have the right skills and background.

Please send inquiries to Bruce Krysiak, CTO: techjobs@honk.simplicant.com

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Davis W. Frank

Standup 9/28/2009: Another Slow-ish Monday

Davis W. Frank
Monday, September 28, 2009

Interesting Things

  • Jetbrains has upped the version number of currently-under-development-RubyMine to RubyMine 2.0. We’ve played with the latest build and have found some cool things (better HAML/SASS support, more refactoring joy) and some annoyances (keyboard shortcuts in some dialogs seem broken)
  • Github’s move to Rackspace seemed to go well. More details on the Github blog & @github on Twitter.
  • Pivotal’s occasional November mustache competition is now a charitable exercise. We’ll be using The Movember Foundation, which has partnered with The Lance Armstrong Foundation & The Prostate Cancer Foundation, to publicize our efforts. Expect regular ‘stache-tus updates in this space.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Introducing ActiveModelListener: Easy to use global ActiveRecord event listeners

Pivotal Labs
Sunday, September 27, 2009

I’m currently working on a large app where certain things have to happen when records are created, updated and deleted, such as:

  • Publishing to an activity feed
  • Generating emails
  • Adding entries to a changelog
  • Generating tasks and reminders

Further, the requirements state that admin users should be able to configure which of these actions happen for which objects in the system, who they go to, what the text is etc…

At first this looks like a great place for ActiveRecord Observers. However, after working with Observers there are a few things I dislike – namely that you can’t easily apply observers to all of your models, and you can’t selectively turn them on and off in tests. To remedy that problem, I created ActiveModelListener.

ActiveModelListener is a simple, global ActiveRecord event listener framework, using a middleware-esque architecture that can easily be turned on and off.

Installation

sudo gem install gemcutter
sudo gem tumble
sudo gem install active_model_listener

Usage

First, require active_model_listener above your rails initializer in environment.rb:

# environment.rb
require 'active_model_listener'
Rails::Initializer.run do |config|
  # ...
end

Next, add the listeners you’d like to apply (in order) to the ActiveModelListener in an initializer:

# config/initializers/active_model_listener.rb
ActiveModelListener.listeners << ActivityFeedListener

Then, create a listener class that defines methods for after_create, after_update and / or after_destroy, like so:

class ActivityFeedListener
  class << self
    def after_create(record)
      description = "#{record.class.name} was created"
      publish_activity_feed_items record, description
    end

    def after_update(record)
      description = "#{record.class.name} was updated"
      publish_activity_feed_items record, description
    end

    def after_destroy(record)
      description = "#{record.class.name} was deleted"
      publish_activity_feed_items record, description
    end

    def publish_activity_feed_items(record, description)
      record.activity_feed_item_subscribers.each do |subscriber|
        ActivityFeedItem.create :user => subscriber, :description => description
      end
    end

    private :publish_activity_feed_items
  end
end

Notice how the class looks almost identical to an ActiveRecord observer, so you can easily refactor between the two.

Turning off listeners in specs

When unit testing if your listeners are all firing your unit tests become integration tests. To avoid this, you can easily turn off listeners for all specs all the time:

Spec::Runner.configure do |config|
  config.before(:each) do
    ActiveModelListener.listeners.clear
  end
end

Then, when you want them back on again, you can turn them back on for a spec:

describe "Integrating with listeners" do
  before do
    ActiveModelListener.listeners << FooListener
  end
end

Specifying a subset of listeners to use

When doing data imports, migrations or certain actions that need to only use certain listeners, you can easily specify which ones you’d like to use:

ActiveModelListener.with_listeners AuditListener, ActivityListener do
  Article.create! :title => "foo"
end

After the block runs, the original listeners are restored.

If you want to run some code with no listeners at all, you can do so with:

ActiveModelListener.without_listeners do
  Article.create! :title => "foo"
end

Contributing

http://github.com/zilkey/active_model_listener

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Standup 9/24/2009: Hiring a Sysadmin, Rails Security Patches

Pivotal Labs
Thursday, September 24, 2009

Help

  • Pivotal is hiring a part-time sysadmin. See craigslist ad

Interesting

  • Mouseophobics – Ctrl-Enter on the RubyMine Commit Changes dialog will commit without you having to grab your mouse.

  • Rails Security Patches – The Rails team recently came out with 2.3.4 featuring security patches to fix the recently discovered vulnerabilities.
    Apparently the plan was to also upgrade 2.2.2 to 2.2.3 with these patches, but they forgot to push the gems. They should be coming to a gem server near you soon.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Standup 9/23/2009: Multiple Rubygems Versions, Abstract AR Classes

Pivotal Labs
Wednesday, September 23, 2009

Help

How do you deal with an old, soon to be retired codebase that requires old versions of rubygems and rake, and a new codebase that requires new version of rubygems and rake, on the same machine?

Suggestions:

  1. Have two separate Ruby installations (each with its own gems).
  2. Don’t. Use two machines. Optimize for developer resources rather than hardware, the former being much more expensive than the latter.

ActiveRecord Abstract Class doesn’t work with validations?

AR allows you to set abstract_class = true. The makes the class uninstantiable, i.e. you can’t create instance of the class, you have to create a subclass of it and create an instance of that.

However, if you create an abstract class that contains validations, then subclass it, the subclass produces errors when attempting to validate. This features does not seem well thought out.

Has anyone used Capistrano to deploy to a load balanced EC2 cluster?

Suggestions:

  • Follow the “deploy to localhost” path.
  • Use Cap for bootstrapping and Chef for configuration.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Remixr: Ruby wrapper for the Best Buy Remix API

Pivotal Labs
Wednesday, September 23, 2009
sudo gem install remixr

We at Pivotal like that incantation. Thanks to the Squeegee crew for putting Remixr together.

# find stores within 50 miles of ZIP 76227 and products over three G's

stores = client.stores({:area => ['76227', 50]}).products({:salePrice => {'$gt' => 3000}}).fetch.stores

Beautiful.

  • Remixr intro

  • http://github.com/squeejee/remixr

  • Best Buy Remix API site

  • Remix has some exciting upgrades and additions coming soon, keep up with it all via the Remix API blog.

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

Tweed and Paid Palm Pre Apps

Christian Sepulveda
Tuesday, September 22, 2009

In the past, we’ve been asked if we planned to charge for Tweed. Until recently, we hadn’t made a decision. Tweed began as an application we developed to learn Palm webOS, and it grew into something we started to depend on, so we decided to release it to the App Catalog.

At this point, Tweed has a thriving user base and continues to grow in its maturity and capabilities. However, this does come with considerable costs to Pivotal Labs and we can’t indefinitely subsidize the entire cost of development. So, we’ve decided to make Tweed a paid application in the App Catalog.

We are committed to continuing to develop and support Tweed. Charging for it will let us keep bringing you new features, like the ones in the 1.0 release.

Existing Tweed users can continue to use the current version, (0.9.16) and you can still grab a copy until the paid apps are available; it will not timebomb and we’re happy for you to keep using it. However, it will be removed from the App Catalog when the paid version replaces it. Hopefully you’ll find the new features compelling enough to upgrade. (Unfortunately it will install as a new application, so you will have to re-enter your accounts and you will lose existing timeline markers and bookmarks. Sorry, this is a consequence of the new App Catalog and we have no influence over this.)

For Canadian users, Tweed will continue to be free until Palm launches a commerce enabled App Catalog in Canada. (This will be true for new Palm Pre markets as well.)

Features

There will be a variety of new features available in the initial 1.0.0 release of the paid application.

  • true, direct photo upload (no more email)
    • TwitPic, TwitGoo, TweetPhoto, yFrog, Posterous
  • new notifications dashboards
  • full-screen view of user profile image (tap user picture on user profile scene)
  • preference for number of tweets on fetch
  • ability to change password
  • show number of tweets in user profile
  • direct messages can include photos

Tweed

Tweed

Roadmap

While we have lots planned for Tweed, some items of note include:

  • themes
  • landscape support
  • bit.ly / j.mp url shorteners
  • Flickr upload support
  • more…

Pricing

Tweed will normally cost $3.99. However, for the next few weeks, to help ease the transition, we will offer Tweed for the discounted price of $1.99.

We thank you all of using Tweed. While we know some of you will be disappointed that Tweed will be a paid-only application, we hope you will enjoy the new Tweed.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Standup 9/21/2009: Cabulous

Pivotal Labs
Monday, September 21, 2009

Interesting

  • Cabulous is going into beta: UpStart Mobile, makers of Find my Friend are releasing the beta of Cabulous: “A mobile application that gives cab drivers and their passengers the peace of mind of seeing exactly where each other are from hail to pick-up.”. Now that’s what I call handy. The Cabulous beta is being held in San Francisco, California in November/December 2009.
  • 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. 1
  2. 2
  3. 3
  4. →
  • 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 >