be nice to ducks or I will mock you

Posted by Mike Thu, 24 Jan 2008 20:18:00 GMT

When I first started programming Ruby I lurked on the Seattle.rb mailing list and then gathered the courage to finally attend a meeting. At the time I had written a Perl script that did the basics of what MMS2R does and it was lucky for me that Aaron Patterson who coincidently maintains WWW::Mechanize was also a member of Seattle.rb. My Perl script was using Perl’s original version of WWW::Mechanize to scrape pictures from MMS that were sent by mobile subscribers to Sprint.

I knew that it would be a great experience to me if I converted the Perl script into a Gem. I would be contributing to the Ruby community, I would be learning how to author a Gem, and I would improve on my coding and testing abilities.

A testing problem I was perplexed with was how should I test my code that reaches out to Sprint’s content servers to scrape images? The other cellular carriers actually deliver their images mime-encoded in the MMS payload so testing them in a closed environment is simple enough with a fixture.

Posted in ,  | Tags , , ,  | 3 comments | no trackbacks

Test Driven Development In Rails (TDD)

Posted by Mike Wed, 18 Oct 2006 06:38:00 GMT

I was talking to Geoffrey Grosenbach (of nuby on rails fame) at Seattle.rb tonight mostly about Typo and his new Peep Code screen casts. Somehow he told us that his next Peep Code screen cast was going to be on TDD. That was my opening to complain about actually writing the test first. To be frank, I put my foot in my mouth, and unit testing in Rails has changed the way I code and in turn has made me a better programmer.

Posted in , , ,  | Tags , , ,  | 2 comments | no trackbacks

Web Statistics