2005-12-31

Icons, feedicons, and favicons

A long time ago, when I first started dabbling with Windows programming (Windows version 2, for the new 286 machines!), I first learned about the .ICO file. These files provided the icons that represented your programs. Of course, the interesting thing about the file format was that it wasn't a single graphic, like a .GIF or .BMP file, but a container for one or more graphics.

Fast-forward to today. Every time you visit a website, using a reasonably modern browser like IE6 or Firefox, a little 16x16-pixel icon shows up next to the URL for the site, and that same icon often ends up in other places, like your bookmarks. This is generally known as a favicon, because it was originally introduced by Microsoft around the same time they decided that bookmarks should really be called favorites, much to the dismay of spelling teachers in the UK. Anyway, it turns out that the file needed on a website to make this particular magic happen is, as my foreshadowing may have indicated, a .ICO file.

Now, as the web progresses and morphs, one of the most important concepts to come along is that of the feed. Rather than surf to a bunch of different news sites, blogs, and boobie galleries web comics to see if there's anything new to peruse, sites provide feeds — basically, a place on the website that a computer program can look to see what's new. Then, such a program, called an aggregator, can provide a central place to see today's web at a glance. Aggregators can be installed programs or web-based. I use a web-based one called Bloglines.

You may think I'm rambling a bit, but the topic is still icons. You see, the Firefox browser understood that feeds were important, and provided a special icon to show whether a web site had a feed available. By default, when clicked, it would create something called a "Live Bookmark", but you can install a Firefox extension (and I have) which will add the feed to Bloglines for me when I click. This icon is known as a feedicon. Now, Microsoft has a new version of IE coming down the pike, and they've gotten the feed religion as well. In an unprecedented show of good sense, Microsoft has decided to use the same icon as Firefox.

To capitalize on this lining up of the planets, a website has been established to crown this icon as the standard identifier of feeds: feedicons.com. Now, I thought this was a good idea, and wanted to use the standard icon over on my left sidebar here in Blogger land. So, I wondered. Will the HTML IMG tag work with a .ICO file? If so, all I have to do is reference the favicon of feedicons.com!

Well, I've done so, and it works with Firefox 1.5, at least. Please let me know if you see the little icon next to the "XML (Atom)" over on the left.

Tags: , , ,

2005-12-29

Bush law-flouting makes techies speak out

There's a website called memorandum.com, that keeps track of what topics bloggers are writing about. They keep it segregated into two sections: Politics and Tech. Watching this site recently, an interesting phenomenon emerged. The general topic of President Bush's secret authorization of domestic spying without warrants was fairly active on the Politics side, but absolutely exploded on the Tech side! I think I can understand why, too. My personal blog here would usually be considered a tech blog. I'm a geek and I write about the geeky things I like to do. But even I posted about Bush and the NSA.

Maybe it's the cryptography background. I was a crypto programmer for a few years, and maybe that makes me pay just a bit more attention to what the NSA is up to. Another associate of mine from those days is the always-good-for-a-security-soundbite Bruce Schneier. Bruce has weighed in on the issue as well, giving some important historical perspective in his blog post Schneier on Security: Project Shamrock.

Maybe I'll start writing other people's Congressmen. I dunno -- we gotta do somthing here.

Tags: , , ,

2005-12-19

A letter to my Congressman

Perry Metzger, a bright man whom I recall from my days years ago as a crypto engineer, wrote the following editorial piece on the Cryptography Mailing List: A Small Editorial About Recent Events. In case you don't follow links, it's about President Bush's unapologetic admission that he has been authorizing domestic surveillance without court orders for years, and that he intends to keep doing so. This outraged me when I first read about it, but the news often outrages me and I do nothing about it. Perry's editorial struck a nerve. He's right, we all should be doing something about this one.

So, I wrote my first-ever letter to my long-time Congressman, Bill Pascrell. It went like this;

Congressman Pascrell,

You've been my Congressman for an awfully long time, and I've always
admired the job you do, and have never felt the need to write to you
before.  Today, I feel I must, even though I expect you are already
feel as I do.

I'm contacting you in regards to President Bush's recent admission
of surveillance of U.S. citizens without benefit of warrants or court
orders.  This is clearly a violation of the law (U.S. Code 50 USC 1801
- 50 USC 1811), and the President must be held accountable.  Please do
whatever you can.  The rule of law is the most important precept in our
republic, and no one can be allowed to ignore it, no matter how noble
the reason.

Thanks for your attention.

Jim Russell
Nutley NJ

I'll be following up with letters to Senator Lautenberg and Senator-in-Waiting Menendez. I realize that having a Democratic Congressman and two Democratic senators make my letters a bit like preaching to the choir, but I want to make sure they understand the level of anger and fear that the President's actions have instilled. There were plenty of legal methods to accomplish what he wanted. No one, especially the President, should be able to ignore the law.

Tags: , , ,

2005-12-18

Google's Blogger Web Comments: Legal bugs, coding bugs?

In the posting Getting to Know You, Tristan Lewis speculates on Google's motives for providing their new Firefox extension, Blogger Web Comments. The analysis makes a lot of sense, and is probably close to the mark. I'm glad someone is reading the License Agreements for me.

I had already installed the extension before reading the post, and probably would have taken the risk of keeping it installed for a while. However, I've recently been having runaway memory problems with Firefox on my Debian GNU/Linux system. At first, I had attributed it to upgrading to the latest "firefox" package in the Debian Unstable repository. Then, it struck me that it was quite possible that Google's extension was to blame. The timeframe seemed right — the swapfile thrashing and glacial response in Firefox has only been happening for the last few days.

So, I've uninstalled the extension. So far (a couple of hours), no more runaway memory problems. I tend to believe that the Google extension was the culprit. If the memory problems come back, I'll update the post and try to lay the blame elsewhere.

UPDATE: The Google extension has been exonerated. Firefox caused another memory-eating episode today, with the extension removed. In the meantime, Debian Unstable has moved their "firefox" package from the repeating-decimal version 1.4999... to version 1.5. I've updated, and now I wait to see if anything has been fixed. You know what would be nice? If Debian's package-management system would show some sort of changelog.

Tags: , , ,

2005-11-28

The Town Play

You'll notice that one of the entries in my wiseacre tagline is amateur actor. I actually considered acting as a profession long ago, but it turns out that doing it for the love of the theatre, while hacking computers to pay the mortgage, has worked out just fine for me.

Northern New Jersey is the perfect place for amateur actors, since you can't swing a dead cat without hitting a community theatre. I've done some CT shows, but the bulk of my post-college acting career has been with The Celtic Theatre Company, not coincidentally in residence at my alma mater, Seton Hall.

But, as Arlo Guthrie said, that's not what I came to tell you about.

There's a wonderful tradition here in the town of Nutley, one of the little things that makes the town a somewhat anachronistic throwback in this collection of little cities orbiting the Big Apple. We have a town play. Once a year, the town's Department of Parks and Recreation produces a full-scale musical, with all actors being Nutley residents. I mean, how Mayberry can you get? But it's great. I've gotten the opportunity to share the stage with my children, and share my love of acting with my neighbors. Plus, I never did the old-school musicals when I was young, so things like Annie Get Your Gun are new experiences for me.

So, the town play's come around again this year, and it's Oliver! (Yes, the exclamation point is part of the title.) And I'm playing Fagin. Seeing as how this is a personal blog, I'm going to occasionally toss in a post on how things are going.

2005-11-14

Lesson learned from Sony CD infection

As the blogs go wild posting the latest tidbit about Sony BMG CDs (the story has even made The New York Times), I suggest we stop and reflect for a bit.

By placing active Windows programs on what was supposed to be an audio CD, Sony BMG in effect launched an attack on your system -- if you run Windows, that is. In most cases, the attack is successful. But why? What defensive measure let you down here?

One of the biggest annoyances with Windows is the Autorun feature. This is the feature where the operating system detects insertion of a CD and then decides for you what to do about it. Luckily, the real geeks at Microsoft, the ones who actually write the Windows code, knew that this feature should be optional. Even more luckily, the folks who produce the O'Reilly book series Annoyances have a website that tells you how to turn off Autorun. Do it. Turn it off.

Tags: , , , , , ,

2005-11-13

Brilliant post at the Republic of Geektronica

One of my favorite blogs is The Republic of Geektronica. The latest post is a great example of why this is so.

Go read it.

No more Sony CDs for me

I buy a lot of music. I've posted a few photos of a small part of my collection of CDs here. I'll note that in both photos, the CDs are two rows deep. This is in addition to over 1000 vinyl records, cassettes, and music DVDs. The point here is that the recording industry should be considering me as one of their best customers.

With that in mind, I'm making a pledge right now to never buy another CD from Sony BMG, or any future version of that corporation. This is tough, because Sony BMG owns the back catalog of a lot of my favorite artists -- Bruce Springsteen, Simon and Garfunkel, Bob Dylan. But I've decided that I now have had enough of their corporate contempt, and can find other places to satisfy my musical cravings.

If you haven't been following the tech news, you can catch up on it starting with this engadget.com entry. Short version: some Sony CDs automatically install software on computers when inserted in the CD-ROM drive; nasty, sneaky software that is as bad as any virus or spyware. Well, I don't need their product anymore. I'll be getting any new music from archive.org, where it's perfectly legal to download, copy to my hard disk, burn onto a CD, etc. And for the old favorites, why, I'm buying a new turntable.

UPDATE: Another link, this time pointing out that Sony's licensing of these not-really-CDs-anymore is quite alarming.

UPDATE: Wired columnist Dan Goodin goes even further, proposing a boycott of Sony. Sounds like a plan, because Sony is so far treating this as a PR gaffe, and still acts as though they did nothing wrong.

Tags: , , ,

2005-11-03

Head Lemur's got copyright right

I just read a terrific opinion piece on copyright, that perfectly sums up my feelings on the topic. Rather than restate what's already been said so well, I'll just suggest that you click here and read the Head Lemur's post.

Usually, I hate blog entries that just point to other blog entries, but this deserves a wide audience.

Tags:

NetFlix class action? OPT OUT!

Did you ever get one of those "official" letters saying that you may be entitled to something because of a class-action lawsuit? I hope by now it is starting to become common knowledge that this is the biggest con game going. If you don't believe me, check out the latest one, a suit against NetFlix. Pay particular attention to what you would get, what the initiator gets, and most importantly, what the lawyers get.

There's only one way for you and me to fight this lunacy. OPT OUT! Don't take the crappy little token they offer -- the five bucks or one month free or whatever. Take the time to send in the form that says to these bottom-feeders that they do not represent you or your interests. 'Cause they don't.

Tags: , ,

2005-10-27

Slashdotting the Speaker

I've been an avid reader of Slashdot for years, but only occasionally submit a story to them. It does, however, always give me a 15-seconds-of-fame feeling when they pick my submission. That happened today, when I submitted an item about Denny Hastert, the Speaker of the House, starting his own blog. The story got picked up, and the comments started flying. Now, by Slashdot standards, this was small potatoes -- I've seen stories that generated thousands of comments. What didn't occur to me until I started reading the comments, though, was that I had just unleashed the Slashdot Effect on the unsuspecting Congressman.

Ah, well, it will be an good learning experience for him. I hope the server holds up okay.

As a follow-up to the prior post, I've been flipping back and forth between Flock and Firefox for a while. Flock has some nice features, but I lose Flash and GreaseMonkey when I'm in it. Also, I tried to post this entry with their built-in blogging, and it gave me a very Microsoft-like error message -- in other words, one that doesn't actually tell you what went wrong. Note to the Flock developers: More error information is better than less. Especially for a "Developer Preview".

Tags: ,

2005-10-20

Testing the Flock browser

I got an email today inviting me to test the "Developer Preview" of Flock, a new Mozilla-based web browser. The interesting thing about it is that it is designed to integrate with social bookmarking sites, blog sites, and other collaborative uses of the web. In fact, I'm writing this blog entry inside Flock's blog editor, as one of my initial tests. If you're reading this, the test worked.

If this is a new paragraph, it's worked even better.

I think I'll try running this in lieu of Firefox for a while, and see what my comfort level is. So far, for a pre-beta, it looks very, very promising.


2005-10-13

Live365 radio from the command line

One of my passions is the music of Harry Nilsson. Luckily for me, one of the perks of the Internet Age is that finding others that share your passions is pretty easy. For Nilsson fans around the world, the website and mailing list run by Roger Smith has been the medium for that sharing. (Click on Harry's name above to see Roger's site.)

One of the longtime members of the NilssonWeb is Tom Westendorf, or "Old Tom" as he calls himself. Recently, Old Tom started a radio station on Live365.com, heavily featuring our Harry in the playlist. Naturally, I wanted to hear it. I couldn't, however, stand the idea of having to run a graphical client or a web browser in order to listen. I run Linux, after all, so I'm no stranger to the command line. Not to mention that we're talking about audio streaming here. There's no pictures, folks, so why should a GRAPHICAL User Interface be required?

This leads me to this episode's Scripting Pet Trick, which requires only two appications installed on your box: curl, an incredibly useful URL retriever, and mplayer, the best media player ever.

The trick here is to tell curl to remember the cookies it gets when browsing Live365, using the Unix 'cut' utility to pull information out of the cookie jar, and feeding that information into the URL for mplayer.

Other things to note: you have to register (free) with Live365.com, and get your userid and password, and fill them in at the top of the script. Obviously, this is not a secure way of handling things. I should probably have the script ask me the password every time. Also, you'll see that I had to yank the userid out of the session cookie value before passing it to mplayer. I'm also hard-coded to Tom's station here. You may want to browse Live365 for some other choices.

The script:

#! /bin/sh

USERID=useridgoeshere
PASSWD=passwordgoeshere

curl --cookie-jar curlcookies   --output curldump --location-trusted "http://www.live365.com/cgi-bin/login.cgi?url=http://www.live365.com/index.live&membername=${USERID}&password=${PASSWD}"

SANE=`grep SaneID curlcookies | cut -f7`
SESS=`grep sessionid curlcookies | cut -f7 | sed s/${USERID}%3A//`

# Westendorf radio
STATION=326329

mplayer "http://www.live365.com/play/${STATION}?SaneID=${SANE}&membername=${USERID}&session=${SESS}"

Happy streaming! (Oh, and Tom? Nice playlist...)

Tags: , , , , , , ,

2005-09-28

Hacking the playlist II

In a previous post, I was extolling the virtues of the moosic audio server, and mentioned that I wanted to create a nice on-screen display showing what's currently playing. As it turns out, it's much easier than I hoped, thanks to two useful Perl modules: Audio::Moosic and X::Osd.

So, without further ado, here's the Perl script. I call it moosic_osd.pl, but you can call it whatever you like.

#! /usr/bin/perl -w

use Audio::File;
use Audio::Moosic;
use X::Osd;

my $osd = X::Osd->new(3); # arg means 3 lines

$osd->set_font("-adobe-helvetica-medium-r-normal-*-*-100-*-*-p-*-iso8859-1");
$osd->set_colour("Red");
$osd->set_timeout(30);
$osd->set_pos(XOSD_bottom);
$osd->set_align(XOSD_right);
$osd->set_horizontal_offset(0);
$osd->set_vertical_offset(10);
$osd->set_shadow_offset(1);

my $moo = Audio::Moosic::Unix->new();

while (1)
{
    my $fspec = $moo->current;

    if (! $fspec)
    {
        $artist = "John Lennon";
        $title = "Two minutes silence";
        $album = "";
    }
    else
    {
        my $af = Audio::File->new($fspec);
        $artist = $af->tag->artist() || "";
        $title = $af->tag->title() || "";
        $album = $af->tag->album() || "";
    }
    $osd->string(0, $title);
    $osd->string(1, $artist);
    $osd->string(2, $album);

    sleep(1);
}

So, copy and paste that somewhere, and run it as a background job:

perl ./moosic_osd.pl &

...and you'll get a nice little on-screen display.

Tags: , , , ,

2005-09-23

GP2X will be Dad's toy

My son gets all the good stuff. The Rio Karma, the PS2, the GameCube. Every time some cool gadget comes along, someone in the friends-and-relations gift mill buys it for my son. Hell, sometimes it's me, as in the case of the Karma. That, of course, was part of my open-standards education program for him, since the Karma had support for Ogg Vorbis format audio files. So, I don't begrudge him his teenager toys.

I do get jealous, though.

The one that hurt the most was the Playstation Portable (PSP). My wife happened to be at Target the day the PSP was released, and happened to ask the electronics clerk about it, and he happened to have one that hadn't already been claimed. So we had one in the house on the day of release. I wasn't allowed to claim it for myself, because my wife already had it on my son's gifting schedule.

It's just as well, because it's my turn now. The GP2X is coming out in October, and I've already pre-ordered. I'm a long-time Linux hacker, and now a portable game machine with a Linux kernel and bundled SDK comes along. At the risk of employing an overused geek codeword, w00t!

And yes, I know about the DRM, as reported on BoingBoing. The UK folks have posted a reasonable explanation, and I'm going to take them at their word.

So, it should be here sometime next month, at which time I'll report on it. And, in case I didn't make this clear: This one is mine, son.

UPDATE: Officially, it's called the GP2X, not the GPX2, so I fixed that.

Tags:

2005-09-15

If I'm not here, it's Wikipedia's fault.

It's fairly obvious that blogging has not become an obsession with me. Let's see... I haven't checked in since March. For me, that's not bad.

A lot of my online time these days is spent contributing to Wikipedia. For those people who haven't encountered this yet, it's an encyclopedia inside a wiki, with no edit restrictions. In other words, anyone on the net can edit any page, either credited or anonymous. Short-term accuracy is always questionable, but most pages end up with concerned nannies watching for every edit and pouncing on incorrect information and vandalism.

All the regulars in this wiki, who have dubbed themselves Wikipedians, tend to gravitate into interest groups. I've ended up concentrating on musical theatre, certain favorite rock and roll performers, and chess. My two major contributions were articles on Harry Nilsson and Jack Gilford.

I encourage everyone to stop by the Wikipedia, and can guarantee that if you surf there for more than five minutes, you will end up editing something.

Tags:

2005-03-18

Hacking the playlist

Now playing: Bruce Springsteen / Lost in the flood

I've amassed a, well, massive amount of recorded music over the years. Lately, I've been methodically encoding it all to computer-readable formats, so that I now have a 20 gigabyte disk partition full of .mp3 and .ogg files. I've got no time to assemble playlists. What I want is to have a program to which I can say, "Go look in /media/music, and shuffle the lot."

Now playing: The Beatles / Mr. Moonlight (alt version from Anthology 1)

For the past year or so, I've been using the open source program gqmpeg for this purpose. There were two minor annoyances I found with this setup. First, it took forever to load up that 20 gig into its playlist. Second, I was tied to my X Windows session, because the player is tied to its GUI frontend. I wanted the player to manage the playlist invisibly. If I want to see what's going on, I'll ask the playlist manager.

Now playing: Original cast of 'Take Me Along' / We're home

So, I went on a search for a new playlist manager, and found moosic. Now, this does exactly what I want. It separates the playlist manager functionality from the user interface, and its default user interface is command-line! Outstanding.

Now playing: Leon Redbone / She's my gal

Naturally, I couldn't leave well enough alone. The one weakness I saw with moosic is when I asked it what the currently playing song was, it would reply with the full filename. Well, I add nice Artist, Title and Album tags to my .oggs, so I want to see them. So, it's time for a Perl Hack.

#! /usr/bin/env perl -w

use Audio::File;
use Audio::Moosic;

my $moo = Audio::Moosic::Unix->new();

my $fspec = $moo->current;
my $af = Audio::File->new($fspec);

my $artist = $af->tag->artist() || "";
my $title = $af->tag->title() || "";
my $album = $af->tag->album() || "";

print "$artist\n$title\n$album\n";

Now, of course, if you want constant display, a nice shell script will take care of that.

#! /bin/sh

onscreen=
while true
do
 playing=`perl ./main.pl`
 if [ ! "$playing" = "$onscreen" ]
 then
     clear
     perl ./main.pl
     onscreen=$playing
 fi
 sleep 10
done

By the way, the reason I separated this into the perl and shell portions (other than the fact that this is the Unix Way) is that eventually I'm going to pipe the output of the perl script into osd_cat, which does overlaid text.

Now playing: Clannad / Dheanainn sugradh

Eventually, this is going to lead to my extremely local radio station (only within the walls of the house), but that can wait until next post.

Tags: , , ,

2005-03-16

The DVD shelf

It's almost spring here in New Jersey, which means it's finally time for me to review my Christmas present, the DVD collection of the first five Marx Brothers movies. Hmm. How can I put this kindly? You know, I can't, so let me just jump right in. These movies are in horrible condition, and it looks like Universal made absolutely no effort at restoring them. The movies themselves are just as funny as I remember them, but it's really a shame that they've been released with such a shoddy transfer.

Much more satisfying is Warner Brothers' work on the Looney Tunes releases. The two "Golden Collection" DVD sets that have been released so far feature magnificent restorations of the classic animation shorts, great commentaries, and lots of extras. I highly recommend these.