I love my cool family!

It's a shame they don't get along :-)
It's a shame they don't get along :-)

Welcome to Valentine’s Day, that annoyingly commercialized annual reminder that we’re actually supposed to care about the special people in our life. As Cory nicely put it

Proving you really care about someone is an achievement that takes effort everyday. Chocolate and flowers on a single day won’t do.

All that said, I figured it wouldn’t be amiss to let my family know how fabulous they are, a non-commercial sort of way of course :-).

The photo up top is from 9 years ago while we were living in the UK during our first sabbatical; Tom was 7 at the time, and Susan hadn’t yet cut off most of her hair. The strip below is from our second UK sabbatical 7 years later; now he’s taller than her and looking suspiciously like a young man instead of a little boy. Both give a sense of how fun it is to live with these two — there’s no question that I’m a lucky, lucky man.

It's a shame they don't get along (7 years later)
It's a shame they don't get along (7 years later)

It was interesting to see how few photos I have of the two of them together outside of the sabbaticals. Those two years are documented in excruciating detail, while our day-to-day here in Morris is much more sparsely recorded. There are moments, like when Tom’s on stage, where I take a billion photos, but I end up with very few photos of the two of them together.

I think this helps illustrate the value of these years we’ve had away from home. There’s something about stepping out of your “normal” life, leaving most of your stuff behind, and making a life (even if for just a year) in a new place. It shaves off a lot of the distractions and, for us at least, meant we spent more and different time together. Some of that is in the form of being tourists together (which is where these photos come from), but it’s also in the form of walking together because we didn’t own a car, and being together because the apartment was too small for us to easily be apart.

(And I realize that having this sort of opportunity just oozes privilege; most people don’t have the flexibility or resources to do this sort of thing once, let alone twice. I’m lucky in many, many ways.)

Happy Valentine’s Day to Sue and Tom!

Related posts

Flickr Uploadr is a pain, but Flickraw saved the day

Thomas McPhee as Arnold in the MAHS 2010 production of "The boys next door" as a one-act
Tom as Arnold in "The boys next door"

Flickr’s Uploadr is fine for small uploads, but tends to die consistently and unpleasantly when I have several hundred photos to upload, like those from Thursday’s opening of “The boys next door”, this year’s Morris Area High School one-act. It almost always takes me several tries to get a large pool of photos uploaded, which is a pain, but not fatal. This time, however, it chose to upload them in a semi-random order, so then it died I had 80-ish photos scattered all across the show, which meant I couldn’t just delete the first K from the list and restart the upload. Ugh.

Because it was late and I was in a hurry, I ended up just uploading the whole set (over several attempts), but marked them as private so people wouldn’t end up seeing two copies of that first group of images, figuring I’d sort things out in the morning.

The morning came, and it turned out that I really didn’t have a workable plan. All the pictures were on Flickr, but there was no good (i.e., automated) way to figure out which were the duplicates. If I could identify them, then deleting the duplicates and making the rest visible would be easy, but I didn’t have a clue how to find the duplicates using Flickr’s tools.

Sigh.

This would, however, be pretty straight forward in a script if I had all the data I needed, and this is where Flickr redeemed itself. They have a very rich API for accessing (and modifying) photos and their associated information (like tags), so if I could figure out how to use that I’d be golden. I’d poked a little with some Ruby Flickr libraries in the past, but none of them ever seemed very complete and they were always struggling to stay on top of Flickr’s changes and extensions to the API. A little searching this time, however, turned up Flickraw, which uses some really nifty Ruby metaprogramming to essentially build the Ruby part of the API “on the fly”, ensuring that it will be complete and up-to-date all automagically!

It turns out that Flickraw was indeed powerful, flexible, and easy to use. After authenticating (following the example on the Flickraw web site), I was able to use it to pull down a list of all the photos from “The boys next door”

my_owner_id = "68457656@N00"
play_title = "The boys next door"
my_stream = flickr.photos.search(
              :user_id => my_owner_id, 
              :text => play_title, 
              :per_page => 500)

I then split that list into the initial set of publicly visible photos, and the photos I’d uploaded after things got screwy and kept private (i.e., visible only to me):

public_photos = my_stream.find_all {|photo| photo.ispublic == 1}
private_photos = my_stream.find_all {|photo| photo.ispublic == 0}

My next task was to determine which of the private photos were duplicates of one of the public photos people were already looking at. All I really needed was the list of duplicates, but I decided to create lists of both the duplicates and the non-duplicates. I had to compare titles here because the Flickr IDs would be different; as far as Flickr knew they were all different photos. Happily, I had named them in a way that they each had a unique title, so if two photos had the same title, I knew they were the same shot uploaded twice.

dups = []
non_dups = []
private_photos.each do |photo|
  public_duplicate = public_photos.find { |pub| photo.title == pub.title }
  if public_duplicate
    dups.push(photo)
  else
    non_dups.push(photo)
  end
end

At this point, I could apply tags to all the photos in the two groups, and all the rest of the fiddling could be done through Flickr’s web tools:

non_dups.each do |photo|
  flickr.photos.addTags(:photo_id => photo.id, 
                        :tags => "to_keep")
end

dups.each do |photo|
  flickr.photos.addTags(:photo_id => photo.id, 
                        :tags => "to_delete")
end

I could have actually done everything with the Ruby script (delete the duplicates, change the remaining images to publicly visible, and add them to the appropriate set), but wanted to do that via Flickr so I could see what was happening as I went. And once the tags were in place, the work in Flickr was quite straightforward. The result: A set of 339 images that contains all the photos I uploaded, with no duplicates, all accomplished without deleting any of the original uploads.

Big thanks to Maël Clérambault, the author of Flickraw, for his excellent little library, and thanks to Flickr for providing this very nice set of API calls. (Now go fix Flickr Uploadr, damnit!)

As for the play – I just heard that they took second at today’s sub-sections competiton, which means they move on to sections next week, and Tom got a star performance award! Congratulations all!

Related posts