Archive for the 'Rails' Category

It’s Not Just About Code – A Boston.rb Presentation

Wednesday, November 11th, 2009

Last night I spoke @ Boston.rb about everything that happens around code.

Lately, I’ve been heavily interested in discussing the process behind software development. Our field is still very young, and I think there’s a lot we can do to improve the way in which we do our jobs.

Slides are below. I described the talk this way: We spend so much time focusing on conventional programming. Everyone focuses on standards, code clarity, testing, and what gems to use. Let’s chat about what’s done before your fingers hit the keys. Let’s talk about brainstorming, requirements, stakeholders, mock-ups, and writing solid user stories and acceptance tests with Cucumber. Every project has a story – how will your next one end?

If you attended the talk, I would love your feedback at SpeakerRate

Amazon Associate is deprecated in favor of ramazon_advertising

Wednesday, October 28th, 2009

Are you looking for a web wrapper for the Amazon Advertising API for your Ruby on Rails Application? ramazon_advertising is a library that provides this. It supports request signing.

The Amazon Advertising API allows you to retrieve Amazon catalog data and use it in your application. It can be really handy if you’re participating in the Amazon Associate’s Program

There are a few users of Amazon Associate that might want to know that I’m deprecating the library in favor of ramazon_advertising. Amazon Associate was an older library that I was maintaining. It uses HPricot and really doesn’t jive well from a design standpoint, so amazon_associate is deprecated in favor of ramazon_advertising

Ramazon Advertising uses John Nunemaker’s awesome library happymapper along with nokogiri selectors. It’s much more object oriented and cleaner, so I hope you’ll enjoy using this library.

Right now, it supports product data acquisition via the ItemLookup request. Here’s a simple example where you can find the product data for a given asin:

@products = Ramazon::Product.find(:item_id => "B000NU2CY4", :response_group => "Medium")
@products[0].title
@products[0].asin
@products[0].upc
@products[0].large_image.url
@products[0].url
#you can also use a nokogiri search string to get elements that don't have built-in accessors
@products[0].get("ItemAttributes Actor").collect{|a| a.content}

The ruby gem is available on Gemcutter and the documentation is available at rdoc.info. Patches and feature requests are welcomed!

Friday’s Software Enlightenment #4 – Rumble Edition

Friday, August 28th, 2009

The 2009 Rails Rumble was a huge event! The results are simply stunning with great apps like Lowdown and hi.im. It really is amazing what can be built in 48 hours. If you get a chance, please head over, register and vote on the Rails Rumble Site

So without further ado, here’s some tools I found immensely useful in the creation of my rumble app. I’d really like to write a full post mortem, but in the spirit of Friday’s short list of links, here goes:

  • SearchLogic – excellent derived named scopes and search form capabilities.
  • AuthLogic – my favorite authentication system out their for Rails today.
  • Formtastic – a great utility for generating forms quickly.
  • Inherited_Resources – Jose has done an awesome job with this helper that handles your typical (and not so typical) RESTful controller actions
  • Stringex – useful for permalinking
  • under_construction – a handy javascript utility I’ve written to quickly note what design elements need to be implemented from a development standpoint.
  • serverjuice – Great for getting an Ubuntu VM up and running quickly
  • SpreadHead – although it required some adjustments in the way it handles routes, I really think this is a great way to get a quick CMS integrated with your site. It’s definitely useful to have some editable pieces of your application when there’s a code freeze in 48 hours. I currently use it for CMS partials (a way to have editable content inside a page), but I do not for individual pages themselves. There’s an issue in the gem version where the routes are added to the top of priority instead of the bottom. I’m hoping to help with a fix for this
  • tab_menu – I always seem to need tabs or a nice menu system, so I use this code pretty frequently
  • ThemeRoller – easily roll JQuery UI styling.

The combination of formtastic, searchlogic, and inherited_resources has really changed the way I code. I think a post on the power of these tools in combination with chronic

Some of these tools and more are available in the Enlightened Template I maintain on Github. There were some updates after the rumble. I hope you find it useful!

Boston.rb talk on Thinking Sphinx

Wednesday, March 11th, 2009

Last night I did a talk on Thinking Sphinx at Boston.rb.

The slides are below.

Evan’s blog post with the benchmarks can be found here. There are links to other benchmarks and details.

The process library I alluded to is called God.

Other links

Let me know what you thought of the talk and the slides. I hope you found it helpful!

Rails Magazine Inaugural Issue

Sunday, March 1st, 2009

The first issue of Rails Magazine has been published. It looks like there is a lot of great content from some great authors.Rails Magazine

I wrote an article about my switch from RSpec to Shoulda. A lot of issues I discussed have been addressed by both teams. Please participate in the discussion about the latest development in test frameworks.

I think it’s really cool that Rails now has a publication. Props to Olimpiu for putting it together.