Sam Pierson's blog



Sam PiersonSam Pierson
Standup 04/29/2009: Shared examples pollute; SWFObjects + Asset Packager
edit Posted by Sam Pierson on Wednesday April 29, 2009 at 04:16PM

Interesting

  • It looks like Rubymine 1.0 is out.

  • Shared examples pollute! If you import a shared example into an RSpec group, the before :each appears to run for all examples in that spec, not just the ones in the current scope.

  • SWFObject + AssetPackager = :(
    SWFObject stops working on some platforms (IE, FF2 on Windows, and others) when used in conjunction with AssetPackager. This will make you sad; don't do it.

Sam PiersonSam Pierson
Standup 04/28/2009: Handling failures in SQS; SF.TUG; Aviary.com; Delicious Monster.
edit Posted by Sam Pierson on Tuesday April 28, 2009 at 04:06PM

Help

"Anyone have experience dealing with failures in Amazon SQS?"

  • Amazon Simple Queue Service is a reliable, highly scalable, hosted queue for storing messages as they travel between computers. You can place tasks in a queue and have worker systems extract and process them. However processing a queue item does not delete that item; you have to explicitly delete a queue item. The problem occurs when a persistent catastrophic failure occurs during processing of an item, e.g. a process core dump (say RMacick encounters an Image of Death) that does not produce an exception. Eventually SQS will timeout and mark the task as requiring processing again. Eventually all yor workers will try to process the queue item and die. There was a lot of discussion (e.g. communicate task status back to app server - too chatty, not scalable) but no obvious solutions arose that will work in the particular environment.

Interesting

  • SF.TUG: The first Tracker User Group will meet tomorrow. This one is somewhat exploratory, to see what the community wants out of it, so it is being kept purposefully small.

  • should_not is not the same as !=. Apparently, it is a feature of Ruby that you can override == but you cannot override !=. Rspec implements == but cannot implement !=. Sometimes you will get objects that will give different results when compared using should != as opposed to should_not. Use should_not.

  • Aviary.com is an online Photoshop-like too. They also have a vector editor. It is free, however they may reuse images you store on their site.

  • Pivotal Library: We are getting a tool from Delicious Monster to automate our library. It will scan barcodes, categorize books and allow people to check books in and out.

Ask For Help

  • GemInstaller can fail to install either gem if it encounters two gems in the repository that have the same name but differ in case. Don't ever change the name of a gem or Adam Will Find You.

Interesting Things

  • Wrapping multiple named_scopes in a class method then attempting to compose that into another list of named scopes works most of the time :( If it is the first method in the new chain of named scopes, then it will work, otherwise, not so much (it forgets about any constraints from prior named_scopes). This pattern is best avoided.
  • We are pleased to announce the existence of gems.pivotallabs.com, a maintained repository for public Pivotal gems. To see it's contents try:
gem list --remote --source=http://gems.pivotallabs.com

Other articles: