What's all this?

Dojo7 is the tech blog of Peter Hollows, Rubyist and system designer. This blog is about sharing solutions and insights.

Long Running Data Migrations in Rails

a post by Peter Hollows about rails, useful gems, and database fu.

Projects almost never start with an empty database. There are many takes on how this initial data, or data processing tasks, should live in your application. This approach keeps data out of your migrations and remains flexible enough to run with all the methods available to a standard migration, plus some extras. Initial application data, a...

Easy RSS in Rails 2

a post by Peter Hollows about RSS and rails.

A simple approach to generating RSS feeds in Ruby on Rails. Our approach keeps your code DRY and uses a RESTful approach for minimum efforts. As a bonus, the W3C RSS validator has no complaints with the result. If you're wanting more than...

Formatting currency in Javascript

a post by Peter Hollows about javascript.

I’ve been hunting for something like Rails’ number_to_currency for Javascript that’d give me a delimited output with precision in cents. Most of what I found didn't...

Scraping the New Zealand Whitepages with Ruby

a post by Peter Hollows about web scraping and useful gems.

In New Zealand, telcos don’t expose their directories sensibly to the public, so if your script needs to look up numbers for a given name there is no RESTful API. Instead, these companies provide us the data in a challenging HTML format; this is because they are nice and want to give us a fun scripting project. Web-scraping means parsing ...