Temporary blogging hiatus

I’m now immersed in the process of moving from Brisbane to Sydney (with no new accommodation as yet), in preparation for my new role at CSIRO starting March 2.

Consequently, it will be quiet here for at least a couple of weeks. I’ll be sending the occasional tweet and the odd item to FriendFeed, but nothing substantial until home internet is up and running again.

A Perl trick that I always forget

Found this buried away in the back of my mind. Let’s say you want to create an array with 20 elements, set to the same initial value. You might do this:

my @array = ();
for(my $i = 0; $i <= 19; $i++) {
    $array&#91;$i&#93; = "0.00";
Or you might recall the very useful <em>repetition operator</em>:

my @array = ("0.00") x 20

As they say, TMTOWTDI – but some ways are better than others.

It’s true: you can’t believe everything that you read on the Web

An oft-repeated cliché is that “you can’t believe what you read on the Web.” Of course, you can’t believe what you read anywhere: it’s up to individuals to assess the quality and reliability of information, regardless of the source. That said, it can be alarming to sit back and watch the speed with which errors propagate in cyberspace. Yesterday, I watched this unfold in a few short hours:

  1. I (and others) bookmark a link to a project called gpeerreview, hosted at Google Code
  2. A blog post (since corrected) states that the search giant has been working on a peer review tool
  3. My bookmark appears at FriendFeed, where we discuss the incorrect attribution of the project to Google
  4. Another blog post on Google Peer Review appears
  5. Links and comments about gpeerreview start popping up all over FriendFeed, some of which suggest it is a Google project

The great thing about the Web though, is that it corrects itself just as rapidly. With a few well-placed comments, some discussion at FriendFeed and the best solution – an email enquiry to the project developer (well done Richard!), the phrase “Google Peer Review” was consigned to the error basket.

I’m not pointing the finger or criticising anyone here. Unless you develop software, you’re unlikely to be aware of Google Code and the URL/site design do make it look like a “content owned by Google website”. Just be aware: when writing, to be sure of your facts and when reading, to critically assess and not blindly accept.

Add FriendFeed comments and likes to WordPress.com posts using Ruby

The problem
FriendFeed aggregates your blog posts from WordPress.com. Naturally, people prefer to comment on your post at FriendFeed – it’s quicker, easier and more fun. However, you would like to see an indication of this activity back at the original blog post.

The solutions
You could self-host your blog using software from WordPress.org. This allows you to install plugins such as FriendFeed comments. But you’re at WordPress.com because you don’t want to self-host, right? So you just have to live with the absence of useful plugins. My advice: don’t try discussing issues like this one in the WordPress.com forums unless you’re the kind of person who enjoys comment threads at YouTube.

For intelligent, mature and constructive discussion go to FriendFeed of course, where Lars writes:

How hard would it be to make a web service that reads the RSS feed from you blog, accesses FriendFeed via the API, identifies comments on FriendFeed related to your blog posts, and reposts them on your blog? If you want to, you could also keep track of “likes”…

Lets find out – using Ruby!
Read the rest…