Older blog entries for dorward (starting at number 38)

7 Jun 2005 (updated 7 Jun 2005 at 21:58 UTC) »

Writing

I put together an article on CSS Inheritance (An explanation of how inheritance works in CSS and why CSS doesn't need Object Oriented style inheritance) a couple of weeks ago. I think its ready to go public now, but any feedback people care to provide would be welcomed.

Perl

It is confirmed - I'm off to Braga this year.

I've just seen another mention of Google Sitemap, I wonder how long it will take for a Perl module to show up on CPAN for generating these?

Minus four days it seems. Google::SiteMap. Ah well, I'll add this to my TODO list for the CMS.

6 Jun 2005 (updated 6 Jun 2005 at 22:44 UTC) »

CMS

Serious progress? I made that impossible by suggesting it might happen didn't I?

I did force myself to make some actual progress on the CMS tonight, and have just finished implementing the SBuilder::PageType::Copy module. This is the simplest of the Page Types, and simply slurps a file and then returns it as a scalar, prints it to standard out, or to a file (either a default based on the database or a one specified as a parameter to the method). It doesn't do much but it does lay the groundwork for other modules (in that a number of the methods will be moved to a superclass).

Since the output can be to standard out or to a file, it makes it more convenient for use in a preview scenario (dynamically rendering resources while making edits with the CMS frontend).

My week without working on the CMS

Ah well, I did have an enjoyable week (after I'd sorted out the evil paperwork caused by one company sending me a nasty letter for not paying a bill they forgot to send me). A very enjoyable week as it happens, it even netted me a signed photo and a hug from the first actress I remember having a crush on (OK, so she hugged almost everybody at the open day, but it was still fun). How she puts up with geek fans I'll never know.

The Sky Has Fallen

Sarge has been released! Next up - Duke Nukem Forever.

Gentoo

Discovered ivman so now I can stick a USB mass storage device into my PC and have it automounted.

CMS

Added an about page for my bookmarks and linked to the RSS feed.

Since this is a bank holiday weekend, and I have people coming to stay for a few days on Thursday, I've taken the whole week off. I should find some time to make some serious progress on the CMS now.

Nvu

Since I had a large chunk of code to deal with in my blog entry yesterday, I thought it might be nice to give Nvu another try. A graphical editor will make it easy to paste a block of code into a webpage and convert all the less than, greater than and ampersands into their respective entities, or so I thought.

Ha!

The first problem was that it didn't appear to support the X clipboard. I selected the code in Emacs, then middle clicked in Nvu and ... nothing. "Oh well", I thought and tried to open the Perl in FireFox so I could Ctrl+C copy it. Nope. Firefox offered to download the file instead. Perl files aren't text (cough) so it won't display it.

Getting annoyed with it I saved the blog entry, opened it in Emacs, pasted it in and addeed a couple of <pre> tags and search/replaced the characters with special meaning in HTML. Then I reopened it in Nvu to type the rest of the entry.

Then wretched thing promptly removed all the literal line breaks from the <pre> block and replaced them with <br /> tags, thus giving me lines of several hundred characters that would be a nightmare to edit.

Nvu scores a big thumbs down.

CMS

To pass some time this afternoon I decided to move forwards with the CMS a little. Now I'm on Gentoo again I have managed to get Class::DBI installed and working, so I set myself a little project to begin to get to grips with it.

I've been keeping my bookmarks over at del.icio.us, and thought it would be nice to include the most recent ones on the site. I could simply parse the RSS feed and include it, but I also want to keep a backup. Out comes MySQL and Class::DBI.

First task is to extend Class::DBI very slightly so it knows about the database table.

package SBuilder::DB::Bookmarks;
use strict;
use warnings;
use base 'Class::DBI';
SBuilder::DB::Bookmarks->connection('dbi:mysql:not', 'in', 'public');
SBuilder::DB::Bookmarks->table('bookmarks');
SBuilder::DB::Bookmarks->columns(All => qw/link title description date/);

Then we download and parse the RSS feed before inserting it into the database.

#!/usr/bin/perl
use strict;
use warnings;
use XML::RAI;
use LWP::Simple;
use SBuilder::DB::Bookmarks;
my $xml = get('http://del.icio.us/rss/dorward');
my $rai = XML::RAI->parse($xml);
foreach my $item ( @{$rai->items} ) {
    my $title = $item->title;
    my $link = $item->link;
    my $isodate = $item->issued;
    my $description = $item->description || '';
    my $db = SBuilder::DB::Bookmarks->find_or_create({link => $link});
    $db->title($title);
    $db->date($isodate);
    $db->description($description);
    $db->update;
}

I love Perl, it makes so many things so easy. At some stage I need to add support for del.icio.us tags, and suck the entire history of my bookmarks into it, but this is a nice start.

Having populated my database, I simply pick the most recent five and drop them into a template so they appear on my homepage.

19 May 2005 (updated 19 May 2005 at 15:10 UTC) »

Netscape 8

So Netscape 8 is out.

"The browser is like a hybrid car that combines the usability of Internet Explorer with the security of Firefox," Andrew Weinstein, a spokesman for America Online/Netscape, told Reuters.

The usability of IE? I've always found Firefox more usable. It sounds more like a hybrid car that combines the security and usability of Firefox with a Big Red Lever which turns that security off.

Biometric DVD Protection

Over at Wired there is an article about Biometric DVD protection. Obvious problems not mentioned in that article include:

  • Buying a DVD as a gift
  • Letting other people in the same household watch the DVD
  • Buying a DVD by mail order

This must be the most insanely stupid DRM scheme yet.

Replicators

They are coming.

Still setting up

Got lots of packages installed today (note that for x in package other-package etc etc etc; do emerge -u --deep $x; done doesn't work too well when you decide to add another package at the last minute and replace "$x" with it instead of adding it to the list.

x2vnc is handy. With it running, if I move my mouse far enough to the right it drops off my display and appears on my Windows "for testing CSS in IE" 98SE machine. No longer to I have to deal with the keyboard with too short a lead.

E17 is very nice. I love Xinerama with seperate virtual desktops on each screen. Now to decide if I poke around and see if I can work out how to customise the menus, or just switch to something more mature.

Gaming

Mongoose Open Day in a few weeks. Claudia Christian will be in attendance. This time I shall flee if I see Ian Barstow pointing a camera in my direction. Various people from around the country will probably be crashing at my place for the weekend

Higher Order Perl

Got a nice email from MJD - there isn't a hardback edition, but he hopes I enjoy it. Got a nice email from Amazon - they're sorry and would I like 20% off? Goes to show that complaining can be rewarding.

Reading

Currently I'm working my way through Interference: Book Two again, its always a good read. Oh no it isn't! and Mean Streets arrived this week. I also need to track down a copy of Dirk Gently so I can read the copy of Teatime that has been sitting on my to read pile for the past six months without feeling I'm missing out on something.

Gentoo

I finally found time to wipe Fedora from my harddisk and reinstall Gentoo. On the downside, I'm still watching stuff compile in the background. On the other hand, I managed to get X to use both video cards at the same time, something which always managed to crash Fedora for some reason (its amazing how used you can get to a 3000 pixel wide desktop - and how horrible it is to lose it). I also bothered to set up my mouse properly, so my scroll wheel and navigation buttons work once more. Things seem a lot nippier too - although that's probably due more to running Openbox instead of Gnome and a pile of servers.

CMS

Work progresses, slowly, on the CMS. It still isn't ported to Class::DBI (it didn't want to compile on Fedora and, like so many other things, didn't get investigated becuase I was planning to switch back to Gentoo (since Christmas)). Lastest bit is a hacked version of Justin Koivisto's "Defining An Image Crop Area With Javascript" script which will see patches submitted to the author once I get it doing everything I want. (I did send in one patch, only to find out that he had implemented the same feature the day before but hadn't published yet - ho hum, that's life).

Amazon

I'm unhappy with Amazon at present.

  • A SCART lead arrived 3 hours before they posted it (if I believe their email).
  • A DVD player posted before the SCART lead still hasn't arrived ... and was due today at the latest.
  • Higher Order Perl arrived nice and quickly, but in paperback - the website claims Amazon only sell a hardback edition.

Its been a bad week for online shopping.

Perl

Looks like the Apps team at work is off to Braga this year. Yippie. I must arrange to take some of my holiday time off while I'm out there (shockingly I failed to use all my holiday last year, so I'm landed with six weeks to use up before next April - its a hard life).

The Dark Side

I've been drooling over X-boxes lately. Now I have a decent sized screen in my living room it would be nice to get a computer plugged in to it. Scarily, it looks like an X-box (with a mod chip) is the most cost effective way to go. Plus it has the added bonus of being able to play Fable and Jade Empire.

New Article: Ampersands, PHP Sessions and Valid HTML

26 April 2005: A new technical article on the topic of Ampersands, PHP Sessions and Valid HTML was published by the QAIG, courtesy of David Dorward. The QA Interest Group welcomes such contribution of material, see our Contribution Guidelines for details. (News archive)

- W3C QA News

I'm so proud.

29 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!