links for 2008-01-10



links for 2008-01-09



links for 2008-01-08



That Was Quick


This morning while reading an article about someones set up, I stumbled across a Safari plug-in called “Inquisitor.” It purports to be an enhancement to the built-in search field in the Safari window. I was intrigued enough that I downloaded and installed the plug-in within minutes.

My joy at new software was short-lived, however. In my lunchtime browse of my feeds I discovered a couple threads talking about some suspicious behaviour when searching through the Inquisitor plug-in. The first results are artificially boosted to that place, and when an Amazon result is possible as the result, the program’s author masks the fact that his affiliate ID is embedded in the URL. Using affiliate links is nothing new, and I have no issue with that.

But doing it without my knowledge, and further, sending some kind of packet to your server without my direct knowledge, adds up to a queasy feeling. I will be following these instructions to remove the plug-in from my machine immediately. And, unfortunately, I’ll be just a tad more jaded when it comes to new software.

Inquisitor Removal Instructions: Move these files to the trash:


links for 2008-01-07



links for 2008-01-06



msconfig


Recently I read about speeding up boot times on Windows PC’s. The gist of the article was that there are two sources of contention for your processor, startup items and anti-virus/spyware software.

Startup Items

Most Windows-based computers sold today come with a plethora of pre-installed software, much of which is already configured and ready to use. And we, as happy owners of a new computer, add our own software favorites soon after. Any of these programs may offer to “start automatically” when you log in or sign in to your computer. Every time you agree to this option you add to the CPU load when your computer boots, and you increase the amount of time a boot will take.

Unless you absolutely need a piece of software running the instant your machine boots, there is no reason to have it start automatically at boot time. Following the direction in the Coding Horror article mentioned above, you can use the configuration utility “msconfig” to disable as many or all startup items as you want.

On my 1.87 Ghz ThinkPad Z60m I disabled all startup items, reducing my reboot time from 8 minutes and 19 seconds to 3 minutes and 40 seconds. A savings of 4 minutes and 39 seconds or 55% faster boot time.

Fifty-five percent faster.

Anti-Virus

In order for anti-virus software to be effective, it must be running all the time. It must be aware of all the processes on your computer and interact with them at a very low level in the operating system stack. While this provides the protection we all want and need, it can reduce the speed of your computer dramatically. The Choosing Anti-Anti-virus software article suggests that we can avoid the necessity of anti-virus software at all if only we run as a non-administrator on our XP or Vista systems. By default your user account as administrator rights to your computer. This means any process your start (or that you appear to start) can do pretty much what ever it wants in terms of altering the system. By running as a normal user we would effectively prevent malware from doing harm to our computers. Of course, we would have to log in as the admin account in order to make changes to our system or install some programs.

Personally I haven’t taken this step yet. I am intrigued by the idea of not having to run anti-virus software on my machine 100% of the time. Perhaps after the next full backup of my computer I’ll setup a new user account and try life without a net.


Redirecting Moveable Type Entires to Wordpress


One of the potential drawbacks to switching content management systems for my website was losing the permanent link to specific postings. I receive a fair amount of traffic due to some Google searches, and I have posted comments on a couple of sites that generate a few links per week. I didn’t want to lose this traffic simply because the link had changed names.

In my case there were three issues I needed to address:

If you search the Wordpress Codex you’ll find an article about importing Moveable Type entries to Wordpress, which contains a section on Preserving Permanent links. Using the template suggested in the article, I created a new Moveable Type template that output a line for each Moveable Type entry, like this:

<?php 
require('wp-config.php');
header('Content-type: text/plain');
?>;
<MTEntries lastn="999999">
Redirect Permanent /archives/<$MTEntryID$>.html https://zanshin.net/blogs/<$MTArchiveDate format="%Y/%m/%d"$>/
<?php echo sanitize_title("<$MTEntryTitle$>"); ?>
</MTEntries>
When I rebuilt the site, causing this template to be run, the resulting file had a line for each Moveable Type entry that looked something like this:
Redirect Permanent /blogs/######.html https://zanshin.net/yyyy/mm/dd/  <?php echo sanitize_title("Title"); ?>
If I had been just switching to Wordpress on the same host, I could have inserted this file in to my Wordpress directory and everything would have worked. However, without the Moveable Type installation on the new server, I would have to do more.

What I needed was a pure .htaccess file to permanently redirect visitors to old URL to the new URL. In order to do that I needed to strip out the php references and manually sanitize the titles. You see the URL scheme I had chosen for Wordpress uses a sanitized version of the posting title in the URL. Quotes, dollar signs, exclamation points, parenthesises, et cetera, aren’t allowed in these sanitized titles.

Making a backup of the redirect.php file the template code above had produced, I set out to accomplish this by hand. (NB: I did try, through the help of a friend to use awk and regular expressions to automate the title sanitazation. While this was largely successful, I ultimately ended up using a file I had converted in TextMate using a series of find and replace commands.)

The resulting file had 1330 lines that looked like this (and, yes, had I been quicker thinking I could have come much closer to this format with the template described above):

Redirect 301 /blogs/######.html https://zanshin.net/yyyy/mm/dd/title/

Points of interest in this format:

Upon loading this file to the root of my site on the new server I promptly got an internal server error (500), meaning that the .htaccess file had a mistake (or two or three). I am not ashamed to admit that I used a brute-force method for finding the errors: I commented all 1330 lines out, and then in blocks of 100 lines each un-commented them and reloaded the site. When it again threw the internal server error between lines 600 and 700, I knew where the problem was located. Two lines had problems. One was missing a “-” for a space, and the other was missing the closing “/” at the end of the URL.

Hopefully now people coming to my site via old links, be they from a search engine, an embedded link on another site, or a bookmark, they will be redirected to the new location of the page.


links for 2008-01-04



Up Trend


My site lives on the long tail of the Internet. The long tail, in this case, is a reference to a power curve. Unlike a Bell curve, a power curve is what happens when a very few things have most of what is being charted, while a great many things have very little of what is being charted.

Web sites on the Internet are a prime example of a power curve. There are a few sites that garner most of the visits, and millions of sites that get little or no traffic. For the most part I am OK with zanshin.net languishing on the thin end of the power curve. The site exists primarily for my enjoyment. Still, I am not above tracking my visitors and wondering what causes a surge in my daily count.

It would seem, on the surface, that switching to Wordpress has gently nudged my site one infinitesimal notch towards the meaty end of the curve. Most days I see 10 to 15 browser views of my site. The last two days, the first two days of my back-end being Wordpress, have seen 26 and 22 (so far) visits. Hmm. Only another 39,978 per day and the site will support me financially.