pre|central.net has posted their picks for Best Apps of 2009, and they’ve picked both of the apps we developed internally as must-have apps in their categories, with Tweed at the top of the list in the Social Networking category, and Scoop being edged out by The New York Times in the News category. (We will concede that they have a little more experience in the News world than we do. ;-) The AP Mobile app also gets a shout out in the News Category, which some of you know is another app we developed, in this case on behalf of a client.
Thanks to the pre|central folks for picking our apps, and to all our users for installing those apps, and for all your feedback.
Ask for Help
“Anyone have good strategies for using S3 as a content delivery network for static files?”
Using S3 as a CDN is pretty common. S3 is certainly cheap, and fairly easy to set up. However, latency can be large – S3 isn’t built to act as a CDN, so the performance can be lacking. In addition, you need to work out your pathing in your CSS files to find background images correctly. Relative paths are a common technique here.
The performance of files in your public directory is much better. Amazon’s Cloudfront is another (expensive) option.
Note observation #4 in this blog article: link
“I can’t get ImageMagick to work on Snow Leopard. What gives?”
A brief look online shows several step-by-step instructions. It’s unclear what this particular problem is about.
“After upgrading to the latest version of Mocha, any_instance doesn’t clean up after itself. Why?”
Mocha‘s any_instance stubbing is one of the few features that distinguish Mocha from other mock frameworks.
There are arguments against using this style of coding, because it adds global behavior to your tests that can be hard to diagnose.
One suggestion was to update rspec as well.
More info about the CPP workflow
“Heroku 1.5.3 isn’t letting me use heroku rake commands. What can I do?”
Upgrade to Heroku 1.5.6.
EY Cloud’s slave database functionality is broken right now. It’s supposed to be fixed this afternoon.
Amazon restricts you to 20 EBS volumes/EC2 instances per account by default. The trick here is that deleting volumes does not immediately free up space. Volumes stay in a ‘Deleting volume’ state for an indefinite amount of time before they are truly free, making it hard to allot space for them. Finding these deleting instances can be a real challenge – the AWS API can find them, but not the EY cloud GUI.
If you need to manipulate AWS credentials for EY Cloud, it’s fairly easy to go to the machine and find the appropriate file – /etc/.mysql.backups.yml
We’re starting work on Tracker badges and widgets. Our goal is to allow you to share information about your project or backlog on your website, or to promote Tracker and Agile Software in general.
Our current thinking is a few widgets that expose project summary data and stories, as well as something along the lines of “I <3 Tracker”/”I <3 Agile Development” badges for those who just want to spread the love without sharing their private project data. We imagine these being used on open source project pages, personal websites, and blogs.
So I ask you: What information would you like to share (story summaries, upcoming stories, members, etc?). If your project is private do you want to be able to expose some of this information anyway? If you are interested in sharing your love of Tracker and Agile Software but not your project data what kind of badge(s) would you want?
As always, thanks for your feedback!
Ask for Help
“Ever since we upgraded to RSpec 1.2.9, we haven’t seen any stack traces. What gives?”
One of our projects lost stack traces as soon as they upgraded to RSpec 1.2.9. Reverting to RSpec 1.2.8 fixed the problem. No other projects have reported the issue yet.
- Working with Rails for several years means that, as Rails advances, our testing/mocking codes get stale. We just discovered that one of our old mocks for representing the ‘flash’ object no longer works as designed with the current version of Rails.
More on the FlashHash
Here’s an approach that used to work in Rails 2.1/2.2:
- Stub FlashHash.new to create a MockFlashHash rather than a real
- MockFlashHash does nothing when sweep is called. The sweep method cleans out the flashes that have been used, and the act of rendering uses up all of the flash.now objects.
- You can enhance MockFlashHash to behave the same way that a view would use a flash, allowing your tests to assert that a response should show a particular flash, without specifying whether you used flash or flash.now to do it.
Rails 2.3 changes the Flash cycle from what earlier versions of Rails did.
In Rails 2.2 and before, calling ‘flash’ accessed a session variable directly (assuming you have a session). You would then manipulate that session variable, which was an instance of FlashHash. It was therefore fairly easy to replace FlashHash with another type of object.
In Rails 2.3, the cycle is a little bit different. Instead of manipulating the session directly, calling ‘flash’ sets an instance variable. At the end of the request, that session variable is stored to the session using a new method signature – flash.store(session). (Note that flash extends Hash, so this overrides the standard Hash.store)
This approach breaks encapsulation, forcing the FlashHash object to know about the session and forcing any mock replacements to know how to store themselves to the session.
Written by our friends at Hashrocket, Slurper lets you create stories as plain text files and import them into Tracker via the API. Also, if you use Vim, check out slurper.vim, a Vim companion script with syntax highlighting and key mappings.
Adam Lowe’s blog post talks about these really useful new tools in more detail.
For other Tracker tools, see the 3rd Party Tools page.
Ask for Help
“What’s a good design for sharing a page cache across multiple servers?”
One of our clients would like to have a distributed server environment share its page cache. At this point, they’re relying on GFS to do this.. but this solution appears to have problems with reliability.
Several engineers questioned the necessity for such a thing, but memcached appeared to be the solution of choice.
“Any information on RabbitMQ?”
One of our engineers is beginning to play with RabbitMQ. Anyone who has good comments about this technology, please feel free to chime in.
- load “location” and require “location” do not play nicely with Rail’s automatic class reloading.
Rails maintains an internal array of files that it ‘knows’ about for this purpose. However, load and require bypass this mechanism, and lock files into place.
If you’d like to add a require that will class-reload, use the command ‘require_dependency “location”‘. This command, added by Rails, will require the file AND add it to ActiveSupport.
No matter what point scale you use to estimate stories, and if you call them “points”, “gummi bears”, or “t-shirts”, people always want to know what they mean. The problem is that the keepers of the points don’t know how to relate to the users of the points.
Joe: “Oh look a new story in the icebox!”
Sam: “Let’s estimate it!”
Joe: “Sure, what’s a ‘one’ work out to be in terms of effort/complexity?”
Sam: “That’s like… half a day”
I’ve been in Joe’s shoes, and I’ve been Sam too many times. Do you see the disjoint? Hint: check the bold. Joe asked about effort/complexity because those are things he can estimate with some degree of accuracy. Sam jumped to the lowest common denominator, and converted his concept of a one point story into a unit of time.
Problem: Velocity is the conversion factor from points to time. Velocity is useful, Sam is not (no offense if your name is Sam).
A “one” is what then? It varies from team to team. How do I get Joe up to speed on point values then? Common ground, relate to Joe. We’ve all done some programming before. Maybe a one is “a batch of CSS changes”, and two points works out to “administrators should be able to edit all product fields”. Then you work your way up to “make a web-based zoo” which is wherever your point system tops out because it has a lot of unknowns and/or complexity.
Relation Points, use them to relate to your fellow developers. Use them to relate to your product owners and managers. Start speaking in terms that show you’ve got more knowledge about the development cycle than a random guy off the street. Anyone can give you the time, but what you really want… is to get to the points.
Ask for Help
“How do I make attachment_fu use both the file system and S3 as storage backends?”
One of our clients would like to migrate attachments from the file system to S3. They want a clever way to make attachment_fu look in S3 or the filesystem, where new files are in S3 and old files are in the filesystem.
Their current solution, which they’re not super happy with, is to monkeypatch the S3 backend by extending it with file system methods. This solution doesn’t really seem to work too well, since the two backends share some of the same methods, and calling “extend FileSystemBackend” doesn’t give them the freedom to pick and choose their methods. In addition, their patch makes the S3 backend not be an S3 backend any more, which could cause problems for maintenance down the road.
A better solution is to define a new backend object, based on the S3 backend but falling back to file system-style methods. Attachment_fu supports defining custom backend modules; a class using :storage => :my_storage would look for a backend module called Technoweenie::AttachmentFu::Backends::MyStorageBackend.
Attachment_fu still has a design problem. The backend objects are all modules, not classes. As a result, it’s not easy to make a new backend descend from one of the existing backends.
- The new version of the bundler gem, version 0.7.2, does not seem to be Ruby 1.8.6 compliant. The gem relies on symbol.to_proc, which is part of Ruby 1.8.7 (and Rails). A native Ruby 1.8.6 without Rails does not support this method.
Issue tracking: http://github.com/wycats/bundler/issues/#issue/134
MobiTracker, written by Steven Nie, is a new iPhone app for Pivotal Tracker. It uses the Pivotal Tracker API, and supports off-line reading and editing of stories, search, email, and more.
MobiTracker is available for download now on iTunes.
Ask for Help
- “Does anyone know why directory globbing order differs by system architecture?”
This problem bit this stand up blogger yesterday. An entire directory was required, and on a mac the order is alphabetical. On linux it’s apparently random, most likely based on inode order. Ruby doesn’t gaurantee an order, so something that may “just work” on a mac purely by luck might not work on linux/bsd/windows.
- “Is anyone using unicorn on EngineYard?”
*Keep files continued – The keep file will cause the original file to be retained, so just touching the keep file is fine. No need to mess with sym links or anything of the sort
Yesterday we held a TUG over lunchtime at our San Francisco offices. The subject was “Tracker 101″. Thanks to all those who came; some good questions came up, and we hope you found it useful!