Updates behind the scenes
I just deployed an update to the site which changes the way cookbooks and magazines are added to the site. The changes for magazines are minimal (though you may see errors if you try adding a magazine which doesn’t exist). For cookbooks, however, the change is pretty big.
Formerly, we searched for your book by title or author or ISBN on Amazon, and if we didn’t get back an exact match, we showed you a big list of options and let you pick your book from that list. (If we got an exact match, we skipped the options step.) The code we’re using now (I’ll explain the technical reasons for the change at the end of this post) simply fills in the result with the highest sales ranking and shows you the confirmation page.
This is fine if it picks the book you wanted, but in some cases (when searching by author, for example) you may find it difficult to get the cookbook you were looking for. We suggest you search by title (as exact a match as you can manage) or, if you have it, the ISBN, which will always return a single match.
The reason for the change is that the Ruby library we were previously using, Ruby/Amazon, relied on the 3.0 version of Amazon’s web services, and Amazon is turning off that version next week. Because the updated version of Ruby/Amazon is still under active development (meaning unstable) we opted for an entirely different package, the acts_as_amazon_product plugin from Netphase. We tweaked it a bit to remove its default limitation to book searches (our version accepts an optional parameter to search any of the stores exposed in Amazon’s ECS) but it does return only one result. The gem it wraps, Amazon-ECS, does support multiple-result queries, so if you miss this service we may be able to revive it with some lower-level hacking.
Using AAAP cut several dozen lines of code out of our codebase, and thus is a good example of the kind of work we’re doing on CK these days: quiet tightening and refactoring behind the scenes.
One Response to “Updates behind the scenes”
Leave a Reply
You must be logged in to post a comment.

[...] Kitchen got a typical update earlier this afternoon, in which we updated the process for adding cookbooks and magazines to the [...]