Technology slowing us down

With all the new gadgets and modern technology in our pockets and bags, it is great to see that lots of people, including myself, still use ordinary paper maps to find there ways through the city.

It’s been proven that new technology is actually slowing us down. DVD takes 30 seconds, 1sec for a VHS, for example. Or imagine you have to look up a map on your iPad of the Berlin S/U-Bahn. You’ll still be wondering how to get online, and I’m sitting in the hotel writing a blog post.

Ecology has no color

Ecology is not about the color green,
it’s about doing it clean.

Farewell Blogger.. Hello WordPress

My blog (and website) is now running on self-hosted WordPress installation. Yeah, it’s a PHP-thing, but I couldn’t bother making my own with Django or similar using Python. No time for that and I’m not a programming-language-radical-idiot.

RSS feeds have changed: you’ll find the link on my new website.

Why I moved away from Blogger? It just plain sucked, and I have had my fill of it..

I needed to create some plugin for WordPress. Existing plugins redirecting old Blogger URLs were not good enough. The code you’ll find below will redirect links from Blogger to the new links in WordPress. Hopefully it helps somebody!

<?php
/*
Plugin Name: Redirect Blogger links
Version: 1.0
Plugin URI: http://geert.vanderkelen.org/post/301/
Description: Redirect requests using Blogger links to WordPress link.
Author: Geert Vanderkelen
Author URI: http://geert.vanderkelen.org/

*/

add_action('init', 'redirect_blogger_links');

function redirect_blogger_links()
{
  global $wpdb;
  $uri = $_SERVER['REQUEST_URI'];

  $matches = array();
  if( preg_match('#(/[0-9]{4}/[0-9]{2}/.*\.html)$#', $uri, $m) ) {
    $query = "SELECT post_id FROM $wpdb->postmeta ".
      "WHERE meta_key='blogger_permalink' AND meta_value='".$m[1]."'";
    $post = $wpdb->get_var($query);
    if( $post ) {
      $wp->query_vars = array('p'=>$post);
      $url = get_permalink($post);
    }
    if( isset($url) ) {
      header("Location: $url", true, 301);
      header("Connection: close");
      exit();
    }
  }
}

?>

Note: if somebody can optimize it so the plugin only kicks in on links from Blogger, that would be great. It’s now executed on each request, which is a bit overkill.

By |September 24th, 2010|Personal|0 Comments|

MySQL 5.5.6-rc: InnoDB is default storage engine!

A few SQL queries are worth a thousands words:

mysql> SELECT VERSION();
+----------------+
| VERSION()      |
+----------------+
| 5.5.6-rc-debug |
+----------------+

mysql> SELECT @@global.storage_engine;
+-------------------------+
| @@global.storage_engine |
+-------------------------+
| InnoDB                  |
+-------------------------+

(Note: the above is without using the default storage engine option)

Scary! Excitement! MySQL!

Check how old your MySQL books are before usage

This is a friendly reminder to check the publication date and discussed version you MySQL books before starting out hacking or even posting about limitations. Lots of old books are still going around. Maybe it’s good to destroy them rather than giving them to students or newbies.

Few days ago (28 May 2010), for example, we had a word-for-word copy of a book on a blog post (now removed) which was discussing MySQL Cluster limitations from years ago. Well, it was funny at first and we had a good laugh. But it’s a bit worrisome. My colleague Matthew posted a rebuttal post.

How would you recycle the old, technical books? It’s not worth giving them to public libraries, it’s maybe unhealthy to burn them? How would you do it?