My articles, essays, and ramblings.
Minitest Quick Reference
UPDATE: I’ve added a new section on stubbing with MiniTest and a few helpful comments to the code samples. MiniTest, as the name suggests, is a small and fast unit testing framework. Shipped with Ruby 1.9, MiniTest supports a complete suite of testing capabilities such as TDD, BDD, mocking, and benchmarking.
Ruby Blocks as Dynamic Callbacks
Callbacks are a great technique for achieving simplicity and flexibility. Simply put, a callback is a block of code passed as an argument to a method. In Ruby, code blocks are everywhere and Ruby makes it trivial to pass a block of code to methods.
Nyan Cat RSpec Formatter
I watch a lot of tests run in a given day. So I figured why not make it more fun. Inspired by minitest’s pride, and um cats? I came up with a Nyan Cat inspired RSpec formatter. Update: After last week’s launch, Nyan Cat received a great response from the Ruby world. Over the weekend, I released version 0.0.2.
Gaga, A Git-Backed Key/Value Store
Gaga originated from my winning entry in Codebrawl’s Key/Value Store contest. The challenge was to write the best key/value storage backend you can think of. Since Git is fast, reliable, and a great tool for storing source code, I was really interested in making an easy way to store key/values.
Print Stamps With Ruby!
I’ve just released Stamps - A Ruby gem for creating postage labels, calculate the shipping cost of packages, standardize domestic addresses via USPS CASS certified Address Matching Software, and track shipments using the Stamps.com Web Services API.
Easy Multiple Account Management for Heroku
Recently, I migrated all of my personal and business sites to Heroku. Heroku, as you may know, is a fantastic service for hosting ruby applications. Oh, and it’s free! Like a lot of folks, I keep work and personal items such as email, bank accounts, github, etc in separate accounts.