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: February 2007

Joe Moore

Standup 02/28/2007

Joe Moore
Wednesday, February 28, 2007

Interesting Things

  • JSON: the consensus seems to be that ActiveRecord’s to_json method is buggy, and that people wishing to transform their ActiveRecords into JSON should use the Fast JSON gem.
  • Here’s a Rails gotcha: if you are performing a form POST from a Rails template, there is a risk that any query-parameters in your URL will “stomp” parameters with the same key in your form. In the following code example, id = 1 will be sent to your app:
<code>
    # id = 1 will be sent to the app below
    url: http://railsapp.com/person/play_with&id=1

    --- in play_with.rhtml:
    # id = 9 will NOT be sent to the app
    # because of the `&id=1` in the URL
    form_for :person, @person,
             :url => {:action => :something, :id => 99} do |form|
       # blah blah blah...
    end
</code>

Total Stand-up Meeting Time: 13:00 minutes

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Joe Moore

Standup 02/27/2007

Joe Moore
Tuesday, February 27, 2007

Interesting Things

  • The has_many_polymorphs plugin is finicky: order of operations is important! If you have problems with your associations after installing HMP, play around with the order of your has_many associations and such.
  • Also, “type is not type”: has_many_polymorphs’ use of the type column is not the same usage of Single Table Inheritance’s (STI) usage of type. If you are using HMP for an ActiveRecord using STI (say, “Student” which extends “Person”), HMP needs to reference the base class/table, not the subclass (i.e. reference Person, not Student.)
  • If your Rspec test seem to be having problems finding the Models, Controllers, etc. that are the test subjects, make sure the directory ‘spec test structure is correct: “model” for model tests, “controller” for controller tests, etc. Rspec assumes that these test directories exist.
  • Finally, as if you didn’t need to be told so, ActiveRecord will have problems if you create a table with only an id column.

Total Stand-up Meeting Time: 18:00 minutes

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Joe Moore

Standup 02/26/2007

Joe Moore
Monday, February 26, 2007

It’s Monday, and a blizzard in the Lake Tahoe area has stranded several of our developer. No interesting things for standup today.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Paranoia

Alex Chaffee
Saturday, February 24, 2007

Hoping to improve performance, we changed a query to use the :include condition like this:

    Project.find(id, :include => :stories)

and we noticed two things:

  1. ActiveRecord decided to turn that into a LEFT OUTER JOIN. Egads! This drastically slowed things down (although we didn’t notice until several days later, when we ran a real load test with production data).
  2. acts_as_paranoid did not manage to stick it’s little “and deleted_at = nil” phrase into the query. This meant that “deleted” stories showed up when they weren’t supposed to.

So that’s two gotchas for the price of one.

In email, Nick pointed out that the joining behavior is documented and appropriate (”otherwise if there is a nil association (eg a project without any stories) you wouldn’t get a project back even though it exists!”) and Miho rejoined that AR can be dangerous because it changes what looks like beautiful, elegant Ruby into nasty, ugly, hard-to-understand SQL under the hood.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Joe Moore

Standup 02/23/2007

Joe Moore
Friday, February 23, 2007

Only project updates today.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Joe Moore

Standup 02/21/2007

Joe Moore
Thursday, February 22, 2007

Interesting Things

  • After the appable_plugins folks applied some of our patches, we upgrade. Thanks guys!
  • Beer suggestions welcome for the retrospective tomorrow!
  • One of our guys presented at the East Bay Ruby Meetup. Subject: Pivotal Labs’ Capistrano extensions. Of note: when he asked the group of 45 Ruby enthusiasts who among them knew much about Agile Software Development and continuous integration, only 4-5 people raised their hands. Disappointing.
  • We might present at the O’Reilly Web 2.0 Expo in San Francisco this April (topic TBD). We’ll post the details here if it works out.

Ask for Help

  • Is something goofy happening with Rail 1.2 REGEX pattern matching? One group is having problems after the upgrade.
    UPDATE: Not really. It was a case where Rails 1.2 caught the bug that Rails 1.1 did not.

Total Stand-up Meeting Time: 10:00 minutes

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Joe Moore

Standup 02/22/2007

Joe Moore
Thursday, February 22, 2007

Interesting Things

  • If you are using named parameters, watch out! A routes-named-parameters bug bit us. It’s fixed in Edge Rails but not in a released version of Rails.
  • … And as a public service announcement, Rails’ routing was rewritten for version 1.2. If you are experiencing weird routing behavior, check the bug list.
  • False alarm! The REGEX bug we mentioned the the last standup meeting… our fault.
  • Let’s say you have the desperate need to generate a drop-shadow for an image, or any other sort of shadow (haven’t we all?). Check out Rmagick’s Image::shadow() method, which can do it for you. Very cool stuff!
  • More svn:externals problems. I won’t get into the gory details, but if are changing or removing a svn:externals property on a directory, your best bet is to delete that portion of the directory tree and get a fresh version from SVN. You’ll avoid most problems.
  • One project is using the Rails Simple Captcha plugin with success, and even has a successful Selenium testing strategy.
  • Watch out for this appable_plugins bug ActiveRecord models in your plugin do not reload when your environment sets config.cache_classes = true. End result: you might get “method missing” errors in your application for methods that the plugin’s model declares. Ouch. Details available upon request.

Ask for Help

  • Doh! Somehow we broke ruby script/generate migration MyMigration. I suppose we should fix that.

Total Stand-up Meeting Time: 20:00 minutes

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Joe Moore

Standup 02/20/2007

Joe Moore
Wednesday, February 21, 2007

Interesting Things

  • We’ve been talking to the appable_plugins folks and they have been very receptive to addressing the issues and bugs we’ve found; they’ve even applied several patches we’ve submitted. Details:

    • Our google groups thread
    • This patch gets the tests passing: http://dev.pluginaweek.org/ticket/10
    • This bug is a loading twice error: http://dev.pluginaweek.org/ticket/11
    • This patch is a refactoring and adds some true unit tests to Appable Plugins: http://dev.pluginaweek.org/ticket/12

Ask for Help

  • 4 of our developers are trapped in Flagstaff, AZ! Can anyone give them a ride, perhaps in a short bus?

Total Stand-up Meeting Time: 13:00 minutes

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Joe Moore

Standup 02/16/2007

Joe Moore
Saturday, February 17, 2007

A shorty today.

Interesting Things

  • A massive group of developers is revisiting and debating the current state of our shared-code architecture. appable_plugins might not be a perfect match, and we might develop our own or plugin-sharing system.

Total Stand-up Meeting Time: 12:00 minutes

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

Do not fear the code — The code should fear YOU!

Pivotal Labs
Thursday, February 15, 2007

Never be afraid to refactor. It may seem scary right now, but it will only become more daunting as the code base increases in size.

The right time to refactor is NOW… grasshopper

And now that my pair and I have rallied around this post, to the refactoring!

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Topics

  • agile (781)
  • rails (114)
  • testing (88)
  • ruby (84)
  • ruby on rails (70)
  • jobs (62)
  • javascript (56)
  • techtalk (44)
  • rspec (38)
  • ironblogger (32)
  • productivity (30)
  • activerecord (29)
  • gogaruco (29)
  • git (28)
  • nyc (27)
  • rubymine (26)
  • bloggerdome (24)
  • mobile (22)
  • process (21)
  • pivotal tracker (21)
  • cucumber (20)
  • design (19)
  • jasmine (19)
  • ios (18)
  • webos (17)
  • objective-c (17)
  • android (16)
  • tracker ecosystem (16)
  • palm (16)
  • "soft" ware (16)
  • fun (15)
  • ci (15)
  • cedar (15)
  • rails3 (14)
  • performance (14)
  • bdd (14)
  • tdd (14)
  • gem (13)
  • css (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 >