Category Archives: Programming

Taking your cucumber tests back to the future with Delorean

I’m currently working on an API for Vquence’s VQdata product which allows our customers to use a REST interface to retrieve videos with certain keywords they have previously stored. While writing tests I need to be able to mock out the Time object so that my tests were deterministic relative to time. I remembered listening [...]

Changing the type on a legacy table in ActiveRecord

I’m doing some work for a client which involves extracting some data from a legacy database and displaying it in a web interface. One of the fields in the table is the number of megabytes included in the quota. For some crazy reason this is defined as follows: CREATE TABLE quota ( bandwidth_in_included DECIMAL(8,2) ); [...]

bzr-svn and svn revisions

I was updating an svn branch today using bzr, thanks to bzr-svn, and I wanted to know what svn revision I was at. You can easily see the bzr revision by running johnf@zoot:~/trunk$ bzr revno 34 But it gives no indication of where you are in SVN land. After a bit of rummaging around I [...]

Rails, ActiveRecord, MySQL, GUIDs and the rename_column bug

Since I wasted over 4 hours of my life today working my way through this problem I feel the need to share. Since it seems to be the in thing in the Web 2.0 space, just to be cool, we use GUIDs to identify different objects in our URLs at Vquence. For example my randomly [...]