<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.pivotallabs.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom">
  <title>Pivotal Blabs</title>
  
  <subtitle>The Unofficial Blog of Pivotal Labs</subtitle>
  <id>tag:pivotallabs.com,2007:/blabs</id>
  <updated>2010-03-17T16:23:00-00:00</updated>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.pivotallabs.com/pivotallabs/blabs" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="pivotallabs/blabs" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
    <updated>2010-03-17T16:23:00-00:00</updated>
    <title type="html">Standup for St. Patrick's Day</title>
    <author>
      <name>Sarah Mei</name>
    </author>
    <link href="http://pivotallabs.com/users/sarah/blog/articles/1203-standup-for-st-patrick-s-day" />
    <id>http://pivotallabs.com/users/sarah/blog/articles/1203-standup-for-st-patrick-s-day</id>
    <content type="html">&lt;p&gt;Help:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Testing blocks. If you have a block and you want to spy on the internals as it executes, what do you do? Suggestions were: 
&lt;ul&gt;
&lt;li&gt;Have each method called internally throw a symbol and check for that.   &lt;/li&gt;
&lt;li&gt;Turn it into a proc, and set expectations on that. &lt;/li&gt;
&lt;li&gt;Stub the methods being called internally and set expectations on those. &lt;/li&gt;
&lt;li&gt;pass the block to a spy object. &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Other suggestions welcome. The project is using &lt;a href="http://github.com/btakita/rr"&gt;rr&lt;/a&gt;, which apparently can't do this last option, though that would be ideal.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Routes in Rails are case-sensitive? /products/1/edit and /Products/1/edit don't both resolve to the same place &amp;#40;unless you specify in routes.rb&amp;#41;. Rumor has it that the &lt;a href="http://www.ietf.org/rfc/rfc2396.txt"&gt;RFC for URIs&lt;/a&gt; says that the path portion of a URL is case-sensitive, as opposed to the case-insensitive domain name. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If anyone wants to read through that document and confirm...feel free.&lt;/p&gt;</content>
  </entry>
  <entry>
    <updated>2010-03-17T12:52:00-00:00</updated>
    <title type="html">3/16 - NYC Pivotal Tech Talk</title>
    <author>
      <name>John Pignata</name>
    </author>
    <link href="http://pivotallabs.com/users/jpignata/blog/articles/1202-3-16-nyc-pivotal-tech-talk" />
    <id>http://pivotallabs.com/users/jpignata/blog/articles/1202-3-16-nyc-pivotal-tech-talk</id>
    <content type="html">&lt;p&gt;Yesterday we had Mat Brown of &lt;a href="http://www.patch.com"&gt;Patch.com&lt;/a&gt; giving us a presentation on his &lt;a href="http://outoftime.github.com/sunspot/"&gt;Sunspot&lt;/a&gt; gem for easily adding full-text search to a Rails application via &lt;a href="http://lucene.apache.org/solr/"&gt;Solr&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Most of our tech talks are open to the public. If you're interested in joining us for presentations like this please join our &lt;a href="http://groups.google.com/group/pivotal-nyc-tech-talk"&gt;mailing list&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <updated>2010-03-16T21:36:00-00:00</updated>
    <title type="html">TextMate: The Last Straw</title>
    <author>
      <name>Alex Chaffee</name>
    </author>
    <link href="http://pivotallabs.com/users/alex/blog/articles/1201-textmate-the-last-straw" />
    <id>http://pivotallabs.com/users/alex/blog/articles/1201-textmate-the-last-straw</id>
    <content type="html">&lt;p&gt;That's it. I'm done with TextMate. It hasn't been updated in over 2 years, either for essential functionality &amp;#40;replace in path&amp;#41; or performance fixes &amp;#40;searching through log files&amp;#41; or UI issues &amp;#40;how many boxes must you click to enable autosave?&amp;#41; 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.&lt;/p&gt;

&lt;p&gt;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:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Edit some files in TextMate&lt;/li&gt;
&lt;li&gt;Leave TextMate running in the foreground&lt;/li&gt;
&lt;li&gt;Switch to console and "git pull" in the latest code from your workmates&lt;/li&gt;
&lt;li&gt;Run a search-and-replace that edits a file that was changed &amp;#40;by someone else&amp;#41; during the merge&lt;/li&gt;
&lt;li&gt;Save that edit&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You'll see &amp;#40;with "git diff"&amp;#41; that your version of the file has your new post-merge changes... but it &lt;em&gt;also&lt;/em&gt; 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.&lt;/p&gt;

&lt;p&gt;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 &lt;em&gt;looks&lt;/em&gt; like it was yours but was actually an inadvertent revert of theirs!&lt;/p&gt;

&lt;p&gt;I can't work under these conditions. I'm switching to RubyMine today. See &lt;a href="http://bjclark.me/2010/03/10/rubymine-a-love-story/"&gt;http://bjclark.me/2010/03/10/rubymine-a-love-story/&lt;/a&gt; for why.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://ticket.macromates.com/show?ticket_id=B036CF83"&gt;http://ticket.macromates.com/show?ticket_id=B036CF83&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://ticket.macromates.com/show?ticket_id=CACBB533"&gt;http://ticket.macromates.com/show?ticket_id=CACBB533&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry>
  <entry>
    <updated>2010-03-16T16:14:00-00:00</updated>
    <title type="html">Standup 3/16/2010</title>
    <author>
      <name>Sarah Mei</name>
    </author>
    <link href="http://pivotallabs.com/users/sarah/blog/articles/1200-standup-3-16-2010" />
    <id>http://pivotallabs.com/users/sarah/blog/articles/1200-standup-3-16-2010</id>
    <content type="html">&lt;p&gt;Help&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Latest Rails book? One pivot is coming back to Rails after several years away. Recommendations: &lt;a href="http://www.amazon.com/Rails-Way-Obie-Fernandez/dp/0321445619"&gt;The Rails Way&lt;/a&gt;, &lt;a href="http://guides.rubyonrails.org/"&gt;Rails Guides&lt;/a&gt;, &lt;a href="http://railscasts.com/"&gt;Railscasts&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Interesting&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The on302 callback is a myth! One team discovered that if you set a 302 &amp;#40;redirect&amp;#41; 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.&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry>
  <entry>
    <updated>2010-03-15T16:16:00-00:00</updated>
    <title type="html">Standup for the Ides of March</title>
    <author>
      <name>Sarah Mei</name>
    </author>
    <link href="http://pivotallabs.com/users/sarah/blog/articles/1199-standup-for-the-ides-of-march" />
    <id>http://pivotallabs.com/users/sarah/blog/articles/1199-standup-for-the-ides-of-march</id>
    <content type="html">&lt;p&gt;Help&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;One team is starting to use &lt;a href="http://outoftime.github.com/sunspot/"&gt; Sunspot&lt;/a&gt; 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.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Objective C needs a BDD framework. How does Xcode magically know about OCunit? We need to hook in there to have a usable framework.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Interesting&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mountain West Ruby Conf was awesome.&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry>
  <entry>
    <updated>2010-03-12T23:29:00-00:00</updated>
    <title type="html">NYC Standup Round-up for Mar 8th - Mar 12th</title>
    <author>
      <name>Peter Jaros</name>
    </author>
    <link href="http://pivotallabs.com/users/pjaros/blog/articles/1198-nyc-standup-round-up-for-mar-8th-mar-12th-" />
    <id>http://pivotallabs.com/users/pjaros/blog/articles/1198-nyc-standup-round-up-for-mar-8th-mar-12th-</id>
    <content type="html">&lt;p&gt;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!&lt;/p&gt;

&lt;h3&gt;Ask for Help&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://pivotallabs.com/users/pjaros/blog"&gt;I&lt;/a&gt; asked, "In Jasmine, &lt;strong&gt;how do you spy on a constructor?&lt;/strong&gt;"  Suppose you have a constructor called &lt;code&gt;Widget&lt;/code&gt;.  Saying &lt;code&gt;spyOn&amp;#40;window, "Widget"&amp;#41;&lt;/code&gt; swaps out the real &lt;code&gt;Widget&lt;/code&gt; function with a spy.  The real &lt;code&gt;Widget&lt;/code&gt; implementation takes its prototype with it, which means that Widgets created while the constructor is spied on don't get the methods a &lt;code&gt;Widget&lt;/code&gt; would get.  That's true even when you spy with &lt;code&gt;spyOn&amp;#40;window, "Widget"&amp;#41;.andCallThrough&amp;#40;&amp;#41;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;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,&lt;/p&gt;

&lt;p&gt;Widget.should_receive&amp;#40;:new&amp;#41;.and_return&amp;#40;my_fake_widget&amp;#41;&lt;/p&gt;

&lt;p&gt;because &lt;code&gt;.new&lt;/code&gt; is a class method.  But in Javascript, &lt;code&gt;new&lt;/code&gt; 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.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Update&lt;/strong&gt;&lt;/em&gt;: This is, as it turns out, entirely incorrect.  Jasmine's &lt;code&gt;.andReturn&amp;#40;&amp;#41;&lt;/code&gt; &lt;em&gt;does&lt;/em&gt; let you stub constructors properly.  I still have no idea how this works.  See the comments for more discussion.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Interesting Stuff&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Todd notifies us that in ActiveRecord, &lt;strong&gt;dynamic finders with too-few arguments fail silently&lt;/strong&gt;.  That is, if you say,&lt;/p&gt;

&lt;p&gt;Person.find_by_first_name_and_last_name_and_email&amp;#40;"Todd", "Persen"&amp;#41;&lt;/p&gt;

&lt;p&gt;and fail to specify a value for &lt;code&gt;email&lt;/code&gt;, the value is taken to be &lt;code&gt;nil&lt;/code&gt;.  That means that the finder will look for someone named "Todd Persen" with a &lt;code&gt;nil&lt;/code&gt; 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.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You already know that Pivotal does real &lt;a href="http://en.wikipedia.org/wiki/Extreme_Programming"&gt;Extreme Programming&lt;/a&gt;.  But did you know that we have...&lt;strong&gt;Extreme Breakfast&lt;/strong&gt;?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src="http://assets.pivotallabs.com/567/original/extreme_breakfast.jpg" /&gt;&lt;/p&gt;</content>
  </entry>
  <entry>
    <updated>2010-03-12T17:14:00-00:00</updated>
    <title type="html">Standup 03/12/10</title>
    <author>
      <name>Rajan Agaskar</name>
    </author>
    <link href="http://pivotallabs.com/users/rajan/blog/articles/1197-standup-03-12-10" />
    <id>http://pivotallabs.com/users/rajan/blog/articles/1197-standup-03-12-10</id>
    <content type="html">&lt;h2&gt;Helps&lt;/h2&gt;

&lt;p&gt;Q: How can I plot thousands of points on a Google Map without said map being undraggable? 
A: It may make sense to use &lt;a href="http://geochalkboard.wordpress.com/2009/03/11/density-mapping-in-google-maps-with-heatmapapi/"&gt;Google's HeatMap API&lt;/a&gt; after the number of plotted points exceeds 500. Other strategies are discussed here: &lt;a href="http://www.svennerberg.com/2009/01/handling-large-amounts-of-markers-in-google-maps/"&gt;Handling Large Amounts of Markers in Google Maps&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Interesting&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Using &lt;a href="http://david.dojotoolkit.org/recss.html"&gt;ReCSS&lt;/a&gt; with Sass. 
If you happen to be using SASS you can still make use of awesome ReCSS bookmarklets &amp;#40;including &lt;a href="http://www.eahanson.com/2009/02/28/a-bookmarklet-to-reload-a-pages-css/"&gt;one by Pivotal's own Erik Hanson&lt;/a&gt;&amp;#41; by using the &lt;a href="http://wiki.github.com/chriseppstein/compass/command-line-tool"&gt;compass command line tool&lt;/a&gt; and watching your project for changes. &lt;em&gt;Totally rad!&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://www.rubyenterpriseedition.com/"&gt;Ruby Enterprise Edition&lt;/a&gt;
Is awesome, if you use the &lt;a href="http://www.rubyenterpriseedition.com/documentation.html#_garbage_collector_and_object_space"&gt;garbage collection tweaks&lt;/a&gt;. 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. &lt;em&gt;2 legit!&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;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. &lt;em&gt;That's def!&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Spring Forward this Sunday to save the daylight, and terrorize the programmers. Thanks a lot, farmers-slash-botanists. &lt;em&gt;WORD Y'ALL. I'M OUT.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry>
  <entry>
    <updated>2010-03-11T20:18:00-00:00</updated>
    <title type="html">New Tech Talk: Making Stuff People Love</title>
    <author>
      <name>Sean Beckett</name>
    </author>
    <link href="http://pivotallabs.com/users/seanb/blog/articles/1196-new-tech-talk-making-stuff-people-love" />
    <id>http://pivotallabs.com/users/seanb/blog/articles/1196-new-tech-talk-making-stuff-people-love</id>
    <content type="html">&lt;p&gt;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 &lt;a href="http://pivotallabs.com/talks/92-making-stuff-people-love"&gt;presents a draft set of patterns&lt;/a&gt; in the context of crafting an iPhone app.&lt;/p&gt;

&lt;p&gt;See all our talks at &lt;a href="http://pivotallabs.com/talks"&gt;http://pivotallabs.com/talks&lt;/a&gt;&lt;/p&gt;</content>
  </entry>
  <entry>
    <updated>2010-03-11T18:46:00-00:00</updated>
    <title type="html">Standup 03/11/2010: parallel_tests, RubyMine spec click-through bug</title>
    <author>
      <name>Chris Heisterkamp</name>
    </author>
    <link href="http://pivotallabs.com/users/cheister/blog/articles/1195-standup-03-11-2010-parallel-tests-rubymine-spec-click-through-bug" />
    <id>http://pivotallabs.com/users/cheister/blog/articles/1195-standup-03-11-2010-parallel-tests-rubymine-spec-click-through-bug</id>
    <content type="html">&lt;h2&gt;Interesting Things&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A few projects are using &lt;a href="http://github.com/grosser/parallel_tests"&gt;parallel_test&lt;/a&gt;  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.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;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 &lt;a href="http://youtrack.jetbrains.net/issue/RUBY-5832"&gt;ticket&lt;/a&gt; they filed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;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&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;</content>
  </entry>
  <entry>
    <updated>2010-03-11T01:57:00-00:00</updated>
    <title type="html">New Tech Talk: Scala + Lift, Quite a Pair</title>
    <author>
      <name>Sean Beckett</name>
    </author>
    <link href="http://pivotallabs.com/users/seanb/blog/articles/1194-new-tech-talk-scala-lift-quite-a-pair" />
    <id>http://pivotallabs.com/users/seanb/blog/articles/1194-new-tech-talk-scala-lift-quite-a-pair</id>
    <content type="html">&lt;p&gt;David Pollak and Martin Odersky &lt;a href="http://pivotallabs.com/talks/91-scala-and-lift-quite-a-pair"&gt;discuss the power of Lift&lt;/a&gt;, 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. &lt;/p&gt;

&lt;p&gt;See all our talks at http://pivotallabs.com/talks&lt;/p&gt;</content>
  </entry>
</feed>
