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!

Tags: , , , , , , , , , ,

Related posts

Posted in Computing, Events, Family, Photography | Tagged , , , , , , , , , , | 2 Comments

Traveling through time (and figuring out a few new things about RAW)

Traveling through time

Traveling through time


Another from that gorgeous sunset behind the wind farm at Buffalo Ridge (near Lake Benton, MN).

KK and I got off US 75 on Norwegian Creek Road, which is what’s heading off in front of us here. The GPS, which was a bit confused about our little photo detour, actually suggested we continue down this gravel road and wander the backroads for a while. After breaching a few snow drifts across the road, we decided this wasn’t such a great idea in extremely cold weather with night fast coming on. We turned around and made it back to the blacktop safe and sound, and remained on more substantial roads the remainder of the journey.

I’ve often struggled with different ways of pulling out the useful information in both strong highlights and deep shadows, but somehow in all these photos I’d never learned (or figured out on my own) about multi-RAW processing. RAW is really nice and gives you a ton of flexibility, even though it takes up a lot more space. There’s a lot of great data there, but you have to learn to use it. I’d figured a lot of stuff out by just digging around in Photoshop and on-line, but somehow I’d totally missed this multi-RAW idea. I got a copy of The Photoshop darkroom for Xmas, however, and it’s really opened my eyes to some possibilities I’d been missing before.

Here I essentially pulled two images from the raw data on the camera. One was adjusted for the sky (keep the exposure down to saturate those great colors), and the other for the ground (crank up the exposure so you get some detail in the road and the snow). Then you lay those two versions on top of each other, and use a mask to merge them. It look a reasonable amount of futzing (maybe an hour, but I was fairly new to the whole masking thing), but the result was far cooler than I could have gotten by attempting to adjust the original image in toto.

The color is a little richer if you view this in a context that respects color profiles. Everyone who’s not in such a context will just have to take my word for it :-).

Tags: , , , , , , , , , , , , ,

Related posts

Posted in Art, Photography, Travels | Tagged , , , , , , , , , , , , , | Leave a comment

Sunset at the Buffalo Ridge wind farm

Sunset at the Buffalo Ridge wind farm

Sunset at the Buffalo Ridge wind farm

Last week I drove to a workshop in Madison, SD, with Kristin Lamberty (one of my Computer Science colleagues here at UMM). On the way, we went south on US 75, along the east side of the Buffalo Ridge wind farm, and there was a really gorgeous sunset behind them as we came into Lake Benton, MN.

KK was kind enough to let me stop and take some photos. This is one :-).

I haven’t actually messed with the colors here, except for deliberately underexposing the photo in the first place to saturate the colors. It really was a very cool sunset.

Tags: , , , , , , , , , , ,

Related posts

Posted in Art, Education, Events, Photography, Travels | Tagged , , , , , , , , , , , | 1 Comment

A neat use of some of my photos

So different from in the winter

So different from in the winter


When I came back from the holidays I had a very pleasant surprise waiting for me in my office mailbox: A 2010 calendar from Schloss Dagstuhl. Each month has a small day grid at the top, and one or two photos of Dagstuhl below; the photos for each month are actually the front of a postcard that you can separate from the calendar and use.

The cool part is that most of the photos are mine! This set on Flickr shows all the photos they used, although many of them actually look much better in the calendar. Their staff did a really great job of straightening, cropping, and adjusting the lighting on the shots that they used, and it really made the photos look really nice. Thanks to whoever did the excellent work! Christian Lindig informs me (see the comments) that the design work was done by Margot Behr. Thanks for the great work, Margot!

It was really weird when I first looked at the calendar, because I really wasn’t sure how many of the photos were mine. There were two or three that I immediately recognized as mine (like the image at the top), but there were quite a few indoor detail shots that seemed like the kind of thing that I’d take (like the dragon below), but which I didn’t really recognize. There were also several of buildings that could have been mine, but could have been taken by most anyone. Going through, them, though, I was able to determine that all but two were in fact mine. The cropping (and to a lesser degree the cleaning) that the Dagstuhl folks did often threw me as it sharpened the focus in cool ways that I hadn’t seen or thought of.

Iron dragon at Dagstuhl

Iron dragon at Dagstuhl


The Flickr set has the 13 photos they used, in the order that they appear in the calendar. (Three of the cards are composites of two photos, which is why there’s more than 12 photos.)

There are two photos in the calendar that aren’t mine, both taken in specific conditions that I’ve never been there for. One is a really cool panorama with a beautiful fresh coating of snow and the other is the grounds around the chapel in the summer.

Tags: , , , , ,

Related posts

Posted in Computing, Photography, Sabbatical, Science | Tagged , , , , , | 2 Comments

Saving money by doing more silly things

The iPod I fixed by banging it hard against a wooden chest

Our iPod works (again)!


As reported earlier, I managed to use a few drops of nail polish remover to postpone my iPod Touch’s trip to the great pile of electronic waste that is one of the banes of our modern world. In the comments Matt Carlson mentioned that he’d had a similar experience reviving an MP3 player with a stuck hard drive head by smacking it — smacking it so hard that it flew out of his hand!

Well, wouldn’t you know it, but we happen to have a nice 80Gb iPod Classic (pictured above) that died over the summer with the telltale clicking sound of a stuck head. So I tried out Matt’s trick & whacked quite firmly (& quite loudly) multiple times on an old wooden chest and voilà – it came back to life! We thought we’d be travelling without the benefit of our huge shared pile of music, but it’s worked beautifully for many hours (all the way down to Arkansas & back).

Huzzah! Big thanks to Matt for the suggestion – banging on hardware beats the heck out of having to buy a new iPod. Again, I was only willing to risk this because this puppy was well past warranty, and there was no chance of repairing it. Obviously beating the tar out of electronics is something one should think carefully about and do with some care; your mileage definitely may vary.

Tags: , , , , , ,

Related posts

Posted in Computing, Family, General, Music | Tagged , , , , , , | Comments closed

On the occasion of someone else’s 16th birthday

Thomas with his parents in Toledo, Spain. June, 2007.

Thomas with his parents in Toledo, Spain. June, 2007.


Today is 16th birthday of our son: Thomas Sutherland McPhee.

16 years ago today, we were in Abbot Northwestern Hospital in Minneapolis introducing a red, wrinkled little lizard boy to the world.

He was healthy but small (3 pounds, 12 ounces), and his size landed him in the neo-natal ICU for several weeks. We spent his first Chrismas in that NICU. Another family spent that day together behind a screen at the end of the room, saying goodbye to the last of a set of triplets. It was the only time we saw that child outside of its incubator, and the only time we saw the family hold it.

That day still shines bright, like my eyes when I think of it.

On my dresser is a photo of Tom at Thanksgiving when he’s two or three, eyes wide like his smile. To be honest, I don’t really remember the that kid. Those years have largely slipped away, turning into photos in an album.

No doubt more will join them.

But there’s so much I do remember. Places we’ve been. Things we’ve done. Pieces of who he is, assembling.

Reading together. Dr. Seuss. Haroun & the Sea of Stories. Early Harry Potter. Inkheart. Plenty of room between the trees.

Realizing that he’d somehow learned to read when no one was watching. (Still not sure how that happened.)

Realizing that reading out loud at night was just too slow. One of the first steps towards inevitable independence.

Walking together in our sabbatical year in Birmingham, talking about religion, and how eyes work. He was six or seven.

Writing songs and performing together. “Fat fly”, “Crab grass”, “Taco Man”. Open Mic. The Mutant Variety Show.

His wonderful attitude during the long series of rabies shots after The Bat Incident.

Our time in Italy. Gelato & pizza. Learning to spot annunciation paintings from a mile away. Deciding he’d seen about all the churches he needed for quite a while.

The family trip to Alaska. Climbing the hills around Polychrome Pass in Denali National Park; the wind cutting past us as we gazed out over that awesome valley. Celebrating Mac & Mutti’s 50th anniversary in Seward. His laughter, and grumpiness, and goofiness.

The way he made friends and settled in so quickly during both our sabbaticals in the UK. And the long hours on Facebook keeping up with his friends back home.

Our time in Spain. Going out for breakfast together in the morning. A wonderful day together in Madrid. “Guernica”. The “Black Paintings” of Goya. A day he planned.

Walking to school together talking about stuff, large and small. Waving at folks driving by.

Listening to music together. Discussing lyrics, and beats, and color. That high kid voice in our promo spots for the radio station, and the much lower voice I hear when listening to this year’s solo radio shows.

The many, many play performances. And band. And choir. And pretty much any opportunity to be on a stage.

6th in the State in Poetry Out Loud last year, and last year’s amazing One Act.

Dying your hair cool colors.

And so, so much more.

Today he’s sixteen.

He writes lines I would be proud to call my own.

He’s taller than his mother (but not yet taller than me).

He sings bass (or tenor – it all depends on the context).

He shaves, if not very often.

His room is a mess, but so is my office, so I’d best not throw stones.

He’s getting recruiting material from colleges, another sign that he won’t live in this house forever.

He’s old enough to drive, but not to go to the Doomtree blowout (and it’s not clear which he’d choose if it came down to it).

He cares. About the world. About others. About Making Things Better.

He’s our son, and a joy to have in our lives.

Happy birthday, Thomas. It’s been a fun and exciting 16 years, and we’re all looking forward to many more!

Tags: , , ,

Related posts

Posted in Events, Family | Tagged , , , | Comments closed

I just saved several hundred dollars with a drop of nail polish remover

Our family iPod (which is truly dead due to a bad hard drive, but that's another story)

Our family iPod (which is truly dead due to a bad hard drive, but that's another story)


I’ve had my iPod Touch for about 1.5 years and can’t really imagine living without it. I had a Palm Pilot at two different times in the past, and I never felt the need to replace either of them when they died. Life without the Touch, however, has quickly become unthinkable.

Thus I was pretty seriously distressed when the home button quit responding yesterday. It had been acting a little touchy for a while, but I could always get it to respond if I was persistent. Yesterday, however, it just went dead. Kaput. The end. This is the kind of thing you don’t repair, and I wasn’t super keen on spending a few hundred to replace it, especially since everything worked fine except that one crucial little button.

A little searching turned up this forum thread, which boils down to two recommendations:

  • Blow compressed air into the connector slot at the bottom
  • Put a drop of contact cleaner, nail polish remover, or other water-free solvent on the button, and then work the button to try to get the solvent to wick around to the where the contacts are

Both of these are based on the assumption that the problem is some dirt or or gunk that’s collected under the button and is interfering with the contacts. Since my iPod lives pretty much permanently in my jeans pocket (along with pens, keys, lint, and various other experiments in the spontaneous generation of life), that assumption seemed pretty reasonable.

Some of the people that tried the solvent approach got too much in there, and it seeped along the screen, giving them an undesired aquarium effect. Consequently, I tried the compressed air first, since that seemed least likely lead to some unfortunate side-effect. Sadly, it also didn’t lead to the desired effect either. Consequently I moved on to nail polish. I put a drop on the button, and then clicked and wiggled that little button to try to work the liquid around. And after maybe thirty seconds of fiddling … voila! It started working!

It’s now been most of an hour, and the fix seems solid. I’ve had it propped up with the button end down, so if there’s any liquid still in there it’s headed away from the screen and the bulk of the electronics, and by now I would assume that most of the liquid has evaporated anyway.

I’d think twice about trying this at home, especially if you have a working piece of electronics. Mine was completely unusable without the button, so I was willing to take the risk, but I can imagine a lot of ways in which this might not go well, so tread gently into these swamps.

For me, though, it’s all happy, happy, happy :-)

Tags: , , , , , , , ,

Related posts

Posted in Computing, General | Tagged , , , , , , , , | Comments closed

I love our students (alumni edition)

_eli at MICS 2007

_eli at MICS 2007


These two tweets, each wonderful in their own way, just showed up back-to-back in my Twitter stream:

The joy of programming is taking a crappy piece of code, full of hacks and bad practices, and rewriting it to be better in every way. — LynnKale

for a moment I couldn’t think of a word for “thing to tell me how to do other things,” googled ‘how to’ and figured the word (documentation) — _eli

It’s gems like this that make my day. Both authors are UMM CSci alum, now off doing cool stuff. It’s neat to be able to stay in touch on-line.

Tags: , , , , , ,

Related posts

Posted in Computing, Education | Tagged , , , , , , | Comments closed

Never forget who the true enemy is

Never forget who the true enemy is, from a href=http://abstrusegoose.com/Abstruse Goose/a

Never forget who the true enemy is, from Abstruse Goose

Ray Comfort’s inanity over on U.S. News & World Report comes to mind:

We don’t find a half-evolved cow or bee. None of the 1.4 million species on the Earth has half an eye.

Such deliberate cluelessness and misrepresentation – it’s unfortunate the U.S. News & World Report will publish nonsense generated by someone who’s clearly only using half a brain.

Tags: , , , , ,

Related posts

Posted in Education, Science | Tagged , , , , , | Comments closed

Study finds on-line education beats classroom, but what does that mean?

We are not quite ready to abandon classroom learning in favor of on-line education.

We're not quite ready to abandon classroom learning in favor of on-line education.


A recent study for the Department of Education (NY Times piece; full 93-page PDF report) performed a meta-analysis of 99 students over the past 12 years, and found that students in on-line courses did slightly, but statistically significantly, better than those in traditional classrooms.

It’s an interesting study, and likely to spur a whole new slew of interest in on-line courses, but it’s really not clear what it means. I’m sure there are a zillion ways I could pull together data showing an education advantage of X over Y, for a zillion Xs and Ys, but one would have to be very careful in the interpretation. I’m willing to bet that most of my colleagues here at UMM would teach better in English than Chinese, and most faculty in China would teach more effectively in Chinese than English, but that hardly means one is a better teaching language than the other. Context is everything, and it’s not clear (at least in the survey study) what the contexts are.

A few possible issues:

  • 12 years is an eternity in the history of the web and web-based teaching. Are the studies from 12 years ago even talking about the same things as those now?
  • What are we actually comparing? Face-to-face courses have all kinds of variance, and their effectiveness changes with the instructor, the students in a particular running of the course, and external events. Presumably on-line courses will as well. Are we comparing the best to the best? The median to the median? I can easily imagine that an on-line course of a few dozen people can be a vastly better experience than a huge lecture hall of 800 students, even if the latter is still called “face-to-face” instruction. Similarly, one person struggling to manage 150 on-line students is not likely to look good compared to an energetic classroom discussion section of 12 people. The meta-survey doesn’t make it easy to see clearly what the comparisons are in the individual surveys, and I suspect that they probably vary widely, ranging from the pretty reasonable to apples-vs-kumquats.
  • How much of this is simply a function of novelty, both in faculty putting a lot of effort into a cool new thing, and students being impressed by the shiny new toy?

Etc., etc., etc.

I think the question isn’t, and can’t ever be, whether on-line is better than the classroom. In the end it’s about finding a way for a particular instructor and a particular student (or group of students) to work well together, and that’s going to depend on an awful lot of things and almost certainly change over time as teachers, students, and the world changes. On-line education and classroom education augmented with on-line components are clearly going to be an important (and probably increasing) part of that, but there will probably always be circumstances where a group of people are better served by some face time than by an on-line experience.

This study also looks at courses as isolated experiences. At a residential university like ours, the courses are crucial, but hardly the whole picture. Students learn a ton from simply living together, eating, doing laundry, volunteering, going to the movies, dating, being in clubs, and generally making all sorts of vital transitions as they move from 18 to 22 (give or take). Look at the important differences between someone’s who’s 16 and someone who’s 26, and an awful lot of that has nothing do to with courses. A good university experience can play a critical role both in and beyond the classroom, and a heck of a lot of that is tied up in physical presence.

Tags: , , , , , , , , , , , , , ,

Related posts

Posted in Education | Tagged , , , , , , , , , , , , , , | Comments closed
  • Recent photos from Flickr

    Loading...

  • Categories

  • Archives