Posts

Showing posts with the label Rspec

Podcatcher Prototyping

I started this podcast project so I could learn some things I haven't had time to experiment with in my "real" job. Things like playing more with Ruby, trying out Behavior-Driven Development, and experimenting with Agile practices (plus I really wanted a better podcatcher program and I needed something to do over the winter). While I haven't produced much real code yet, I've created some simple prototypes and wanted to comment on some things I've been looking at. Reading an RSS feed My first prototype was a very simple Ruby program to read and parse an RSS feed. I had found some code here using the standard Ruby RSS Parser so that's where I started. At first I thought it was broken, but after about a minute and a half it returned. This wasn't going to cut it, so I started to look for alternatives and quickly found the feed-normalizer gem. Some quick coding and the total time to access the RSS feed was reduced to about 10 seconds. Not bad...

Behavior Driven Development

If you haven't seen some of the Rails vs. _____ (Java, ColdFusion, .Net) links, I made available in the " Related Articles " section, you should check them out. They're really clever. The guys over at RailsEnvy do a great job with these. They've also released a presentation about testing , introducing me to Behavior Driven Development which is like Test Driven Development , but with purpose. Instead of testing individual functions, Behavior Driven Development tests specific user actions and the result of these actions. The result of creating these behavior driven tests is a specification for how your application will perform... with a final application behaving in this manner after all tests pass. For Ruby, there is a framework called RSpec which can help facilitate this process. For a while I've wanted to adopt a more test driven approach to my development. There are a lot of benefits: you only build what you need (don't overbuild), you know ...