Being the thoughts and writings of one Gustaf Erikson; father, homeowner, technologist.

Tuesday, 2006-01-31


Integrating feeds into Blosxom

My recent work fixing posting via email to this blog, coupled with my previous efforts getting my del.icio.us links posted, has got me thinking that there has to be a better way of handling this.

My post-by-email is basically “grab the content of the body and put it in a file”. The del.icio.us integration is a custom script that reads the RSS feed for my links daily, munges it into Markdown syntax, and then writes to a file. This works fine for now, but what if I want to use Blogline’s clippings, or Newsvine’s blog? I don’t want umpteen blogs floating around: I want one, which I can update in multiple ways.

So what’s needed is a RSS/Atom reader that subscribes to the feeds of the content I’m creating, fetches the relevant data, formats them in a source-dependent fashion, and then posts the data.

Requirements:

  • Perl preferred for hacking reasons, but other langs acceptable. Must run on my hosting environment (basically a Linux server).
  • per-feed formatting customization (sounds like a job for XSLT)
  • per-feed posting customization (I want to aggregate all links into one post, while other stuff might as well go up immediately)

Writing my own stuff for this feels like inventing lots of wheels at the same time. Any tips?

Update: Looks like Blagg may fit the bill. It’s very blosxom-like in style.

Update 2006-02-01: The Perl module XML::RSS::Parser looks like it can do a lot off stuff. I’ll have a gander at the docs during the next few days.

Converting from ISO-8859-1 to UTF-8 in Perl

When posting my observations via email any Swedish characters are converted to quoted-printable ISO-8859-1 by Gmail. However, this blog is in UTF-8. This is how I translated the input from the mail message.

#!/usr/bin/perl -w
use strict;
use MIME::QuotedPrint qw( decode_qp );
use Encode qw( decode encode );
# split the mail message
my ( $headers, $body );
{
    local $/ = undef;
    ( $headers, $body ) = split( "\n\n", <STDIN>, 2 );
}
# decode the qouted-printable input
$body = decode_qp( $body );
# decode to Perl's internal format
$body = decode( 'iso-8859-1', $body );
# encode to UTF-8
$body = encode( 'utf-8', $body );
print $body, "\n";

The result is piped into a second script that formats the actual posting.

Pretty basic, eh? But until you know how, it can be a bit frustrating getting this to work.

Links for 2006-01-31

  • Effectively Integrating Into Software Development Teams - Dennis Forbes — “In the artificial world every solution has to be database vendor netural, platform neutral, infinitely vertically and horizontally scalable, immediately multilingual, using n-tier connection pooling via a hierarchy of web services.”. Tags: devel ecommerce management programming.
  • Optimal Software Development Processes and Practices - Dennis Forbes — pragmatic stuff. Tags: devel management productivity programming software.
  • Russell Beattie Notebook » Motorola RAZR V3 Power User’s Guide — who knows, I may have to use this hunk o’ crap in a short while. Tags: howto mobile tutorial.

Grabbed from my del.icio.us links.

Pashazade: The First Arabesk by Jon Courtenay Grimwood

A nice reinvention of the cyberpunk genre, set in alternate-future Ottoman Alexandria.

The author’s site is here.

[…] Things only started to unravel in the sixth [year] when I decided there was nothing wrong with my school that couldn’t be cured with a sub-machine gun and unlimited ammunition […]

Observations

I’m “VABing” at home, so there’s some time for blog housekeeping.

 

Soundtrack to these gloomy days is, incongruously, Morningwood’s self-titled album. Specifically the absurdly catchy, self-referential Nth Degree. All use of tech-speak in pop must be encouraged…

 

Sunday, 2006-01-29


Bad news

I got a phone call today telling me that an old university friend and former coworker had died after going through the ice while skating.

He was part of a larger group in a skating outing. Another person has died too, and a third has critical injuries.

He was in many ways one of the best and brightest guys I knew. It’s utterly unbelievable that he’s gone.

Friday, 2006-01-27


Links for 2006-01-27

  • Sennheiser HD 201 - jämför butiker, hitta lägsta pris - Pricerunner — these ‘phones have got some good reviews. Tags: gadgets hardware headphones wishlist.
  • The Week Magazine — time geekery, the best kind. Tags: astronomy time utc.

Grabbed from my del.icio.us links.

Thursday, 2006-01-26


Dual monitors

I bit the bullet and grabbed a second monitor from a departed co-worker. I’ve been making do with VirtuaWin, a utility that provides multiple desktops on Windows and that I really like. But I felt that I needed that real sysadmin/Bloomberg vibe and wanted 2 flat panel monitors taking up precious desk space.

The primary monitor is a Dell 19-inch LCD, attached to the DVI port of the video card. The second is a Dell 17-inch attached to the analog port. The difference is noticeable, even though the 17-incher has the same resolution and thus is pixel-for-pixel crisper. But there is some colour bleeding around window bar fonts. Also, it’s really hard to get more or less the same brightness on both monitors.

But so far, I like it. I’ve pushed Miranda, a putty session, the Bloglines Firefox window, and an Outlook window showing the unread mail search folder onto the secondary monitor. This leaves me space to concentrate on the all-time- consuming support box and TOAD session I seem to live in these days.

Both monitors have USB hubs, so between them, the 4-5 ports on the box, and my 4-port USB hub, I have more USB ports than I can shake a stick at. I’m old enough to remember life without USB. USB rocks.

Links for 2006-01-26

  • blackrimglasses.com » My So Called Digital Life, Pt 3: Communication — stuff about mobile comms with MS mobile, may need this for work in the near future. Tags: email mobile productivity work.

Grabbed from my del.icio.us links.

Observations

Techdirt:

[Are] there really people who are going to pay to have a special song play whenever they’re reminded that their mobile operator’s coverage sucks?  

Wednesday, 2006-01-25


Links for 2006-01-25

  • Feet up! : linkblog/links_2006-01-24.html — all good stuff here that I might as well in one post. A meta-delicious post. Tags: google-talk im links rss subscribing.
  • Jeff Atwood : The Ten Commandments of Egoless Programming — good stuff here… from 1971. Tags: code-review devel programming.
  • Boing Boing: Massive busts of warez groups reported in Europe today — note the update: looks like the German GVU are doing the same thing that Antipiratbyrån in Sweden did last year. At least they got busted… Tags: chilling-effects filesharing p2p.
  • How-To: Build a practical HTPC - Engadget — most interesting. Tags: computer hardware howto pvr.

Grabbed from my del.icio.us links.

Observations

Erik:

Bara på DN Kultur kan man publicera en artikel på ett uppslag om att Ann Jäderlund lärt sig hantera sin dator.

Jag tyckte Ann Jäderlund var en sällsynt dålig diktare redan 1991. Det verkar inte ha blivit bättre, men är man ett namn så.  

Good haul from Bloglines this morning. However, as I can’t save posts from within Bloglines mobile, I have to resort to IRC:

08:44 <gusMobile> note to self: jim, coding horror, joel, atwood

I’ll write a post about the bug so I can get Bloglines working on fixing it.  

Jeff:

Is it possible to take dependency avoidance too far? Of course. The flip side of reducing dependencies too aggressively is the Lava Flow anti-pattern […]  

Testing the procmail setup, please ignore.  

Tuesday, 2006-01-24


[SvSe] Biltullar

  • 06:30—06:59: 10 kr
  • 07:00—07:29: 15 kr
  • 07:30—08:29: 20 kr
  • 08:30—08:59: 15 kr
  • 09:00—15:29: 10 kr
  • 15:30—15:59: 15 kr
  • 16:00—17:29: 20 kr
  • 17:30—17:59: 15 kr
  • 18:00—18:29: 10 kr
  • 18:30—06:29: 0 kr

Links for 2006-01-23

  • Podsafe Music Network - Edwin Derricutt — Mark’s bro. Tags: music podsafe streaming.
  • The Infinite Matrix | Cory Doctorow and Charles Stross | Appeals Court Tags: read-later sf short-story.
  • The Infinite Matrix | William Gibson | Time Machine Cuba — memoir. Tags: literature read-later sf.
  • Techdirt:Attacking ISPs As A Proxy In Your Legal Fight… Part II — all to depressingly familiar — if you can’t fight the ones saying something, turn off the tap at the source. Tags: chilling-effects legal.

Grabbed from my del.icio.us links.

Sunday, 2006-01-22


Links for 2006-01-22

  • Easy Automated Snapshot-Style Backups with Rsync — backups? what backups. Tags: backup hacks howto linux rsync script sysadmin tutorial unix.
  • Olympus E-500 review — I want this. Tags: camera dslr gadgets olympus review.
  • Kistan — blogg om populärkultur. Tags: blog popular-culture sweden swedish-culture.
  • The Sharp Side: In Banville Land — On John Banville’s Todtnauberg. Tags: john-banville literature martin-heidegger paul-celan radio review.
  • BlosGate- The Email to Blosxom Gateway - GeekUprising Internet Consultants — Sounds like a more full-featured version of my observation hack. I might as well live my entire life in gmail. Tags: blogging blosxom email perl software weblogs.

Grabbed from my del.icio.us links.

The War of the Flowers by Tad Williams

A fantasy novel about a ne’er-do-well musician in San Fransisco who’s life is turned upside down when he’s attacked by a being from the parallell universe of Faerie. Naturally his destiny is much grander than he thought…

Well written like all William’s books. The beginning is near social-realism — our hero loses his unborn child in a miscarriage, his girlfriend, and his mother to cancer in the first few chapters. This sets the tone for the rest of the book and removes any inconvenient characters that may mess up the path of destiny.

A classic public library book: something you’re delighted to find in the shelves but won’t pay for in the store.

Saturday, 2006-01-21


Observations

Gruber:

PCs typically cost less than Macs because they’re pieces of crap, not because Intel CPUs are less expensive than IBM’s or Freescale’s.

 

Friday, 2006-01-20


Links for 2006-01-20

  • Life in Text Mode :: Phil! Gregory — via JimH. Tags: command-line console hacks sysadmin textmode unix.

Grabbed from my del.icio.us links.

Observations

Sailing vessel Moshulu. Nice to see she hasn’t sunk, Erik Newby was aboard here in the late Thirties.  

Crappy digital TV receiver is offline, due to the snow? I sure hope the antenna hasn’t fallen down, that would really suck.  

Thursday, 2006-01-19


Observations

Sub rosa:

The phrase is Latin and means ‘under the rose’, because the rose was an emblem of secrecy hung above council tables and confessionals. The origin of which traces to a famous story in which Cupid gave Harpocrates, the god of silence, a rose to bribe him not to betray the confidence of Venus. Hence the ceilings of Roman banquet-rooms were decorated with roses to remind guests that what was spoken sub vino (under the influence of wine) was also sub rosa.

(from this Wikipedia article.)

 

Works from gmail, is it ok from mobile? I have to put some more content in to make sure the line endings aren’t fubared.

 

Wednesday, 2006-01-18


Links for 2006-01-18

  • miscoranda - URI Design — notes on how to choose URIs. Tags: classification file-system semantic uri web.
  • Procmail FAQ — I have to consult this for my sins. Tags: debugging filter mail procmail script.
  • Timo’s procmail tips and recipes — more procmail testing. Tags: mail procmail scripting testing.

Grabbed from my del.icio.us links.

Observations

I’ve hacked together a script to post observations from email, this is a test of the feature.  

Tuesday, 2006-01-17


Links for 2006-01-17

  • XML::Atom::SimpleFeed - No-fuss generation of Atom syndication feeds — looks like a good option for some stuff at ork. Tags: atom perl syndication.

Grabbed from my del.icio.us links.

Monday, 2006-01-16


Links for 2006-01-16

  • Nick - nmea_info.py - a graphical view of a nmea bluetooth gps for s60 python Tags: gps mobile python series60.
  • Mark Jason Dominus is blogging // plasmasturm.org — MJD links. Tags: perl programming.

Grabbed from my del.icio.us links.

Sunday, 2006-01-15


Links for 2006-01-15

  • GPSDisplay — Output from Bluetooth-enabled on your Series 60 phone. Requires Series 60 Python. Tags: bluetooth gps mobile positioning python series60 software.

Grabbed from my del.icio.us links.

Friday, 2006-01-13


Links for 2006-01-13

  • Överklagan/Omprövning av trängselskatt/biltull | Trängselskatt utan transponder. — brevmall för överklagan av trängselskatten. Tags: congestion stockholm stockholmsförsöket trängselskatt.
  • TrueCrypt - Free Open-Source On-The-Fly Disk Encryption Software for Windows XP/2000 and Linux Tags: crypto linux security software tools windows.

Grabbed from my del.icio.us links.

Stockholm’s congestion charges

I had my first taste of the trial of congestion charges in Stockholm today.

The trip into town at 8:30 was really smooth. There was a queue of vehicles for the access tunnel to the free motorway from South to North, but the route to work was nearly empty. I kept a constant 70 kph all the way through Södertunneln, almost unheard of unless it’s a weekend.

The trip in cost 20 SEK, I paid 15 SEK on the way out (a bit earlier in the afternoon than peak time).

I like congestion charges on principle, as they put a price on a resource that’s scarce and makes the cost visible, but I can’t agree with the way the charges are implemented. As the roads are owned by the state, only the state can take care of the revenue — as a tax. Due to Sweden’s public disclosure of public records, each and every passage through a toll station is public record — tied to the vehicle’s license plate number.

This raises obvious privacy issues. As far as I’m concerned, these need to be addressed if the trial becomes permanent.

Thursday, 2006-01-12


Links for 2006-01-12

  • Hoopty Rides: Is the Complete New Yorker Spyware? — more info on the New Yorker DVD issue. Tags: backup magazine new-yorker sqlite.

Grabbed from my del.icio.us links.

The Complete New Yorker on your hard drive

Mr. Jalopy mentions that you can store the contents of the Complete New Yorker on your hard drive. (I got this link from BoingBoing.)

However, the mention is a bit sketchy.

What you have to do is update the table Issues in the SQLite database used by the application. A value of 9 in the field DiskID means hard drive. The rest of the IDs refer to the different disks.

I didn’t notice this, but the very first issue is on the hard drive, which gave anyone with some nous a clue about how this stuff works. If you look in the “Issues” folder of the intallation folder you’ll see a file called 1925_02_21.djvu. This is the first issue.

So you have to copy all the *.djvu files from the separate DVDs (located in the “Issues” folder there) to the “Issues” folder on the harddrive, then update the database.

Warning: I take no responsibility for any stuff that may happen to your installation if you follow these instructions. This said, I believe that if you mess up, you can reinstall the app.

You have to install a SQLite client. I use Cygwin and downloaded the source, compiled and installed. There are precompiled Windows binaries, that I suppose can be used from the Windows command prompt. Mr. Jalopy mentions a graphical application on the internet.

The file you use is ny-sqlite-3.db. Making a backup of this file is a good idea.

$ /usr/local/bin/sqlite3.exe ny-sqlite-3.db

There are two ways to approach this.

Brute force

Simply copy every single file from every DVD to your harddrive. This is a good approach if you have the space (around 50 GB). When you’ve done that, simply run

sqlite> update Issues set DiskID = 9 where DiskID <> 9;

Now all your issues are available from the harddrive.

Disk by Disk

If you don’t have the space, like me, maybe two or three disks will be enough. You’ll have to find which issues are on which disk and update the Issues table accordingly.

Here’s how to find which years have a specific DiskID:

sqlite> select  min(Year), max(Year), DiskID from Issues
        group by DiskID order by min(Year);

Below are the contents of my database.

  • Hard drive: 9
  • DVD 1 (1998—2024): 8
  • DVD 2 (1984—1997): 4
  • DVD 3 (1974—1983): 7
  • DVD 4 (1965—1973): 2
  • DVD 5 (1957—1964): 6
  • DVD 6 (1948—1956): 1
  • DVD 7 (1937—1947): 5
  • DVD 8 (1925—1936): 3

To move DVD 3 to the harddrive, copy all the files, then run

sqlite> update Issues set DiskID = 9 where DiskID = 7;

More SQLite tips

To see the contents of the database:

sqlite> .tables

To see the structure of a specific table:

sqlite> .schema <table>

Update 2006-01-13: I got a mention on BoingBoing. Also, Nick posted an update on how to do this on a Mac, including moving the files to another location! Wow, wish I had symlinks on this OS…

Update 2006-03-02: I got a mention on Securityfocus. The whole article is great, it really points out the absurdity of DRM:

If the goal is just to frustrate users, then why use DRM at all, since you must realize that un-DRM’d copies of your materials are going to circulate? And even if Joe can’t break the DRM, he’ll eventually figure out how to use a P2P network, or ask his nerd friend for help, and then you’ve got another unauthorized copy and an upset and now more knowledgeable former customer. What publisher wants that?

Thanks to all the commenters with their tips and tricks on getting this to work on various hardware and software platforms.

Observations

Crappy expensive Sony external DVD-burner can’t even read a normal DVD. Also, it’s grabbed the drive letter to a mapped drive. Sometimes I just fscking hate Windows.

Sometimes? Make that all the time…  

More MS fun, from Excel:

You are trying to open a file that contains more than 65,536 rows or 256 columns. To fix this problem, open the source file in a text editor such as Microsoft Word. Save the source file as several smaller files that conform to this row and column limit, and then open the smaller files in Excel.

(Emphasis mine.)

Hilarious.  

Wednesday, 2006-01-11


Links for 2006-01-11

  • // lisbonlab // v.2 » BloggerView #1: Rui Carmo — interview. Tags: blogger interview.
  • The Sharp Side: Irving Layton (1912-2006) Tags: canada literature obit.
  • Unsung Heros and Other iTunes Tips — smart playlist hack. Tags: itunes.
  • PTS - Sändarkarta — map of .se mobile masts — currently down due to high load. Tags: gsm mobile sweden technology umts.

Grabbed from my del.icio.us links.

Observations

Rui:

Wow, GarageBand got a Podcasting authoring studio. That’s, er… so 2024 of them. I had visions of Clippy popping up and saying “You appear to be recording a podcast! What kind of cheesy background music you want to pick?”

But no, you get a “speech enhancer” so that you won’t sound like a geek in a basement/attic somewhere. Or, if you prefer, to sound like a geek in a big, echoing cave.  

Tuesday, 2006-01-10


Links for 2006-01-10

  • Osprey | Peer-to-peer enabled content distribution — industrial-strength bittorrent. Tags: bittorrent p2p software.

Grabbed from my del.icio.us links.

Saturday, 2006-01-07


Observations

Engadget continues to pimp WiMax:

For our first time readers, WiMAX is a long-range wireless broadband standard that offers download speeds up to 300 Mbps, although the final specs have yet to be ratified. What this means for you, simply, is that the WiFi laptop you got for Christmas is already totally played out.

Yeah right. What about “the final specs have yet to be ratified”?

WiFi is here now, everywhere. WiMax is where? Korea?

(The above is not meant to be disparaging to Korea or Koreans.)  

Isobel:

Bakom en sådan hälsofascism och brist på respekt för det mänskliga behovet av egna traditioner anar man hisnande ångestdjup.  

Links for 2006-01-07

  • BrainDeath by Micromanagement: The Zombie Function — I am not now, nor is it likely that I will ever be, a manager. But if I do become one, let’s hope I won’t micromanage. Tags: collaboration leadership management theory work.
  • Quotes about Computer Languages — “First learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack.” — George Carrette. Tags: computer geek humour languages programming quotes.

Grabbed from my del.icio.us links.

Harry Potter and the Order of the Phoenix, by J.K. Rowling

This is the first audiobook I’ve listened to, and was a really good one. Stephen Fry’s narration is brilliant, lending colour and excitement to a very long, episodic book. What the scriptwriters of the film adaptation will do to ensure that the film isn’t over four hours long, I don’t know.

Friday, 2006-01-06


Links for 2006-01-06

  • Russell Beattie Notebook » Ready, Set, Go! — Y! on the go, Pity I’m living in Googlespace now. Tags: instant-messaging mail mobile webservices yahoo.
  • Unicode-processing issues in Perl and how to cope with it (ahinea.com) — basic stuff you need to know. Tags: encoding howto perl unicode.
  • parent hacks — everything can be hacked, even small kids. Tags: daily kids lifehacks parenting.
  • Rants and Revelations » Quiet is nice — noise cancellation headphone purchase. Tags: audio headphones noise-cancellation.
  • MobileTech: The Nokia 770 — Tarek’s review of the 770. This is a gadget I’d like to have. Tags: mobile nokia nokia-770 review web-tablet.

Grabbed from my del.icio.us links.

Thursday, 2006-01-05


Links for 2006-01-05

  • Mike Rowehl » Blog Archive » Using a Video iPod Under Linux Tags: linux software.

Grabbed from my del.icio.us links.

Wednesday, 2006-01-04


Links for 2006-01-04

  • Wired 13.10: The Decline & Fall of Randolph Hobson Guthrie III Tags: copyright movies people read-later.
  • Too Much Coffee Man — online comic. Tags: comics daily humour webcomics.

Grabbed from my del.icio.us links.

Torg Potter

One of the online comics I regularly read is Sluggy Freelance, an involved amalgam of nerd humour, ghouls, vampires and demons from the Dimension of Pain.

Seeing that I’m on a Harry Potter jag ATM, I thought I’d point to the three parodies of HP in Sluggy: Torg Potter and the Sorceror’s Nuts, Torg Potter and the Chamberpot of Secretions, and Torg Potter and the President from Arkansas.

Although I think the Chamberpot is best, being creepy as well as funny, this Sunday strip from Sorceror’s captures the essence of Sluggy for me.

Blogging hiccup

I encountered a weird configuration change in the remote server I’m using, which meant I could list directories with tramp but I could not open and edit files. This put a cramp in my writing style.

After enabling debugging I found that the default method I was using (“scp”) wasn’t working anymore. Changing it to (“ssh”) fixed the problem. This post is mostly an excuse to test this.

Update: yay, it works!

Observations

Giving the Sozialgericht Bremen something more to worry about. Via Techdirt.  

Monday, 2006-01-02


Links for 2006-01-02

  • Batch-changing PDF files to open in Preview on Mac OS X 10.4 — nice hack. Tags: mac pdf scripting spotlight.
  • The Infinite Matrix — last issue. Tags: books magazine reading sf web.
  • Tullkoll | Gorling.se — enkelt sätt att hålla reda på trängselskatten. Tags: congestion reminder service stockholm sweden swedish-culture traffic web.

Grabbed from my del.icio.us links.

More on the Complete New Yorker

I’ve approached the Complete New Yorker with some trepidation. How do you make a dent in 50 gigabytes of scanned material?

Then I remember John McPhee, one of my favourite non-fiction authors. His style is unique, really good. I’ve read Looking for a Ship and Basin and Range and would really like to read The Curve of Binding Energy (if only for the beautiful title.)

McPhee writes for the New Yorker, and sure enough, a search for his name yielded hundreds of articles. I’ll be reading them in spare moments in the weeks to come.

Sunday, 2006-01-01


New Year’s resolutions for 2006

  • Be a better husband and father
  • Improve my career prospects
  • Finish kitchen, garden and windows

Observations

William Gibson:

[…] I have my poetic license right here, laminated, in my wallet.  

Caption on a pic for an article illustrating the dangers of prolonged listening to portable audio players:

Med ständig musik i öronen hör Siri Hjorton Wagner, 20, inte mycket av trafiken. I stället litar hon på sin skarpa blick. Det ständiga musiklyssnadet har gett henne tinnitus på ena örat. - Det är det värt, säger hon.

Source, Expressen, 2006-01-01.  

Ned:

You want a good software engineering education? The final project should be to take some other kids’ project from last year and adapt it to do something he didn’t even consider. Then the result gets passed on to another kid next year. That would be an education!

Exactly.  

Dave Walker:

10 There will be several dozen new OPML applications. None will interoperate in any meaningful fashion, and the developers will be forced to wear a scarlet “F” (for funky) on their shirts.