Pablog

“Talk is cheap. Show me the code.” - Linus Torvalds

My First Unit Test

I finally figured out the trouble I was having with the unit test for my bugfix.  It’s one of those things where I still don’t exactly understand why doing what I did made everything work, but I’ll accept it and do the dance of victory.

What happened was I got the test all set up, populating the database with a fake album with five images, then calling the function I just fixed to give me five random images from that album.  Before doing this I rigged the next call to rand() to return a Very High Number, such that when the original query is fired, it will definitely not return all of the images, and my new added requery will be required. This was all well and good, but when I ran the test, it kept telling me it was getting back 0 images when it asked for 5. First I thought I needed to force an update of the ImageBlockCache, which is where the random numbers are checked, but it turns out all I needed to do was to generate derivative thumbnails for the test data after I insert it. Whodathunk?

Now that everything is working, though, the unit test is pretty darn cool. Red light before my bugfix, and green light afterwards. Nothing like color-based motivation.

May 20th 2008
Tags: gsoc

No Comments

Commencement

So, I've been accepted to Google Summer of Code 2008 with Gallery, "the open source web based photo album organizer".  My project title is "Facebook / Flickr Style Image Region Based Tagging" and I will be working out of Milwaukee, WI for the summer.  I'm incredibly excited to get started, and ...
August 24th 2007
Tags: tech

No Comments

Merging PDF files on OS X (and failing)

I need a place to write down technical stuff, and for now this will be it. Here's what I'd like to do: I'd like to merge several PDF files into one, multi-page PDF file. Simple, right? Seems like something I should be able to do in my favorite way ...
April 23rd 2007
Tags: report

2 Comments

“If you love something you can put beauty into it.”

It's early Monday afternoon and I'm sitting in the library to avoid the rather immense level of ambient noise that tends to permeate the public areas of the "Facultad de Filosofía e Historia B" building. I've got 40 minutes until class. This weekend was a trip sponsered by the Marquette ...
April 11th 2007
Tags: meta

4 Comments

Running for the bus

In the past 11 days I have been in four cities in three different countries, each with its own language and culture.  So much has happened in this time, but I have so little to say about it.  Several times on the trip I sat down with the intention of ...
March 28th 2007
Tags: report

One Comment

Kilbourn and the Seventeenths: European Tour Dates

Tomorrow is my last exam, and then straight away I leave with Jenny, Lauren, and Katie for an eleven day tour that will bring us to Milan, Venice, Salzburg, and Munich. It will surely be awesome, though at this point the whole idea is a little daunting--it's hard to ...

Search

The archives run deep. Feel free to search older content using topic keywords.