meta-blog

This post courtesy of Quicksilver

I tried to install 10.3.6 yesterday and for a reason or another, my laptop kernel panic’ed on me during the install. I had to reboot and wasn’t too hopeful that it would even work. Much to my surprise though, I was able to login without issue. Only noticeable problem though, no Finder, no menu bar, just floating icons at the top right of the screen and my empty Dock at the bottom right (I only use the Dock for the trash and to monitor running applications). Since I had Quicksilver installed though (and its icon was showing among the other icon where the menu bar would normally be), I was able to launch Terminal and other apps. I have been able to work with my system without any other issue so far.

It goes without saying that I will re-install. However, without Quicksilver, I wouldn’t have been able to use my laptop in the mean time. It even allowed me to try and re-install from the full updater instead of Software Update (both from the GUI and command line since Installer would get stuck after showing the license). Though it didn’t work, at least, I could try! Thanks, Quicksilver! :)

It’s been a while…

I haven’t posted here in a while for diverse reasons. Part personal, part work-related… In any case, I’m going to try and catch up with what’s on my backlog of things to post about!

Genocide from the album Smash by The Offspring

Pardon our dust…

I’m trying to tweak a plugin that I installed and that is not working correctly so funky things might appear and all hell might break loose for a while. Sorry about that but it’s easier this way…

It seems to be settled now. Enjoy! :)

Commodore Rock from the album 604 by Ladytron

Weblog editors and crashing

inessential.com

One of the benefits of using a desktop weblog editor is crash protection.

Say you’re writing a post in your browser, and your browser crashes. The post is gone.

Say you’re writing in MarsEdit instead. You can save as a draft periodically so you can prevent a crash from losing your post.

But—even more—MarsEdit automatically recovers your post in the event of a crash, even if you didn’t save it as a draft. When you re-launch MarsEdit it will re-open the post or posts you were working on.

I concur: MarsEdit has saved my posts a couple of times already. It’s not only a matter of MarsEdit crashing: if my mac crashes for some reason while I am working on a post (or have a post waiting to be posted in the background), MarsEdit saves the day. Brent has done a very good job with it.

Now the big question: why isn’t there more text-processing applications implementing auto-save?

Giving You Up from the album by Kylie Minogue

Zeitgeist – September 2004

I have installed StatTraq in August. For those who don’t know, Stattraq is a WordPress plugin which allows you to track statistics (hence the name) about who visited your weblog and how they got there. I find it interesting (though relatively vain) to look at the stats. I decided to present a little Metacosm zeitgeist in the spirit of Google’s. If I remember to do it, it’ll be a monthly occurrence.

For September 2004, most visitors arrived to the website through Google (not a huge surprise). The most popular query was “missile balloons” and its variant totalling 131 referrals. Rather surprising considering that my post on this was just a reblog from Engadget. I guess it speaks volume about the power of this particular meme. People also found this weblog while searching for stylesheets for Movable Type and WordPress (38 referrals total from stylesheet-related queries). Quicksilver (30 referrals) was also popular thanks (mostly) to my posting of screenshots, screenshots that I should probably update to a more recent Quicksilver version. The next query that resulted in visits to this weblog was “laughing man fansubs” (and its variant) with (27 referrals). Laughing Man Fansubs is the only fansubbing group subbing the Ghost in the Shell: Stand Along Complex 2 anime series that I’m aware of.

People also found this weblog via other weblogs most notably Tales from the Red Shed, Jonathan “Wolf” Rentzsch having linked to my knowledge management article (which still awaits a part 2 <sigh>)… My posting of a trackback on Dan Dickinson’s article on Quicksilver resulted in some hits too.

Browser-wise, the distribution was 901 hits from Mozilla browsers (including FireFox) and 649 hits from Safari users (that includes me most of the time :) ) while Internet Explorer variants only resulted in 426 hits and Netscape variants in 359 hits.

Looking at that data is weirdly fascinating but really time-consuming. Stattraq is not helping too much here because it doesn’t record the article id properly when it records hits. I am tempted to spend some time developing a bunch of zeitgeist functions so that I can make this analysis faster.

This Fire from the album Franz Ferdinand by Franz Ferdinand

Making Stattraq work better with permalinks.

I am using Stattraq to keep track of the traffic on this weblog. I installed it back in August and recently installed the ViewCount plugin. However, much to my disappointment, Stattraq doesn’t play that nice if you use permalinks. The problem lies with the fact that Stattraq in its current version does not properly put the article id in its database if permalinks are enabled: it will use the id 0. Of course, ViewCount relies on the article id to work its magic hence the problem…

To solve this issue, I decided to improve how Stattraq was handling the article id and you can too! It’s fairly easy: open stattraq.php (it’s found in the wp-content/plugins directory of your WordPress root directory) in a text editor. Find the line that reads:

  1. $article_id = 0; // default/mixed page – not just for one article

and replace it by the following:

  1. //$article_id = 0; // default/mixed page – not just for one article
  2. if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])){
  3. $article_id = $wpdb->get_var(“SELECT ID FROM $tableposts WHERE 1=1″.$where);
  4. } else {
  5. $article_id = 0;
  6. }

The trick here is to use the url parsing magic found in wp-blog-header.php. That’s where the $where variable gets built. We then use it to retrieve the post id. The check on the server query is required because the index page needs to be processed differently. If the requested page is the index page, the query returns all the posts and get_var returns the id of the first record returned (which is your weblog’s first entry) which is not what we want.

Well, apparently this does not work though I am at a loss right now to figure out why. The code above, executed in the context of index.php, seems to return what I want. However, when executed in stattraq.php, it doesn’t work, resulting in the article_id field being empty… I guess I jumped the gun, thinking that I could use $where in Stattraq but it seems like it’s not going to happen without a fight. I’ll look at that when I get up.

Please note however that I haven’t fully tested this code so bad things might happen. Moreover, I’m both a WordPress and PHP newbie so chances are that my solution is neither elegant nor efficient. Also, smart readers will have noticed that this only addresses one side of the problem: the article id should now be correct in the Stattraq database. However, previous entries will still keep the “0″ article_id. How to fix this is left as an exercise to the reader.

Many thanks to Robert and Thomas for their help! :)

Obstacle 1 from the album Turn On the Bright Lights by Interpol

Comment spam

I just got hit by a bout of comment spam so I took several measures to remedy to this:

  1. Increased the interval between consecutive comments from the default 10 seconds to 90 seconds by editing wp-comment-post.php (see “More comment flood” at Weblog Tools Collection).
  2. Installed the Auto-Close Comments plugin by Scott Hanson.
  3. Installed Spam Tar Pit and Kitten’s Spam Words.

This should do the trick. Everything was courtesy of comment spam stoppage techniques from Weblog Tools Collection.

Confusion Errorist from the album Turn by The Ex

Weblog entry versioning?

I am confronted to an interesting problem: I have almost entirely re-written the first part of my knowledge management article. Do I update the original copy, thereby losing the history of the post or do I create a new, separate entry, despite the fact that this is more or less a duplicate post with (hopefully) better writing but with a slightly different approach?

If you have a weblog, are reading this and have been confronted to the same problem, I’d be interested in knowing how you dealt with this issue. At this point, I am thinking about replacing the old post with the new one but this is not definitive.

Skyscraper from the album Londinium by Archive

Updated stylesheet and more…

As you can see if you’re not reading this via a news aggregator, I have updated the stylesheet. It is based on the Humane Condition stylesheet that Ian Main. I might or might not keep it that way but I quite like it for now. I am going to work quite a bit on this weblog in the near future: I still haven’t really completed my move from MovableType to WordPress and I need to put in the finishing touches.

I have installed iTunes Watcher which now displays the tunes I am listening to. The installation wasn’t as simple as it could have been (or more precisely the instructions could have been clearer) but I got it working. I think I’ll look at the code a little more because there are some stuff in relation to how it deals with Amazon-provided art that I think could be improved (at least from the perspective of what I want it to do, which might not be what others want). Maybe more on that later…

I am also working on updating the first part of my knowledge management article: re-reading it shows obvious flaws and someone pointed out that I should also check Simpy out. I need to re-take a look at hyperlinkomatic… I am considering adding up a comparison table between the different online bookmark services. I am also working on the second part, which should be out sometimes soon.

So many things to do, so little time… :/

Switched to WordPress

As you can see (if you’re not reading this via RSS feeds, that is) I have switched my weblog from MoveableType to WordPress. It’s been quite trendy to do so lately but I had resisted so far because I didn’t have a MySQL database available on my ISP and I was too lazy to figure out how to make it work with PostgreSQL. Also, I wasn’t that unhappy with MoveableType (apart from the annoying comment editing/erasing interface and the well-documented slowness of the rebuild process).

Well, this has changed. I realized today that some of the posts for which I had erased comment spam had actually their content replaced by the content of the comment I erased! For a reason that I haven’t managed to figure out, it turned out that MT replaced the content of my posts by the content of the comment right after I deleted them. I didn’t realize that it had happened for several of my posts until today. As you can imagine, I got pretty pissed about it and decided to switch to WP without further ado. It turned out that this very same day, I learned that MySQL was now available so I didn’t have any excuses not to switch.

Obviously, there’s going to be some growing pains so please pardon our dust while we complete the transfer…