da: (bit)
I've given up on using LJ for my RSS feeds. I've got 88 of them, which means I sometimes don't see real people posts for pages and pages. I'm jumping to Google Reader. Google Reader will import "OPML" data, so that's how I wanted to do the transfer. This is a how-to.

(If you are hoping to read your LJ friends list directly from an RSS reader, you might instead try this exporter, which grabs the necessary data for friends- it doesn't include feeds and is beyond the scope of this how-to.)

The short version:

1) if you're handy with Perl, grab the code at the bottom of this entry, change the user name, and run the code.
1b) if you're not handy with Perl, give me a shout and I'll run it for you on my server. :)

2) Output is a list of RSS URLs. To translate these to OPML, feed them to this page. Copy and paste them into the big text box, then hit the "Create OPML" link. Seconds later, you will have an output file, which you should save to disk (the file name doesn't matter).

3) Optionally, open the file in a text editor and change the "title" parts from the URL into a sensible title for each feed. Yeah, I was too lazy to write my own OPML and fix that.

4) in Google Reader, the left-hand lower corner, choose "Manage Subscriptions". Choose "Import/Export". Browse and upload your OPML file.

Done!

So far, I like the google reader interface, and now I can actually pay attention to the real people on my list who do still post. (I appreciate y'all! I did this for yoooou!)

---
Don't bother reading the rest unless you want technical details; mostly here for google searching. Let me know if this helped anybody!

The code:

#!/usr/bin/perl

use strict;
use WWW::Mechanize;

my $base_url = "http://da-lj.livejournal.com/profile";

my $m = WWW::Mechanize->new ( autocheck => 1 );

$m->get( $base_url );

my $profile_html = $m->content;
my @feed_lines = ($profile_html =~ /watchingfeeds_body.*/g);
my @feed_urls = ($feed_lines[0] =~ /href='(.*?)'/g);

foreach my $lj_url (@feed_urls) {
    $m->get( $lj_url );
    print $m->find_link( text => 'XML' )->url() . "\n";
}


And that's it. I'm using WWW::Mechanize, which is the bee's knees if you have to do screen-scraping in Perl.

I started off with a manual grab of my "watching" page, a word-processor search-and-replace, and was about to run a batch of 'wget's to grab the lj-feed pages when I realized it would be quicker in perl.

The biggest drawback to this method is the cost of installing WWW::Mechanize in the first place. CPAN makes it easy(ish) but it has a tonne of dependencies. ...I guess it's just one step if you're on a reasonably recent Debian/Ubuntu.

Anyhow.
da: A smiling human with short hair, head tilted a bit to the right. It's black and white with a neutral background. You can't tell if the white in the hair is due to lighting, or maybe it's white hair! (lego)
A shift in work responsibilities has meant I'm suddenly working on programming projects nearly full-time (again). Today between 10am and 6pm, I:

1- made code changes to my hopeful patch to sshd (c++)
2- fixed a logic bug in a password-changing web-app (python)
3- fixed a display bug in a faculty-information web-app (php)
4- worked on a logic bug in a tool to produce faculty webpages (perl)

#1 included editing a bit of man-pages source-code, which is fairly difficult to read. But
#3 included editing .rtf source, which is quite difficult to read (nigh impossible if you aren't changing something simple, like I was; it's worse than html written by an older version of Microsoft Word. Not meant for human consumption.)

I considered editing a lisp macro for Emacs, just to add a fifth programming language, but that felt cheap.

In a nice cap to the day: we had our monthly Perl Mongers meeting, and afterward I discovered that one guy is quite experienced with the source to ssh (hacking for fun), and he's happy to be an additional set of eyes to look over my changes before I send them off to the project maintainers. Which I'm chuffed about, since I am not a strong C++ programmer. His bar tab was on me.

I was musing whether any parts of my work this week felt effortless or elegant. The python came closest: I wrote the rest of that app from scratch (in December) before I knew how exception-handling worked. Today's fix replacing an if/then with a try/except was clean, logical, quick, and most importantly, effective.

A lot of my work is push-up-my-sleeves-and-get-it-done coding, instead of big design. This summer I'm going to have to go back to two larger php projects, neither of my design. Both have some aesthetic merits, but neither feel at all elegant. Both are going to involve incremental change, though if I can, I would make the changes in a way that leaves the overall code cleaner than when I started.

I suppose what I'd like is a project that starts with elegant PHP. I'm sure it's out there somewhere.
da: A smiling human with short hair, head tilted a bit to the right. It's black and white with a neutral background. You can't tell if the white in the hair is due to lighting, or maybe it's white hair! (Default)
Just got in from a production of Arcadia, by Tom Stoppard.

If you're local, a recommendation to go see it tomorrow or Saturday.

To start with the minuses: it felt too long by 20 minutes. It was 3 hours with a 15-minute intermission. The first act dragged, and not from the material- the pacing felt like they were sloooowwwwiiing down. The players, wisely I think, didn't try to put on English accents, but I kept having to remind myself we were in 19th Century (or modern) Derbyshire, England. The closing 20 minutes included a piece of music with a soft-pop singer in it, which totally jarred me out of believing in the time-period.

The pluses: the play itself is really good. The plot is complicated, and quite talky. Broad brush-strokes: it covers entropy, the second law of thermodynamics, fractals, whole piles of classical poetry, free will, determinism, romanticism versus classicism, love, madness...

I'm glad I read the wikipedia page beforehand, because many classical references were well above my head (the name Arcadia, for example; Thomasina the 13-year-old genius understands her Latin; and shares a moment with her tutor that is completely lost by her mother; I think there's a theme of "what exactly is going on with the tutor" that gets a bit more play with more knowledge of the references.) I hope you'll forgive me not explaining the bulk of the plot- the wikipedia page does a good job, at least.

There was a lot of dry humour. The setting is elaborate, set in the country house of a lord (or his descendants). For most of the play, scenes alternate between the 19th and 20th century. It's centered on a huge desk, where peoples' effects stay put as the stage resets flips between "then" and "now". This choice is understated in the first act; and then in the second, it feels intentionally "sloppier": a character leaves his laptop; one person pours a glass of wine in the 19th century and it is drunk by another in the 20th. There is a boy, Gus, who is mute and is played by the same actor (in the same clothes) playing Augustus, the brother of Thomasina.

For the last few scenes action is mixed with both time-periods at the same time. By the second act you get a good feeling for the characters' personalities, and seeing them around the same table, arguing in counterpoint, works well.

The actors are fairly good, for the most part. I was impressed by the woman playing Thomasina. Overall they were fairly good, but not polished- the indignant cuckolded poet and his friend the Captain felt particularly weak to me, which is a shame, because if they had been stronger, their pathos would've played a stronger counterpoint to the dry wit.

It was well-attended, at least; though I think 2/3 of the audience were highschoolers. (I watched a group of six try and decide where to sit; they acted exactly like starlings flocking, circling, settling, then taking off again to another bunch of seats. They did that, like, 4 times.) Also, the girls who were cooing after Gus (during the show! every time he smiled!) were a bit much.

I will need to close here, as it's after midnight. I think some time I would like to see this done professionally. And, possibly to seek out more Tom Stoppard plays; I've only seen "Rosencrantz and Guildenstern Are Dead". (And I've seen both "Brazil" and "Shakespeare in Love", though neither left me very favourably disposed).

Oh- and I think the way I wound up seeing it was neat; I ran into [livejournal.com profile] thingo, he invited me for tonight's show, I said I'd never heard of it, sounds great, then I discovered it was the night for the monthly Perl Mongers meeting. We were talking about it in IRC, and a small pile of folks said "actually, I'd go see that." So some of us did (and some of us bailed! Slackers! ...kidding). Go, go, coding poets!
da: (bit)
Unclutterer reports that O'Reilly tech books has an ebook promotion for $4.99 per book you already own. This looks quite useful to me:

- O'Reilly ebooks come as a bundle of three common formats (mobi, pdf, epub)
- they are un-copyprotected, a.k.a. not locked to existing software/hardware readers
- while only a fraction of their books are currently available in ebook, some others are also available as pdf

To get the $4.99 books, you need to make an account on their site, register the ISBNs of your books, add them each to your cart, and use the 499UP discount code. I tested one book, and it appears to work.

I may just have to get busy with our barcode-reader at work, since that's where my O'Reilly books live now. I figure at least a dozen of my books are worth future-proofing in case I eventually buy a portable bookreader. :)
da: A smiling human with short hair, head tilted a bit to the right. It's black and white with a neutral background. You can't tell if the white in the hair is due to lighting, or maybe it's white hair! (lego)
The arts event I went to this evening was... meh.

I slept instead of going to the Cory Doctorow talk. It was a good nap.

I had a funny idea that solves a problem at work. I want to start hacking WWW::Mechanize to make a proof of concept, but [livejournal.com profile] roverthedog is standing at the door staring at me and her eyes are saying, "You haven't given me a walk yet."

I shouldn't write this code, anyway; I should give it to my co-op.

Really I shouldn't.

OK, Rover, time for a walk!
da: (bit)
I will freely admit this post will be of limited interest, but I'm quite happy with this result, and maybe you will be too, if you're a big 'ol label-making geek. :)

So, part of GTD is the importance of having labeled manila file-folders. I can corroborate that printed-label folders do work better than hand-printed labeled folders. Not only do they look good, there's something viscerally fun about filing something away in a new folder.

The GTD guy recommends buying an electronic label-maker. For a number of reasons (including: the clutter factor, the expensive label-tape they use, and typing on those chiclet keyboards annoys me) I've made do with printing onto a sheet of Avery 3x10 labels in OpenOffice. While this solves those problems, this still felt like "making do" because it takes OpenOffice a full minute to open, the template is a little mis-aligned, yadda yadda.

So I found a little script, and extended it. )

And that's my labeler, which I figure is at least 5 times cheaper than the tape-label machines, going by the price of the refills.

Data can come from a unix pipe or from standard input. Turning a manual task into a unix pipe command is about as good as it gets, productivity-improvement-wise. (assuming it's not a stupid task in the first place).

Oh and also, if we decide to do them this year, I think it will work wonderfully on holiday address labels, even straight from an emacs buffer of addresses, because you pipe data to it.

Now *that* is cool.

Friday, 30 May 2008 02:49 pm
da: A smiling human with short hair, head tilted a bit to the right. It's black and white with a neutral background. You can't tell if the white in the hair is due to lighting, or maybe it's white hair! (purple jag)
Three years ago, I read about 9-block quilt patterns and I turned it into a perl program and article, purely for amusement-value. And a Christmas present.

Someone else has taken the original idea and made them into a security feature for web discussion-boards to prevent spoofing. It's a one-way hash from someone's IP address into a unique picture. Quite a clever idea!

I noticed a few weeks ago when these shapes started showing up on wordpress blogs. It seems they've added it as a standard wordpress plugin option. It will take me a while before I don't do a double-take each time I see them though. :)
da: (bit)
While [livejournal.com profile] melted_snowball is learning the very useful R statistics environment, I'm learning just enough about Piet, a graphical language whose programs look like Mondrain paintings. I foolishly volunteered to present on this topic for my local Perl Mongers group. I'd hoped I could reimplement my quilt-building program to make executable programs, but that part has fallen by the wayside. If you want to know what I present on, either show up [1], or ask me after the fact what went down, 'cause I'm sure I'm not going to have time in advance to write up proper slides.

[1] google for our town and perl, should be easy to find our website. The talk's tomorrow night at 7pm. Pizza's on the house. Beer, after, probably at McGinnis in the Plaza.

Come watch me make a fool of myself!

Progress

Saturday, 24 June 2006 12:44 am
da: A smiling human with short hair, head tilted a bit to the right. It's black and white with a neutral background. You can't tell if the white in the hair is due to lighting, or maybe it's white hair! (Default)
I'm in Chicago. First task tomorrow: replace my camera's CF card.

I bought my digital camera in 2001. One of its features was its massive storage capacity: a 340 MB hard-disk, in CF form-factor. (Man, that was a lot of storage then. And so tiny!) But progress marches on. Now my camera is old, slow, and I was wondering when I could afford to replace it.

Yesterday, I tried a regular CF card in it. Weow, it's like a whole new camera, so much faster.

Staples has a sale on CF cards. $30 gets you 1GB. That seems like progress to me.

--

[livejournal.com profile] emaki and I are in a hotel just next to McCormick Place. It's overlooking some odd looking statuary.

Blade Runner? )

Also, the
bedside table )
has both a Gideon Bible and The Teaching of Buddha. [ed: fixed titles]

Tomorrow: architecture tours.

Web 2.0

Tuesday, 20 June 2006 03:10 pm
da: (bit)
I'm going to Chicago for a perl conference that starts Monday. This is the most geekish group I am involved with. In addition to many other things about YAPC that I enjoy, I like the opportunity to learn what all the alpha-geeks are up to these days. The conference flavour is not particuarly higher-ed, corporate, or trade-show. It's more like a smallish con, or a swap-meet trading in programming ideas. I always learn something interesting, and often something I can take and use at work immediately. But a lot of it is just plain fun. (For example YAPC was my first exposure to massive numbers of laptops with wifi, in '01 or so.)

This year's mailing-list and wiki have been gearing up for a few weeks, and people are starting to make their plans for hacking sessions, being tourists in Chicago and so on. (I've made plans for a less herd-oriented tourist experience; [livejournal.com profile] emaki , another friend Arguile, and I will be touring in a small group on Saturday and Sunday).

The conference planners are taking advantage of the stuff that seems to be called "Web 2.0" these days, including social-networking services, AJAX (which is less server-intensive web tools built with javascript and xml), and "mashups" between web tools. This makes sense; the organizers this year include a number of bloggers, a podcaster, and a part-time magazine-publisher.

Yesterday, they announced the "official tag of YAPC". I initially scoffed, thinking it overkill. Then I thought about what it would be used for; del.icio.us bookmarks, flickr photos, perhaps technorati blog-searches, and google searches. So yes, it makes sense to standardize on a tag, and since most people will be bringing laptops, cameras, blogging, and maybe bookmarking whatever they discover at YAPC, it makes finding stuff in these web services much easier for those of us who come along a bit later.

This morning someone converted the official schedule to ical format, including abstracts. Someone else posted it to Google Calendar, which is pretty handy for me, though I'll probably use ical for the duration of the conference since there isn't a guarantee of network quality.

So what's the point? I suppose it all comes down to laziness. ;) And, hopefully, building on the work of others (and giving it out for others to do the same in an open-sourcy way).

December 2024

S M T W T F S
12 34567
891011121314
15161718192021
22232425262728
293031    

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Monday, 1 September 2025 02:28 pm
Powered by Dreamwidth Studios