Grabbing LJ posts via OpenID authentication

Dec 15, 2005 / 0 comments

Sometimes I love Perl. Thanks to Chris Ball, whose article on WWW::Mechanize I always seem to come back to for this sort of thing.

#!/usr/bin/perl

use strict;
use warnings;

use Data::Dumper;
use HTML::TokeParser;
use WWW::Mechanize;

my $openid_server_url = 'https://the.earth.li/openid/';
my $openid_username = 'noodles';
my $openid_password = 'password';
my $openid_url = 'http://www.earth.li/~noodles/blog/';
my @ljusers = ('beccus', 'brrm', 'dpash', 'karen2205', 'lnr', 'padzor');

my $agent = WWW::Mechanize->new();
$agent->get($openid_server_url);
$agent->form(1);
$agent->field("username", $openid_username);
$agent->field("password", $openid_password);
$agent->click();

print "Logged into OpenID server.\n";

$agent->get('http://www.livejournal.com/openid/');
$agent->form(1);
$agent->field("openid_url", $openid_url);
$agent->click();

print "Logged into LiveJournal.\n";

foreach my $user (@ljusers) {
        print "Fetching feed for $user.\n";
        $agent->get('http://www.livejournal.com/users/'.$user.'/data/rss');

        open(RSSFILE, ">$user.xml");
        print RSSFILE $agent->content;
        close(RSSFILE);
}

Car Keys

Dec 15, 2005 / 0 comments

I have a remote control doofer for my car, to lock/unlock the doors. Why is it, even if there are hundreds of miles between me and my car, that if I knock the buttons on it pulling my keys out of my pocket I worry I've accidently unlocked the car?

Looking for RSS reader advice

Dec 14, 2005 / 0 comments

I currently use Google Reader to read most of the blogs I track. It seems to work in a way I like.

However I'd like to be able to aggregate in Livejournal using my OpenID so I can read friends-locked posts. I don't think it's appropriate to use a public service like Google or Bloglines for this, which means running something myself.

I've had a look around but not found anything that's close to Google Reader. I like just having all the posts in chronological order, not listed under each source feed. Most things I could find give you a sidebar of a tree for each feed and then you have to look at each feed in turn. I just want my content splurged at me goddamit! Planet does this, but I also want content I've read to go away by default, which Planet doesn't handle (being a generator of a static web page).

So, any suggestions? I'm using Firefox under Linux, but I'm not tied to an in browser solution (I've a feeling it would be easier to get my OpenID stuff working that way though). So far I've tried Sage and Wizz. I've also looked at Straw but not installed it as it looks a little unmaintained. Liferea looks like it could be an option, so I think I'll go play with that for the moment.

It's cool to talk SCMs

Dec 14, 2005 / 0 comments

It seems everyone is talking SCMs these days, usually touting their favourite option while deriding everyone else's. (I exaggerate for effect.)

Years ago we mostly used CVS and were happy. Some people are still happy with it. I still have a bunch of code in it, though migrating it to something else is on my list. Why? Niceties like being able to rename a file. Or atomic changesets. Things that all the new breeds of options can do. For the tress I manage myself distributed working isn't a big issue, so they'll probably just get migrated to Subversion as the easiest option.

However I'm not really tied to any SCM. I've used at least Arch (tla), BitKeeper, ClearCase, CVS, Monotone, PVCS and Subversion for both checking out and committing files, and handful more to check out files from things I wanted to look at. The only one that is unusable is PVCS. The rest have all been fine for whatever I've used them for.

So, if I don't care about which SCM, why blog about them at all? Because I care about how they get used.

I'm a big fan of small granular commits with descriptive commit messages. Not huge big dumps of code with "check in new code" as the comment. Gah.

Take, for example, the Linux kernel. Commit messages are fairly descriptive there and if you have enough time you can read through the changelog since the last release and really know what's gone on. This is great. Also the changes are granular enough that if you hit a problem it's likely that you can narrow it down to a single commit that doesn't do a lot other than break things for you.

Not all projects I have been part of manage either of these. People often seem to view the SCM as a punishment, using it only under sufferance and as infrequently as possible, leading to large commits of many items at once. Which then means they don't see the advantages of it and are more likely to hit merge problems as the tree has changed under them. Meaning they end up hating it more and avoiding it as much as possible, making it all worse. Not good.

Or, you get people who'll commit alright, but without any sanity testing at all. Like, even a compile. What's the point? I know you can roll it back, but if you're not sure it works and haven't even compiled it, what the hell makes you think it's suitable for committing? Bah.

I can't see that my desired usage is that unreasonable. Am I missing something?

Dubby-Dub-Dublin

Dec 6, 2005 / 0 comments

Kathy and I had a nice long weekend in Dublin this weekend past, celebrating 10 years of hell together. Was good, except for getting rained on lots on the Friday (solved by buying umbrellas) and Kathy starting the weekend with a cold and me finishing with one. Bah.

I realised it's been about 5 years since I was in Dublin itself, rather than just the airport. Various comments:

  • The traffic lights still explode. This is fantastic and I think more places should do it. They sort of beep while waiting to go red (so a pedestrian can cross), then make an exploding noise and tick until going green again.
  • It's very expensive. When we arrived we ordered room service as it was late and though the prices quite high. And then discovered that they weren't really that bad when compared against the normal cost of eating out. What gives? I'm sure it didn't used to be so bad. That was pre Euro - is that the difference?
  • The Elephant & Castle still do the best chicken wings I've ever had.
  • Ryanair are bastards. I'd bought a cup of coffee just before they started boarding and they wouldn't let me take it on. They mumbled some nonsense about turnaround times or something, but given you can buy coffee on the plane I think it's fairly clear they just object to losing the chance to sell you something.
  • I'm not convinced Guinness in Dublin is any better than a good pint of Guinness in England. Maybe that's due to the fact it's all brewed in Dublin these days.

subscribe via RSS