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: March 2010

Sarah Mei

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
Pivotal Labs

3/16 – NYC Pivotal Tech Talk

Pivotal Labs
Wednesday, March 17, 2010

Yesterday we had Mat Brown of Patch.com giving us a presentation on his Sunspot gem for easily adding full-text search to a Rails application via Solr.

Mat walked us through the steps for adding Sunspot to a Rails application, talked through some of the production deployment concerns of Solr and illustrated some of the new features of Solr 1.4 such as master/slave replication and sharding that make it worth a look for full-text search.

Most of our tech talks are open to the public. If you’re interested in joining us for presentations like this please join our mailing list.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

TextMate: The Last Straw

Alex Chaffee
Tuesday, March 16, 2010

That’s it. I’m done with TextMate. It hasn’t been updated in over 2 years, either for essential functionality (replace in path) or performance fixes (searching through log files) or UI issues (how many boxes must you click to enable autosave?) or bug fixes. Every few months the author pokes his head up and says “I’m working on TextMate 3.0!” and then disappears again, happily accepting new license fees into his PayPal account.

I’ve just been bitten twice in two weeks by a bug that caused not just data loss, but data mangling in a way that was very difficult to fix. Here’s the rough steps to reproduce:

  1. Edit some files in TextMate
  2. Leave TextMate running in the foreground
  3. Switch to console and “git pull” in the latest code from your workmates
  4. Run a search-and-replace that edits a file that was changed (by someone else) during the merge
  5. Save that edit

You’ll see (with “git diff”) that your version of the file has your new post-merge changes… but it also has reverted your buddy’s changes from the merge. It’s like you decided that those changes were no good and reverted them yourself and then added your own.

If you fail to notice this before checking in, you will totally hose your version control… but just for that one file. You can’t just revert a whole commit… you’ll have to step through change by change to figure out which change was theirs, which change was yours, and which change looks like it was yours but was actually an inadvertent revert of theirs!

I can’t work under these conditions. I’m switching to RubyMine today. See http://bjclark.me/2010/03/10/rubymine-a-love-story/ for why.

P.S. I just found a bug report for this dated 2008-04-02. That’s just about 2 years ago for a critical data-losing bug. Woot.

  • http://ticket.macromates.com/show?ticket_id=B036CF83
  • http://ticket.macromates.com/show?ticket_id=CACBB533
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Sarah Mei

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
Sarah Mei

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
Pivotal Labs

NYC Standup Round-up for Mar 8th – Mar 12th

Pivotal Labs
Friday, March 12, 2010

Spring is in the air here in sunny NYC! Well, it was sunny for a bit. Now it’s turned into that classic film-noir drizzle. That’s authentic New York weather outside our window as we do the Round Up!

Ask for Help

  • I asked, “In Jasmine, how do you spy on a constructor?” Suppose you have a constructor called Widget. Saying spyOn(window, "Widget") swaps out the real Widget function with a spy. The real Widget implementation takes its prototype with it, which means that Widgets created while the constructor is spied on don’t get the methods a Widget would get. That’s true even when you spy with spyOn(window, "Widget").andCallThrough().

    Also, there doesn’t seem to be a way to stub out object construction and return an object of your choosing. In Rspec in Ruby you can say,

    Widget.should_receive(:new).and_return(my_fake_widget)

    because .new is a class method. But in Javascript, new is a keyword which always creates a new object. I’m guessing there’s no good way around this, but if there is one, we could really use it.

    Update: This is, as it turns out, entirely incorrect. Jasmine’s .andReturn() does let you stub constructors properly. I still have no idea how this works. See the comments for more discussion.

Interesting Stuff

  • Todd notifies us that in ActiveRecord, dynamic finders with too-few arguments fail silently. That is, if you say,

    Person.find_by_first_name_and_last_name_and_email(”Todd”, “Persen”)

    and fail to specify a value for email, the value is taken to be nil. That means that the finder will look for someone named “Todd Persen” with a nil email address. You might have meant that. More likely, you made a mistake. AR should probably check the number of arguments it’s given against the number of columns in the finder name.

  • You already know that Pivotal does real Extreme Programming. But did you know that we have…Extreme Breakfast?

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Rajan Agaskar

Standup 03/12/10

Rajan Agaskar
Friday, March 12, 2010

Helps

Q: How can I plot thousands of points on a Google Map without said map being undraggable?
A: It may make sense to use Google’s HeatMap API after the number of plotted points exceeds 500. Other strategies are discussed here: Handling Large Amounts of Markers in Google Maps

Interesting

  • Using ReCSS with Sass.
    If you happen to be using SASS you can still make use of awesome ReCSS bookmarklets (including one by Pivotal’s own Erik Hanson) by using the compass command line tool and watching your project for changes. Totally rad!

  • Ruby Enterprise Edition
    Is awesome, if you use the garbage collection tweaks. One team installed it and saw a 50% savings in their test suite running times — over 15 minutes! Combined with parallel spec it can be a real winner. If you’re on Leopard, you may need to install the version from Oct 2009, as the latest fails with a Marshall.load error on install. 2 legit!

  • All your RubyMine problems can be fixed!
    By reverting to RubyMine 1.1.1. At least if your problems are: inconsistent functionality with the merge tool, and RubyMine occasionally refusing to recognize spec files correctly. That’s def!

  • Spring Forward this Sunday to save the daylight, and terrorize the programmers. Thanks a lot, farmers-slash-botanists. WORD Y’ALL. I’M OUT.

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

New Tech Talk: Making Stuff People Love

Sean Beckett
Thursday, March 11, 2010

Making truly awesome stuff is hard. Pivot Carl Coryell-Martin proposes we identify common physiological responses and condense their design solutions into a pattern language. He presents a draft set of patterns in the context of crafting an iPhone app.

See all our talks at http://pivotallabs.com/talks

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

Standup 03/11/2010: parallel_tests, RubyMine spec click-through bug

Pivotal Labs
Thursday, March 11, 2010

Interesting Things

  • A few projects are using parallel_test to speed up their tests/specs. One project has had the best results by running one less parallel spec than the number of cores on the machine, unless of course you only have one core.

  • Another team discovered an odd bug in RubyMine where they could not click-through “require spec” or run specs if their project had code in vendor/plugins that extended ActiveRecord::Base. Here is the RubyMine ticket they filed.

  • Finally, it looks like a Linux machine running Ruby 1.8.6 patch 287 had rounding errors when using the ActiveSupport helpers for 2.days.ago. They fixed the issue by upgrading to Ruby 1.8.7

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

New Tech Talk: Scala + Lift, Quite a Pair

Sean Beckett
Wednesday, March 10, 2010

David Pollak and Martin Odersky discuss the power of Lift, a Rails-like framework for Scala. David is the maintainer of the Lift framework and Martin is the author of Scala. Together they live-code a 30-line, real time, web based chat app in Lift and discuss the Scala constructs that allow for such concise applications.

See all our talks at http://pivotallabs.com/talks

  • 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. →
  • 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 >