How I became convinced to use db:populate instead of db:migrate with inline data seeding, and why you should too.

11 November 2009


How I became convinced to use db:populate instead of db:migrate with inline data seeding, and why you should too.

There’s a lot of established debate and best practice around how to populate your database with the initial reference data it needs in order to operate. I’m not going to rehash that here. If you’re interested in the options available for seeding data, read Luke Franci’s article on Rails Spikes. Many people I work with […]

Continue reading... Source Code released

4 December 2008


A number of VoteFu users have asked me for help integrating VoteFu into their codebase. I recognize that this means I’ve probably left the documentation lacking in a couple of places, but in order to immediately help those folks who want a reference implementation of VoteFu, I am releasing the full source code of […]

Continue reading...

Amusing Javascript Snippet

3 December 2008


I saw this posted on Jacqui Maher’s blog today and was so amused I had to reblog it. if (!(typeof worldHasEnded == "undefined")) { document.write("YUP."); } else { document.write("NOPE."); } From Aside from the very obvious “you don’t need to negate that test condition, just reverse your simple if and else clauses” issue, it’s […]

Continue reading...

VoteFu 0.0.7

2 December 2008


A couple of contributors forked VoteFu and submitted some patches. I’ve updated the master branch to integrate the changes. Notably: VoteFu now works as a standard gem in a Ruby application. (i.e. not as a Rails plugin) VoteFu now works as a Rails Gem Plugin. VoteFu now works with Rails 2.2.2. Other assorted small bugfixes. […]

Continue reading...

Book musings: Ubuntu Kung Fu is released and other fun

24 September 2008


I absolutely LOVE the cover of this book. And the book itself looks pretty decent, though how the author fills 300 pages with tricks and tips on Ubuntu it beyond me. I’m not sure when it happened, but the technical world starting using amusing pictures of animals on the covers of their books some time […]

Continue reading...

Visualizing user interaction with your site.

4 September 2008


I really like the app on AngelSoft’s new homepage. A long time ago I created an app that would post messages to the homepage in a ticker when site visitors would do stuff. It was for a liberal political action NGO. From the homepage of this NGO’s site the ticker would flash messages like “A […]

Continue reading...

VoteFu gets a couple enhancements

23 July 2008


The lastest version of VoteFu has a few useful enhancements: Protect against mass assignment forgery. The params hash will only be consulted for :vote => true or false. The rest has to be assigned in the controller. The acts_as_voteable mixin now has support for tallying votes. The documentation will be updated tonight, but briefly, here […]

Continue reading...

You are invited to my open alpha of

21 July 2008


Quotes. I love quoting people. I have a ton of quotes saved in text files, on my blog, in my various mood messages on IM platforms, and who-know-where-else. I decided to build an application to manage, organize, and syndicate quotes. You can read more about it on my project page for MyQuotable. If you read […]

Continue reading...

acts-as-taggable-on and space delimited tag lists

14 July 2008


UPDATE: I made the classic coder mistake, and didn’t dig into the plugin code before working around it. I am leaving this post up instead of being embarrassed and deleting it because it a good example of why you should read your plugin code. After reading the code, I found that TAGLIST IS JUST AN […]

Continue reading...

Announcing VoteFu

13 July 2008


VoteFu is a voting mixin that allows you to extend your models to vote on one another. Largely based on Cosmin Radoi’s acts_as_voteable plugin, VoteFu adds named_scope support, a set of generators to make using the plugin easier, a :polymorphic association to the voting class (so you can have more than one model type perform […]

Continue reading...