Tuesday, December 30

Notes About Git + SVN + Google Code

I wanted to do some hacking over vacation, so I decided to pitch in and implement a feature request for Guice. Here are some of the things I learned about using Git with Google Code’s Subversion repositories:

Recommended Google Code Git Initialization
(run this in an empty directory that you would like to be a repository)

git svn clone -s --prefix=svn/ --rewrite-root=https://guice.googlecode.com/svn http://guice.googlecode.com/svn .

Note: This will pull the entire SVN repository back to its beginning. The -r argument can be used to limit the pull.

The --rewrite-root line is there so that you can remove it if you get membership status on the project and want to commit.

Additional Notes
  • Develop with Git on a Google Code Project” is a pretty good intro article that covers the very basics of using Git and connecting with Google Code.
  • An introduction to git-svn for Subversion/SVK users and deserters” seems to be the most comprehensive description of setup and use cases of Git’s SVN support.
  • Git SVN Workflow” is also a nice and friendly read.
  • Fink’s git-svn 1.6 package seems to be broken, at least for Mac OS X 10.5. It bus errors on launch. I found a fink-users thread that comments on this but provides no solution. I grabbed it from MacPorts instead, and that worked with no problem.
  • Passing the --prefix=svn/ argument to git svn init makes it easier to differentiate between server-side branches and local branches.
  • In theory, you cannot change the SVN repository URL later. In practice, it may be possible. This is particularly important for Google Code because if you check out the repository with HTTP, you cannot then commit because committing requires HTTPS for the authentication. Compounding this problem, you cannot (as far as I can tell) check out with HTTPS unless you are a member of the project. In this light, it may make sense to check out new projects using --rewriteRoot (as mentioned on the GitSvnSwitch page) pointing at HTTPS. I ended up just re-creating a new repository and using git am to move a commit between repos, as described here.
  • Use the --username argument to git svn fetch when checking out with HTTPS. You’ll be asked to type in a password (which is the random characters from your Google Code profile). Git will then save this information somewhere (I’m not sure where), so it means that you won’t have to memorize the Google Code password, or even re-specify the --username if your Gmail username differs from your username on your computer. 
  • Remember that git svn dcommit will commit to the repo once per Git commit. This will likely annoy other people on the project, so it’s best to either use git rebase -i and squash everything, or do a git reset svn/trunk and then make a single commit of the index (don’t forget to re-add new files).

Sunday, December 21

Installing Graphziv on Mac OS X

I’m playing with Graphviz on the Mac. Unfortunately, the latest official download, 2.20.3, gives the following error message when run from the command line:

dyld: lazy symbol binding failed: Symbol not found: _pixman_image_create_bits
  Referenced from: /usr/local/lib/graphviz/libgvplugin_pango.5.dylib
  Expected in: flat namespace

dyld: Symbol not found: _pixman_image_create_bits
  Referenced from: /usr/local/lib/graphviz/libgvplugin_pango.5.dylib
  Expected in: flat namespace

Trace/BPT trap

The solution is to go to the downloads directory and download the next-most-recent release, 2.20.2.

Wednesday, December 17

Flaw: Constructor does Real Work

Flaw: Constructor does Real Work: "Fundamentally, “Work in the Constructor” amounts to doing anything that makes instantiating your object difficult or introducing test-double objects difficult."

Misko has a great article about making sure that your constructors permit your class to be reasonably testable. Read the whole thing, his detailed examples are very informative.

Monday, December 15

topgit Means Never Having to Wait for Reviews

I’ve been using git for a little while now at work. Some rather clever Googlers have rigged up a tool that syncs a local repository with Perforce, so I can do local development and version control with git and then check the final CL in to the depot.

Over the weekend I started using topgit (README), a git wrapper that takes most of the work out of managing dependent “topic branches.” The gist is that you mark branches as depending on one another. Then, when you modify a branch, you can use the tg update command to propagate those changes to any branches that depend on it.

I’ve been doing a lot of large changes and refactorings recently, so what topgit really means for me is never having to wait for code reviews to keep working.

The basic workflow goes like this:

“refactor” is the name of my new branch, “blogger” is the trunk
$ tg create refactor blogger
hack hack hack
mv mv mv
add add add
commit commit commit


now mail out the CL for review
$ gitwrapper mail -m reviewer

In a pure Perforce environment, I couldn’t continue working on this code at all until the review came back and I could submit. With vanilla git, I can of course git checkout -b new-branch and keep going, and this is fine most of the time.

Where it starts to get sticky is when my reviewer has comments. No big deal, though. I can just git checkout back to the refactor branch, make those changes, and commit them.

Of course, I now need to update my new-branch so that I’m working from the latest intermediate state. git merge refactor handles that fairly well (sometimes I get pedantic and use git rebase) and I’m back to coding the new feature.

topgit supports exactly this pattern of development by automating the “update the new-branch” step. If I created the new-branch branch with tg create, then I could run tg update to merge in the latest versions of all of new-branch’s dependencies.

To continue, we have:

git checkout refactor
tweak tweak tweak
git commit -am "fixes from review"
git checkout new-branch
tg update
code code code

“All” is a very operative word in that last sentence. With topgit, a branch can have several dependencies, forming a DAG, and it will recursively update each one of them. This means that I can have several independent changes, with each out for review in parallel, but continue development on a new change that relies on all of them.

topgit works by keeping a separate reference branch for each topgit-managed branch. When you run tg update, it merges the dependencies into this branch, then merges that into the normal branch. This gives the added benefit that you can easily git rebase against the reference branch to clean up your commit graph.

Monday, October 6

Palin Markov

Sean is back with more Markov: Sarah Palin

This seemed like an entirely plausible quote:
They cannot be allowed in their benefit, also, a mutually beneficial relationship for us to remind Russia that it's in their country and their parents give them a passport and give them a backpack and say never again will we be taken advantage of.

Tuesday, September 30

Word up in the House, &tc.: Another version of “Lukey”

Thanks to Lala.com, I found another Great Big Sea cut of “Lukey,” recorded with The Chieftains for their 1998 album Fire in the Kitchen (which is here attributed just to Chieftain Paddy Moloney).  It’s appropriately raucous.

And now, a test of the emergency Canadian music <embed> system:

Tuesday, September 16

CrossOver Chromium: Chrome (kinda) on a Mac

CrossOver Chromium runs the open-source build of Chrome with Wine to make it work (more-or-less) on an Intel Mac. It's very Windows-y, as one would expect (you'll need to use the Control key for keyboard shortcuts, for example) but it gets some amount of the job done. The visual display is a bit rough at items, with weird flashing as things get re-drawn.

But it's enough to write this post, at any rate, though it did crash once. I need to get the autosaving going in this new post editor...

Thx, Scudder!

Monday, September 1

Give, Yo.

American Red Cross

Don’t overlook the “Where the Need is Greatest” category. That gives the Red Cross the freedom to use the money to best serve their mission.

Sunday, August 31

Spreading the word: Is Sarah Palin Pro-Choice?

Cait made a helpful new website: Is Sarah Palin Pro-Choice? Click for the answer.

Also, fair shot she and McCain to rollback Griswold, too. Hope you like babies! (Or not having sex.)

Monday, August 18

In which e-commerce confidence is not inspired

I’m ordering a replacement charger for my drill because I lost my old one. Here is the exact entirety of the only e-mail I’ve gotten from the company to confirm my order:
EVEN THO IT MAY WORK THE TOOL OR APPLIANCE OR TOY READ THIS FIRST!!
CHECK YOUR ALL USED BATTERIES BEFORE USING THE CHARGER! USE A VOLT METER TO MAKE SURE THAT THE USED BATTERY HAS NO LESS THAN (.6) VOLTS LESS THAN THE STATED VOLTAGE OF THE BATTERY.
EXAMPLE: IF A USED BATTERY THAT SAYS IT IS FOR A 12 VOLT TOOL READS WITH METER 11.6 OR HIGHER IT IS (IN MOST CASES) A GOOD BATTERY GO AHEAD AND CHARGE THE BATTERY.
IF THE USED BATTERY READS WITH A METER 11.5 OR LESS IT IS A BAD BATTERY AND NEEDS TO BE REPLACED!
CHECK YOUR CHARGER WITH A VOLT METER TO MAKE SURE IT IS PUTTING OUT THE CORRECT VOLTAGE!
IF THE CHARGER IS PUTTING OUT A UP TO 2 1/2 VOLTS HIGHER THAN STATED VOLTAGE (RELATIVELY STEADILY) IT IS
(GENERALLY) A GOOD CHARGER AND OK TO USE TO CHARGE YOUR BATTERY.
EXAMPLE: CHARGER STATES 12 VOLTS. WHEN USING THE METER IT READS 14.6 IT IS A GOOD CHARGER.
IF THE NUMBERS ARE MOVING ALL OVER NOT NEAR STEADY AT ALL OR LOWER THAN 11.6 OR HIGHER THAN 14.6 CHARGER MUST BE REPLACED!
YOUR CHARGER IS YOUR MOST DELICATE TOOL! IT MUST NOT BE DROPPED, HIT OR GET A VOLTAGE DROP OR SPIKE!
NEW BATTERIES NEED TO BE CONDITIONED TO GET A GOOD READING BEFORE USING!
TO CONDITION A BATTERY BEFORE FIRST TIME USE CHARGE FOR FOUR DAYS WITH A DAY OF REST BETWEEN EACH CHARGE!
THIS WILL CONDITION YOUR NEW BATTERY FOR LONGER LIFE!
A PLACE LIKE RADIO SHACK WILL TEST YOUR USED BATTERIES FOR YOU FOR FREE!
THERE ARE NO RETURNS FOR ELECTRICAL EQUIPMENT.
ALL RETURNS MUST RMA ASSIGNED NUMBERS ON THEM OR THEY ARE NOT ACCEPTED!
Is even a "Dear Mr. Hopkins" too much to ask?

Luckily for them, only two other companies on the Internet appear to sell this product, and my first choice, the official Black and Decker parts website, had a bug that kept me from logging in at all.

Friday, August 15

Braid is Sweet. So is Chronotron.

If you have an Xbox, go play Braid. The gameplay and presentation are near-perfect and, as far as I can tell about a third into it, well-deserving of the megascore.
For more time-bending fun, try out the Flash game Chronotron on Kongregate (it’s free!). You play a robot who can go back in time. This lets your present and past selves interact with each other and the environment, sometimes several times over. It’s much more explicitly puzzle-y than Braid, and less touchy-feely artistic, but its gameplay is brilliant.

Thursday, August 14

OmniFocus Tip: Linking to Gmail

Gmail is my alpha and my omega at work. (I didn’t get much done on Monday.) Almost nothing I do is not either prompted by an e-mail thread or significantly informed by one. And, in my attempt to get things done, I try to pour all of those tasks from my inbox into my good friend OmniFocus.

This can present a problem, however, when I’m working through a context and realize I need some of that information from an e-mail in order to complete an action.

Handily enough, Gmail is very clever about creating unique URLs for all of its “pages” by appending URL fragments. When there’s an e-mail conversation I’ll need to refer back to when working on a project or specific action, I just copy the URL from the browser and paste it into an OmniFocus notes field. Example:
https://mail.google.com/a/google.com/#inbox/11bc36975726453b
I used to use a combination of starred conversations and search (inbox is, of course, at zero), but linking directly to the thread works several hundred times better.

The one tiny problem with this technique is that it will open a new Gmail page rather than re-using an existing one, but that’s no more than a few seconds wait. Gmail itself is quite capable of handling two windows open at once with no consistency issues.

Sunday, August 10

Next Vacation: Laptop

I resonated a bit reading John Dickerson’s recent Slate piece giving the presidential candidates lifehacking advice for their vacations. The piece touches off from Obama’s recent admission to Tory leader David Cameron that he searches for chunks of time during the day to just think.

Dickerson’s advice is to take the opportunity during vacation time to think, and he zeroes in what the candidates do for their best thinking:
Barack Obama will probably spend some of his vacation writing. It's clear from his autobiography, and from the model answers he gave students when he was a law professor, that he processes ideas by working them out on paper. … McCain would design the opposite regimen for his vacation. He's not a writer; he's a talker. … On his vacation, maybe McCain could schedule off-the-record bus tours with reporters, editorial writers, and experts in various fields.
Having just come back from a short vacation of my own — which was certainly pleasurable but leaves me feeling even more rushed and hectic heading into the week — I wonder if camping in remote Maine was necessarily the best possible vacation.

I’m struck by a bit of a paradox: given that I am in the admittedly extremely lucky position of loving what I do for my job (coding and blogging), my vacation from it took me away from my best thinking. Of course, it also took me away from what I don’t like about my job (see Clich├ęd List of Knowledge Worker Gripes, Volumes I–III), and for that I’m quite grateful.

I think that for my next vacation, that campground in Maine is still a good idea, but I should bring a sand-proof laptop and copy of Coda.

Tuesday, August 5

The Rock-afire Explosion at ShowBiz Pizza Place

As with all important things, should should consult the exhaustive Wikipedia article on the subject. Choice quote:
Eventually, the ShowBiz restaurants themselves were converted to Chuck E. Cheese's locations, in a process called "Concept Unification". The company had decided to shift its focus away from animatronics and more towards video games, food, and quality of service.
You can bid to get a song performed by the band. Coming next, Arcade Fire.

Make sure that you watch at least through the rap break. 

You’re the birthday, you’re the birthday, you’re the birthday boy or girl.

Important addendum:
There are a few restaurants still using the Showbiz Pizza Place name and animation. All are located outside the United States, and have no connection to the original company. Known locations are in Lebanon; Dubai, UAE; and Kuwait. [via Wikipedia]
It gets better: The ShowBiz Pizza fan site. Exhaustive!

Saturday, August 2

Sunday, July 27

Things I’ve Been Up To Recently

Quick rundown of the last month or so:

  • Became a landowner, moved into the new place, learned that our couch is too big and heavy to fit up the stairs to the living room.
  • Grieved a loved one, survived the church service.
  • Went on a trip to celebrate my first anniversary, came home without my ring. (That’s not a metaphor. It fell off in the ocean.)
  • Got Civilization for the DS and tested my battery’s remaining capacity: about two back-to-back games’ worth.
  • Went to work, most days at least.

Giant Bomb and Ambrosia

I got a few points on Giant Bomb for filling in a handful of details about hometown heroes Ambrosia Software. Giant Bomb is pretty cool, but — alas! — my memory does not match my previous obsessive playing and testing of old Mac games.



Look for me on there as OldMainstream.

Saturday, July 5

Markov and Garkov


Jeff Atwood at Coding Horror wrote a good introductory post to Markov chains, with a link to Garkov, a Garfield comic generator that uses them.



I think that the humor in Garkov is probably the same as could be achieved by just putting random captions from other strips together, however. For something truly generated-awesome, see Atwood’s example Paul Graham essay:

You can feel the need to take advantage of increased cheapness, however. You're not all playing a zero-sum game. There's not some fixed number of startups; we fund startups we fund to work on matters of passing importance. But I'm uncomfortably aware that this is part of any illusions about the problem of overeating by stopping eating. I couldn't simply avoid the Internet had become, because the company is the new trend of worrying obsessively about what it meant for someone, usually an outsider, who deliberately stirred up fights in a startup than just start it. You know how the A List is selected. And even that is more work.

I tried running the last 100 Blogger known issues through the online Markov generator. I don’t think there’s quite enough diversity, though, as I recognize a lot of full sentences, but here are some random Blogger problems:


  • Some users are experiencing problems with the new version of Blogger in draft users are experiencing problems with FTP publishing that may affect image upload do not have "www" at the very bottom in the Blogger edit post form to upload one photo at a time or shrink photos larger.

  • Some users have been affected by this bug. If a blog or post, regardless of how many total comments the blog reviewed and the iGoogle gadget. Update, 1/28: This has been.

  • Some users report that they can be moderated. Comment feeds should now show the earliest comments. A temporary workaround is to click on the fix, one quick recommendation would be to clear your browser's cache and cookies and then go to.

  • Some users may be able to set your blog's language. Readers with Internet Explorer security settings set to a FeedBurner feed. The workaround is to exit Picasa.


Once you’ve had enough fun with Markov chains, move on to the Metropolis algorithm to generate samples based on a distribution that you can’t sample directly.

Saturday, May 17

Saturday’s Nearly-Twitters

I just Twittered about my current web implementation issues. Since I like to keep the number and frequency of my Twitters low so as not to overly annoy, here are some things I would have Twittered today:
  • VMware on this laptop is slow enough that I could probably save time just installing / uninstalling Internet Explorer 6 and 7.
  • WFH is better than WFW because I can read videogame blogs in my downtime instead of e-mail. And I can drink beer.
  • Hoping that Safari’s textarea resizing makes it to other browsers so that I’m not wasting my time.
  • Seriously. F IE.
That’s all for now. Unless I think of more.

Wednesday, April 9

More Hidden Mozy Cleverness

Hot on the heels of Mozy’s SimCity 2000 reference, there’s an easter egg in their EULA.

Enjoyable, yes, but it kinda scares me since I totally clicked through without reading it (as always). Now I am legally bound not to taunt happy fun ball.

(Thx to that Wikipedia article for the EULA note. Thx to Dan for reminding me about happy fun ball.)

Tuesday, April 8

MicroPlace on 1UP.com

I was surprised and happy to see MicroPlace, eBay’s wholly-owned subsidiary for investing in microcredit, in ads plastered all over 1UP.com. Interesting demographic targeting, but I hope they have success with it.

Microcredit in general is a great idea, but by securitizing it, MicroPlace gives you a whole lot of leverage for your contribution. Your “donation” is not seeing your money for 18–36 months and getting 1.5-3% annual interest. (Though actually that rate is looking not that bad in today’s economy.) Therefore, one can afford to put more money into the system than if it were just a gift, which means the organizations have more to loan out.

Wednesday, April 2

Mario Kart Wii Online Info

This is important enough to call out in a post. From Eurogamer’s Mario Kart Wii Review:
Multiplayer is Mario Kart's lifeblood, and as you'd expect, the Wii version offers a very solid set of options: two- to four-player split-screen, online racing with up to two players per machine, team racing, battle modes, and the excellent Mario Kart Channel for keeping track of your friends, ghost data, online rankings and Nintendo-created competitions. The Channel goes some way to making up for the Wii's lack of voice chat or proper social features, such as a centralised friends list.
Emphasis mine. Can you add more emphasis? I want more:

online racing with up to two players per machine

Zomg. Zomg zomg zomg.

Be careful. Cait and I draft each other like an unscrupulous speed-skating team.

Tuesday, April 1

Assorted Recent Video-Gaming

Some notes and recommendations from recent videogaming I’ve been doing:

Rock Band
After Harmonix’s announcement that Rock Band for the Wii would be the lame PS2 version, with no Internerdy downloadable songs, I sprung for a Rock Band machine game system Blu-ray player to get my fix. Though the Xbox 360 is probably a better gaming platform than the PS3 right now, I have more than enough good, unplayed games for my Wii, with more coming. Might as well be able to watch high-def films instead, and Stevey has pretty much convinced me I should try Uncharted.

My PSN username is OldMainstream. I wish I had a fancy badge thing to put on this blog, but not everyone understands the Internet. At least there’s no monthly fee.

And Rock Band is total amazing awesome, but you probably knew that. There are subtle touches that make it killer, such as call-and-response sing-along from the crowd. I can’t wait for a bass, and my neighbors can’t wait for drum pads.

Super Smash Brothers Brawl
The single player Subspace Emissary is weak, unfortunately, due to Smash Brothers’ floaty controls. They’re really frustrating in the platforming parts.

I’m having trouble playing the fighting part locally because Cait won’t stand for all the random shit, and I’m having trouble playing online because of Mozy. (I’m suffering the paranoia of the recently crashed.) I remain optimistic, however, that good gaming will come to me.

Friend code available upon request, but honestly it’s a losing battle. FNintendo.

Desktop Tower Defense
This is a crazy-fun free Flash game. Yes, I’m late to the party, but there’s a new version out so it’s okay. If you haven’t played, give the easy level a try. Build towers, withstand monsters. It has a bit of a SimCity feel — if you’re into that, which you should be — in the “build a bunch of things then sit back and hope it doesn’t go to Hell” kind of way.

I’m playing on Kongregate (thx, 1Up Yours!), where I am OldMainstream, and have been having much fun. So has Cait.

There are some other tower defense games out there, but they’re more complicated, which takes away some of the fun. Leave tips in the comments if you have recommendations.

Grow Island
Grow is an ongoing series of Flash puzzle games, of which Grow Island is the latest. The format of the games is that you add elements to a scene one at a time. If you add them in the right order, they interact and “level up” with fun/cute/clever animations.

Though there are 8! (40,320) different possible orders in Grow Island, you can use hints from the way the pieces interact to guess the correct order in an hour or two.

If you try and like Grow Island, make sure you play the others in the series. I’m particularly fond of Grow RPG, though Grow Cube is also quite awesome. And, since remembering 1 out of 40,320 is pretty hard, they have a good replay value a few months on.

My source for casual games is Jay is Games. Go there and have fun.

Sunday, March 30

Mozy: Reticulating Splines

It made me smile to see this videogame reference in Mozy. Anyone else remember where this comes from? I won’t spoil it.

Tuesday, March 25

What the “J” Key is For

When I confessed to Eric Case at SXSW that I worried that my friends (that’s you!) who read my blog or follow my shared items might not care about the nerdy or videogamey things I’m most into now, he made a good point:
That’s what the “J” key is for.
So a fair chance from now on that I might pick up the blogging pace a little bit. Please skip over as desired. I shall be enjoying this delicious dogfood.

Image credit: paulovalde. Note to Dvorak typists: I am not skilled enough to Photoshop a keyboard for us. But you know what I mean. “C” FTW.

Notes from a Sticky Wicket: My Slow Email Movement

Shriram writes Notes from a Sticky Wicket: My Slow Email Movement:
“And here's something amazing. If I wait a day, it takes me about an hour to restore my mailbox. If I wait two days, it takes me about an hour-and-a-half. If I wait three days, it still takes me about an hour-and-a-half.”
Very true. I’ve found that both momentum and having other people pick up mailing list–slack in the interim contribute significantly to making bulk e-mail processing efficient.

I’m somewhat of an e-mail apologist, though I probably get less overall — and more directly-relevant — e-mail than the people who think that it’s outright broken.

I enjoy the two or three hours every morning when Mountain View is asleep because I can plow through the previous day’s mail quickly. As it gets towards the afternoon and they start the firehose I then just try to skim and pick out the important messages.
  • Gmail’s “personal level indicators” are great for highlighting messages to take a look at sooner rather than later.
  • If you’re not using Gmail then I’m not surprised if you’re having trouble handling lots of e-mail.
  • Inbox Zero. Do it. It’s important.

Time Machine Restore: “Connect to Remote Disk” Grayed Out

My MacBook Pro’s drive gave up the ghost. AppleCare covered it, and now I’m restoring from its most recent Time Machine backup.

I backup to a shared volume, so imagine my surprise when, after starting up from the Leopard DVD, the “Connect to Remote Disk” button was grayed out! There appears to be no nice way to restore from a networked drive from the Leopard DVD.

Not to worry though. I found an Apple support thread on the subject, which offered two solutions:
  • Mount the networked volume via the Terminal
  • Plug the shared drive directly into the laptop
I tried the second option, which seems to be working. It appears that even though shared drives use sparse disk images for Time Machine, while local drives are used directly, Leopard will restore from a local drive with sparse disk images on it.

Saturday, February 16

XFN + Blogger in draft’s Blog List

Just a quick note that the same principals I used a few weeks ago to add XFN support to Blogger’s Link List work just fine when applied to the new Blog List blogroll page element, available on Blogger in draft. I’ve just done this, so everyone in there should be computer-officially my friends the next time a crawler comes through and notices.

A quick note of warning, though: if you edit the template of a page element, then any changes that Blogger makes in the future to the default page element template won’t get applied to yours. So if things start acting weird or you’re not getting a new bug fix, you may have to copy in a “clean” version of the page element.

Monday, February 4

XFN and Blogger Templates

Inspired by Google’s new Social Graph API (yay, bradfitz!), I’ve added XFN annotations to my blog template for the “Elsewhere” and “Friend’s Blogs” link lists, as well as my Blogger profile link.

This is pretty easy to do in Blogger. Just edit your template’s HTML and click the “Expand Widget Templates” checkbox. Then, look for the templates for the link lists you want:
<b:widget id='LinkList2' locked='false'
title='Friends’ Blogs' type='LinkList'>
<b:includable id='main'>
<b:if cond='data:title'><h2><data:title/></h2></b:if>
<div class='widget-content'>
<ul>
<b:loop values='data:links' var='link'>
<li><a expr:href='data:link.target'><data:link.name/></a></li>
</b:loop>
</ul>
<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>
Then, inside that <a> tag, just add: rel="friend" or rel="me".

You can use the Social Graph API’s Site Connectivity demo to check the output, though it’ll take a bit of time (I’m not sure how long) until the data is crawled.

Saturday, February 2

The Best of Fairport Convention, 1969–1976

Several summers ago I spent a few months solid playing Alpha Centauri and listening to a mix tape my brother made from his Fairport Convention CDs. Though the cassette is lost (and who has a player anymore, anyway?), I’ve been carrying around the track list from apartment to apartment since, hoping to re-create it in iTunes.

Here is the track list, recorded for posterity and so I can finally pitch the tape liner note card before I lose it.

Side A
  1. Come All Ye
  2. The Journeyman’s Grace
  3. Genesis Hall
  4. The Hexhamshire Lass
  5. Matty Groves
  6. The Plainsman
  7. Percy’s Song
  8. Dirty Linen
  9. Who Knows Where the Time Goes?
  10. Million Dollar Bash
Side B
  1. Rising for the Moon
  2. Fotheringay
  3. Walk Awhile
  4. Crazy Man Michael
  5. Meet on the Ledge
  6. Sir Patrick Spens
  7. Stranger to Himself
  8. Flatback Caper
  9. One More Chance
  10. Flowers of the Forest
  11. Farewell, Farewell

Wednesday, January 30

I want more OpenID providers

Yahoo! launched their OpenID provider site today. I’m happy with MyOpenID and delegation, though I may switch to our deal once we’ve fleshed out the functionality a bit more.

Still, I have the exact opposite philosophy from Dana Epp, who argues that what we need is more OpenID consumers, not providers:
This is the problem with OpenID. Everyone wants to be the provider of the identity. No one wishes to consume it and trust someone else. … We need more consumers.... not more providers. I talked about this back in 2006. Until we get more consumers going, OpenID will be on the cusp of being a geek thing.
From my perspective on Blogger, the exact opposite is true. We need so many OpenID providers that everyone on the web has one without even noticing it. Once every web page that represents identity (or persona, really) has OpenID baked into it, we can say “sign in with your OpenID! Yes, you already have one!”

Once we get over that hurdle and OpenID is more noticed, then people can start shopping around for the best identity provider and start picking out services that work for them.

The “one username and password” argument for OpenID has never been tremendously compelling, but tying activity from one site to another — such as, “the owner of www.grogmaster.com has commented here” — is incredibly interesting.

For that to happen, or at least get off the ground, we need 1,000 OpenID providers to bloom.

(Now, this post doesn’t take into account that Yahoo!’s OpenID setup which, save for a Flickr integration, is not tied to any URLs that already exist, and therefore fails the “you already have one” test slightly. Perhaps we need fewer providers, but more delegation? Still, it’s a reasonable upgrade path to go from signing in with a Yahoo or AIM account / OpenID to signing in with a URL that’s more meaningful to your current persona.)

Quick update: Simon Willison, in an interview with the Yahoo! Developer Network blog:
My personal dream feature would be for every one of my Yahoo! profile pages - on del.ici.ous, Upcoming, Flickr, Yahoo! Answers and more - to work as an OpenID. I'd like this not for authentication purposes but to let me "prove" my ownership of those profiles to other sites - I envisage all sorts of interesting mashups in the future based on users using OpenID to prove who they are on many different services.
Exactly.

Sunday, January 13

How to add a daily summary of Flickr photos to your blog’s feed

I’m a fan of FeedBurner, and I love their Link Splicer feature for adding each day’s new del.icio.us links to my feed. I wanted to do the same kind of thing for my photos.

FeedBurner supports Flickr for their Photo Splicer feature, but it splices in each image as an individual entry — far too spammy. Yahoo Pipes to the rescue!

Short version: Use my Flickr Daily Summary pipe to generate a feed with a post for your most recent day’s uploads. Then, create your own pipe and use the Union operator to merge the Flickr Daily Summary feed with your blog’s feed. You can use Blogger’s Post Feed Redirect URL setting to guide your subscribers to the new, unioned feed.

Update, 1/17: If you were trying this out and just got my photos from the 12th, try again. I just found that in refactoring I think some sub-Pipes flipped back to their default, debug settings. All is fixed now.

Long version about implementation and such:
From what I can tell, Yahoo Pipes doesn’t have a great way to merge several entries into one, so we can’t summarize based on the standard Flickr feed. Instead, we can use Pipes’ Fetch Page source to scrape Flickr’s daily archive page. The Get Day’s Flickr Thumbnails pipe does just this.

In order to load the correct daily archive page, however, we need to know what date to look for. The Flickr Daily Summary pipe does this by looking at the most recent entry in your Flickr feed.

There’s a bit of a caveat surrounding dates and timezones, however: Flickr’s <pubDate> elements are in US/Pacific, your photo archive is in your Flickr account’s timezone (US/Eastern in my case), and Pipes internally converts all dates to UTC. This last bit is significant because it affects the output of the Date Formatter module. When I first tried getting the daily archive page for the photos I uploaded at 11PM last night, Pipes was generating a date string for early this morning, UTC time: the wrong day. I wrote the Correct Timezone pipe to subtract the right number of hours from a date so that formatting it gave the output one would expect.

With the feed content in place, the last remaining step is to get the metadata right. The <author> element is just taken from the latest Flickr feed entry, as is the <pubDate>. The <link> and <guid> are both set to the daily archive page’s URL.

Important undocumented useful Pipes tips: To set the <pubDate> of an entry, you must set the y:published attribute to a date. To set the <guid> of an entry, you must set the y:id.value attribute.

Armed with a feed that will supply daily Flickr summaries (albeit one at a time, but that’s why aggregators have backend storage), you must splice (burn?) it into your blog’s feed. As a first pass, I tried Google Reader’s public feed for a tag I made of my blog feed and the daily Flickr feed, but I was unhappy with the amount of extra markup that Reader inserts. So, I went back to Pipes, which offers a Union operator to do exactly what I needed.

Since I was already running my feed through FeedBurner, I simply pointed it at the new, combined feed coming out of Pipes.

If you’re trying this using Blogger, use the Post Feed Redirect URL setting (Under Settings > Site Feed) to redirect your current subscribers to Pipes or (better yet) FeedBurner. Important note: If you do enable the Post Feed Redirect URL, you’ll need to add ?redirect=false to your feed when you fetch it via Pipes, or else Blogger will send Pipes a redirect when it tries to get the feed.

Let me know in the comments if you have any questions, or if you’re trying this out for yourself. If you’re subscribed to my feed, I hope you enjoy the photos!