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
  • Tools
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker
Jacob Maine

Standup 7/28/2009: Rails 2.3.3 Woes

Jacob Maine
Tuesday, July 28, 2009

Interesting Things

  • A few people have had problems with a change to named scope in Rails 2.3.3. The gist of the change is that if you chain named scopes, one of which uses a lambda that executes queries with the same model class, those queries are evaluated with the scope built up by the chain, not the default scope of the model. with_exclusive_scope may get around this, but could lose the default scope (or break things like acts_as_paranoid).

  • Rails 2.3.3 + Passenger fails with certain system configurations. Rails 2.3.3 does not bundle Rack, although 2.3.2 did. This may also be the cause of Mongrel failures someone noticed with script/server.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Adam Milligan

Refactoring a dead horse

Adam Milligan
Sunday, May 10, 2009

A while back I made the point that the HasOneThroughAssociation class in Rails shouldn’t be a subclass of HasManyThroughAssociation. I also submitted a Rails patch in which I changed the superclass of HasOneThroughAssociation from HasManyThroughAssociation to HasOneAssociation and moved the shared Through functionality into a module. Despite support from the teeming millions, Rails core team member Pratik rejected the patch for being “just a refactoring.”

Despondent, I brought the issue up here at Pivotal a few months later, after the Release of Rails 2.3. Nate added a callout for support for the ticket to the daily Pivotal standup blog. The response was heartwarming (thanks to all who added a +1), but resulted only in Pratik removing himself from the ticket (I assume so he would stop getting comment notifications).

All is not lost, however. At RailsConf last week, Jeff Dean — Pivot, raconteur, international playboy, and refactoring paladin — called out the Rails core team regarding their stance on refactorings. The response: bullish (sort of).

Taking into account the responses from the Rails core team, I’ve done the following:

  • Recreated the patch for current Rails edge. Fortunately, I had to make only one small change to the patch from six months ago.
  • Ran a search on GitHub for any code using the HasOneThroughAssociation class (thanks to Jeff for the idea). As far as I can tell no code outside of Rails depends on the implementation of that class.
  • Added Jeremy Kemper as the owner of the Rails ticket. He was the most immediately supportive of refactoring patches, so hopefully he’ll advocate for this one.

We’ll see what happens.

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

Follow-ups from my RailsConf talk

Davis W. Frank
Wednesday, May 6, 2009

First, thanks to everyone who came – especially those who laughed at all the right spots. If I didn’t get to your question, I’m here through Thursday afternoon.

There were a couple of questions during the talk and lots after the talk about how to deal with remote pairs. Since it’s RailsConf and most folks are on MacOS, ScreenSharing.app came up.

Chad Woolley, King Remote Pivot, wrote up a great detailed discussion of his setup back in December. It should have answers to your tool & equipment questions.

The key element is the Full Screen mode in ScreenSharing.app. In Full Screen mode the remote Mac just becomes a terminal on the host machine – which means keystrokes like CMD-TAB, CMD-Space and a few others go over the wire instead of to your local box.

But Apple killed this feature as of 10.5.5 – but you can get it back! Follow the instructions at this post at MacWorld – use the second, more complex method – to hack on your ScreenSharing.app bundle to restore the awesomeness.

Once you’ve got the new app, replace the current ScreenSharing.app so you are always awesome:

sudo mv /System/Library/CoreServices/Screen Sharing.app/ /System/Library/CoreServices/Lame Screen Sharing.app/

sudo cp Awesome Screen Sharing.app/ /System/Library/CoreServices/Screen Sharing.app/

Then, run these two commands from Terminal:

defaults write com.apple.ScreenSharing ShowBonjourBrowser_Debug 1

'NSToolbar Configuration ControlToolbar' -dict-add 'TB Item Identifiers'  '(Scale,Control,Share,Curtain,Capture,FullScreen,GetClipboard,SendClipboard,Quality)'

We keep a copy of this app around which we renamed to AwesomeScreenSharing.app, so we don’t lose the feature on subsequent Software Updates.

One last thing: Quicksilver doesn’t index into the /System directory by default, but you can change that as well:

  • Go to QuickSilver preferences
  • Go to Catalog (top right)
  • Go to Custom (bottom left)
  • Hit the plus (system bar) to add a new location
  • Pick File & Folder scanner
  • Navigate to /System/Library/CoreServices

Now you can launch ScreenSharing via QS. Enjoy!

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

More on my RailsConf talk

Davis W. Frank
Thursday, March 26, 2009

As I’ve mentioned before, I’ll be giving a talk at RailsConf on how I “got more agile” once I was able to practice every day. The goal is for my story to help you in your career, telling some good stories in the process.

To celebrate/entice you to come to RailsConf & my talk, (Tuesday, 2:50pm, Ballroom A) and to thank those of you who contributed your own tips, I have two things for you.

First is a promise of Pivotal Labs swag (content TBD) to anyone who submitted a tip & to the first five comment authors who claim it below and identify themselves at the actual session – no sneaking off to Scott’s Advanced Git talk.

Second, for everyone, is a RailsConf discount of 15% in case you haven’t registered yet. When you register, use the promo code RC09FOS. Note that as of yesterday, the Hilton’s room rate has dropped to $99 a night. w00t!

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

Standup 3/26/2009: Testing Request Headers When Request Object Is Frozen

Pivotal Labs
Thursday, March 26, 2009

Ask for Help

“How do you test request headers? The request object is frozen…”

The team is using rspec to test an OAuth implementation and needs better access to the request object.

  • Possibly modify the request environment prior to running the test -or-
  • Instantiate a new, non-frozen request object.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Standup 3/25/2009: Branches + JSUnit + CI + IE = :-(

Pivotal Labs
Wednesday, March 25, 2009

Interesting Things

  • Branches + JsUnit + CI + IE = :-( : Apparently it is difficult to manage IE’s cache in CI. One project apparently has a bat file on CI that clears the cache every 30 minutes. Another team solved this by making the cache directory read only. Often browser/OS combinations have some technique for disabling caching.
  • Test Swarm Alpha: this is a crowd sourced javascript testing solution (think seti@home for javascript testing) being developed by John Resig.

Ask for Help

“AR attribute appears to be skipped by text field helper?!” Apparently the model method is bypassed by the text field helper if a column of the same name is present in the underlying table. This was experienced in Rails 2.2.

Others have apparently experienced this in the past but a clear answer did not surface.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
David Stevenson

iPhone Interface for Pivotal Tracker

David Stevenson
Thursday, March 19, 2009

I’ve been wanting to use Pivotal Tracker on my iPhone, so I wrote a little proof of concept using the Tracker API. I thought that a native application would be much more difficult than a skinned web application using ActiveResource.

I tried out Dashcode, Apple’s recommended iPhone-compatible front-end web development tool, but was disappointed. I basically found myself developing the entire application in javascript, actually using XMLHttpRequest to talk directly to the API. This would have been pretty neat if I could have pulled it off, but I’d rather develop a data-heavy application in rails than javascript.

I ended up using simple CSS to skin the application called UiUI. It’s the best looking iphone UI I’ve seen, with tons of elements to choose from. It’s missing effects, of course, being only CSS. I also used Heroku, a free and scalable rails deployment environment to host my application. With it, I was up and running with a functional tracker application in under 3 hours. Since then, I’ve added the ability to create and update stories.

Check it out, let me know what you think:
http://itracker.heroku.com

If you’re not on an iPhone, be sure to use Safari. It doesn’t look great in Firefox or IE.

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

Standup 3/12/2009

Mike Grafton
Thursday, March 12, 2009

Interesting

  • Selenium removes the If-Modified-Since header. This gets in your way if you are testing ETags.

  • Speaking of ETags – they are awesome. See Ryan Daigle’s article for code.

Help

Just how slow is Mongrel when serving static images?

The answer is – pretty slow. The reason for the question was that Google’s crawler tends to keep a single connection open and fire lots and lots of http requests over a period of several hours. With a standard Nginx/Mongrel setup, this would tie up a mongrel for this entire period.

A proposed solution to this problem is to use HAProxy between Nginx and Mongrel.

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

Agile tips & tricks presentation at RailsConf

Davis W. Frank
Sunday, February 8, 2009

Warning: a bit of Shameless Self-Promotion follows

Sitting in more than one session at RailsConf 2008, I noticed speakers that were advocating, directly or indirectly, Agile practices. But, aside from Kent Beck’s great keynote, there wasn’t a lot of ‘pure Agile’ on the program.

I left the conference inspired to write a presentation that would help those in the Rails community get better at their jobs.

I had some ideas, but last summer I asked you what helped you be Agile day-to-day. I took your comments, the tips from fellow Pivots, and my own hacks and made them blend. The result is a presentation called “I Rock, I Suck, I Am” that was accepted for the program at RailsConf 2009.

So thanks to you for your thoughts & comments – they all helped shaped my presentation. And if you’re at RailsConf, come on by with your curious and/or reluctant peers and have a listen.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
David Stevenson

Standup for 2/3/2009: Enemerable#sum vs ActiveRecord#sum

David Stevenson
Tuesday, February 3, 2009

Interesting Things

  • When you call user.purchases.sum(), you are invoking ActiveRecord::ClassMethods#sum rather than Enumerable#sum. If you want to invoke Enumerable#sum (which takes a block and is more powerful though less performant), you’d have to call user.purchases.target.sum() {|p| p.price * p.quantity}.
  • NewRelic sometimes makes our app servers malfunction. Several of us reported having these sorts of problems on different projects. It’s always fixed by the NewRelic team with a new version or a configuration change, but we wish that we felt safer about our production server stability. Some projects feel that the value is certainly worth it, and Engineyard uses NewRelic data when discussing scaling, so it’s worth hanging in there.

Ask for Help

  • What’s the deal with using the OSX terminal and bash/readline messing with the terminal? We’re always typing some ridiculously long command and bash starts writing over itself. Especially when we use Ctrl+A and Ctrl+R and edit the line. Anyone know how we can stop/fix this once it happeneds?
  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Topics

  • agile (783)
  • rails (117)
  • testing (90)
  • ruby (86)
  • ruby on rails (71)
  • jobs (62)
  • javascript (59)
  • techtalk (44)
  • ironblogger (42)
  • rspec (39)
  • bloggerdome (34)
  • productivity (34)
  • activerecord (30)
  • rubymine (30)
  • git (29)
  • gogaruco (29)
  • nyc (27)
  • design (24)
  • mobile (23)
  • pivotal tracker (22)
  • process (21)
  • cucumber (21)
  • jasmine (19)
  • ios (18)
  • tracker ecosystem (17)
  • webos (17)
  • objective-c (17)
  • fun (16)
  • android (16)
  • palm (16)
  • ci (16)
  • "soft" ware (16)
  • bdd (15)
  • tdd (15)
  • cedar (15)
  • rails3 (14)
  • performance (14)
  • css (14)
  • gem (13)
  • mouse-free development (12)
  • selenium (12)
  • goruco (12)
  • bundler (12)
  • api (12)
  • keyboard (11)
  • meetup (11)
  • railsconf (11)
  • nyc-standup (11)
  • capybara (10)
  • mac (10)
Subscribe to rails Feed
  1. ←
  2. 1
  3. ...
  4. 5
  5. 6
  6. 7
  7. 8
  8. 9
  9. 10
  10. 11
  11. 12
  12. →
  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • Tools
  • 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 >