Our friends at Carbon Five have just announced Story Mapper, a release planning tool for your Pivotal Tracker projects. Story Mapper uses the Tracker API, and allows you to plan and manage your project milestones and releases at a high level. We’ve already begun to use Story Mapper on our projects at Pivotal Labs, and are excited about how well the tool complements Tracker and our planning process.
Check out Carbon Five’s blog post on Story Mapper to find out more, and to start using it today.
Ask for Help
“Is there any library for Base64 encoding on the iPhone?”
Some Pivots created a jasmine-nodejs project to run your Jasmine specs headless using node.js
A team was getting the below error numerous times while running tests. They managed to track it down to a libxml / Nokogiri load order problem. The errors go away if they require libxml before they require Nokogiri.
ruby(59005,0xa0797720) malloc: *** error for object 0x9586b80: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
John Allspaw often sees stability and productivity benefits from deploying small code changes more frequently. This talk describes how to determine the right balance for your environment, as well as how effective your current operational processes are.
Spring is just around the corner, and it has been a beautiful week here in sunny NYC. We’ve learned a lot this week, as you’ll see as we do the Round-up!
Ask For Help
- Kevin and I are having a heck of a time using Web Driver to drive an app that uses Google Maps. Whenever we click on or type into anything displayed on the map, the contents of the map (including the Google logo and the zoom control) move about 20 pixels up. Our tests seem to still work, it just looks like it’s broken. Anyone else seen this or know what might cause it?
Kevin and I discovered that Capybara’s
Todd found out the hard way that Ruby’s
String#sprintf (also seen as the
String#%) will cast your string numbers to octal if you’re not careful. Behold:
>> "%d" % "010"
>> "%d" % "08"
ArgumentError: invalid value for Integer: "08"
from (irb):2:in `%'
Make sure you don’t feed
sprintf a string number that starts with a
0 unless you mean it to be octal.
Rachel tells us that there’s an upcoming Rails workshop for women in NYC. Rumor has it that Pivotal’s own Sarah Mei is behind it. She’s been known to do such things before. Details as they become available.
Pat’s improv show is tonight! Check him out at the Magnet Theater.
- 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.
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.
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:
- Edit some files in TextMate
- Leave TextMate running in the foreground
- Switch to console and “git pull” in the latest code from your workmates
- Run a search-and-replace that edits a file that was changed (by someone else) during the merge
- 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.
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
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
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,
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.
Todd notifies us that in ActiveRecord, dynamic finders with too-few arguments fail silently. That is, if you say,
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?
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
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.
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