Recursion considered harmful

Well, in this case it was real bad.

Here’s a tip: When using the “RSS widget” in WordPress, do not point it to any web-based feed. While moving files around, I managed to make the Gallery RSS feed completely nonexistant, which meant that WordPress showed its 404 page. WordPress then tried to fetch the un-fetched Gallery RSS feed to show it in the sidebar on the 404 page. The RSS feed wasn’t there, so WordPress returned the 404 page…

The Gallery RSS feed is fixed, and the WordPress 404 page no longer shows sidebars.

In case anybody’s wondering why my blog showed a generic holding page for the last 12 hours….

Posted in meta, tech | Leave a comment

The UnSuggester

Brad DeLong links to LibraryThing’s UnSuggester. Put a book you liked, and it’ll tell you what books you probably want to avoid.

Sample search: If you liked Winning, by Jack Welch, you’ll probably hate Watership Down, The Princess Bride, stuff by Neil Gaiman and Margaret Atwood…

I think I have a new reading list from this.

Posted in random | Leave a comment

Web-based Feed Readers

To be able to tote subscription/read status between machines and OSes, I’ve switched (mostly) from using a desktop feed aggregator to using the web-based ones. So far, I haven’t found one I’m really happy with.

  • Bloglines:

    The good: single-key navigation too all unread posts. Nice Presentation.

    The bad: keeps re-showing already read posts. A lot. Mark all items read in a feed as soon as you click on it, even if you didn’t scroll all the way down the 75 new items (hello, Planet Intertwingly).

  • Google Reader:

    Pretty much the inverse of the above two. I can’t believe there isn’t a better way to move to the next unread feed with the keyboard other than shift-N shift-P to move up and down the feed list and shift-O to open. There has to be a better way. The ability to star posts is nice, it’s much easier than posting to delicious and forgetting about it.

Any suggestions? Have I missed something on either one?

Right now I’m using GReader but the keyboard nav is driving me up the wall.

Posted in tech | 2 Comments

Theo's First snow day

Whoot!

Figures I’d have to work.

Posted in random | 1 Comment

WordPress, ETag, Last-Modified

WordPress has some pretty crappy code buried in it… the curse of PHP. I can’t complain too much because it’s still a very robust platform with a good community and the best anti-spam plugin. That having been said, WordPress has some broken behavior with respect to feeds and Last-Modified and ETag. The ETag is an MD5 hash of the Last-Modified date, which means there’s not really any empirical value in including both.

Adding in the fact that if the client actually sends an ETagged response (the HTTP 1.1 If-None-Match header), WordPress’s quoting mechanism screws it up. Some people have taken a stab at fixing it but it seems easier to just nuke the @header(“ETag: …) line in wp-include/classes.php (around line 1637 in wordpress 2.0.5) and let last-modified work just fine.

Update: WordPress has another bug that only now becomes evident. If you set a post timestamp in the future, the last-updated timestamp on your feed changes when you save the post, but the post isn’t in the feed. When the post finally appears, the feed comes back 304, even though there’s a new post in it. Ugh. This didn’t show up before because last-modified didn’t work when etag was also sent.

Update 2: I retract everything in update 1. I’m apparently crazy.

Posted in meta, tech | Leave a comment

Sandbox Skins

Keith is leaping into the breach with Sandbox. Welcome.

Two tips:

The first is that you can use CSS to do the header image without altering the base theme files.

The second is that when you do edit your custom skin, you should copy just the header/comment section, then @import the base layout, i.e. @import url(’3c-b.css’); in your skin. Makes it much easier to separate your color/style/font whatever hacks from the base structure, and you don’t have to worry about copy and paste problems later if you want to change structure.

The third, unrelated tip, is to install the wordpress atom plugin. (If you do this, you _should_ edit the base theme files to change the discovery links to be accurate.)

Posted in meta, tech | Leave a comment

Exchange students

I’ve known some in my time… some of which were hosted by people who I thought had no business hosting. But trust me, all of that is forgiven after reading about the strange adventure of Michel Gromek, Polish exchange student:

“When I got out of the plane in Greensboro in the US state of North Carolina, I would never have expected my host family to welcome me at the airport, wielding a Bible, and saying, ‘Child, our Lord sent you half-way around the world to bring you to us.’ At that moment I just wanted to turn round and run back to the plane.

You can imagine where it goes from here.

Posted in politics | 2 Comments

DVOA chart

For those of you into football stats, the killer stat is DVOA (and its friends, VOA, DPAR, PAR, and DAVE).

It’s nice to be able to look at DVOA on a graphical basis, so I cranked out some javascript using the dojo toolkit to do exactly that. Take a look: DVOA graph.

The graph labels work on firefox but not IE because I’m too lazy to figure out how to add add text nodes in VML. If someone wants to look at the source and figure out how to do it, feel free. Otherwise, use a better browser.

Posted in football, sports, tech | 3 Comments

All Atom, All the time

RSS is a crappy spec, so this blog is now 100% atom. And instead of serving up the same feed on a half dozen different URLs, I’m now redirecting all the feeds to /feed/atom.

Dang ole feeds.

Posted in meta, tech | Leave a comment

boost::bind makes my brain hurt

why?

typedef ... K;
typedef std::map<k , HANDLE> map_type;
map_type map_;
...
std::for_each(map_.begin(), map_.end(),
    boost::bind(&map_type::value_type::second, _1)); // this works
std::for_each(map_.begin(), map_.end(),
    boost::bind(WSACloseEvent,
    boost::bind(&map_type::value_type::second, _1)));
    // this barfs inside boost::bind ... incomplete type
Posted in tech | Leave a comment