Archive - Mar 2007

Date
  • All
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

March 30th

The Naming of User Groups

Yesterday, I was involved in a rehash of the age-old gripe about CLUG being Linux-centric. To give you an idea of how long this has been going on, I submit a statement made in January 2000.

The discussion started around whether or not attending GeekDinner and/or CLUG meetings was beneficial. One argument against CLUG meetings was that

most of this stuff, it's easier for me to read up on, or in the case of ZFS, actually have running myself. So a talk on it, while nice, is superfluous to requirements
My response to that is quite simply that these things are more about meeting people and networking than actually benefitting from the talks. This brings me back to the point I made yesterday, and which Nick Coyne has agreed with - small tables aren't conducive to networking. But I digress.

My antagonist said that meeting people wasn't desirable, because the only people you'd meet would be CLUG people, "Linux weenies", who exclude FreeBSD, Solaris, Irix, etc, and go "Linux or nothing!". I didn't think that any of us were "Linux or nothing", but when I mentioned this, I was referred to the "L" in the name "CLUG".

So, I hereby propose a name change, to CDG/LVUGSFLOSSOSOCE: the Cape Debian Gnu/Linux and Variants User Group Supporting Free and Libre Open Source Software, Open Standards, Open Content, and Evolution.

March 29th

Something to think about

Her blog is not aggregated on Planet Geekdinner, and some of the readers might miss it, so I'll link from here: http://skeleton-danse.blogspot.com/2007/03/rage-rage.html

Update: There was a similar incident, with similar reactions, in the Ubuntu project. Corey Burger talks about it.

Geekdinner

Last night, I attended the GeekDinner, organised by Joe, and announced here.

My overall opinion was that it was a well-organised, well-attended event, with some good speakers, interesting topics, and a nice atmosphere. In a word, "mooi". The venue was a strange choice, being quite far South, and having the general reputation of being "not bad, I suppose". I enjoyed the food, although not everybody agreed with me. The wine was... well, it was free, which is good enough for me. Jonathan Endersby and I had to take it with a pinch of salt, but I wasn't complaining.

It was good to see the old faces again, and meet some new ones. I drove through from Stellenbosch with Tania, whom it was great to meet. I suspect that the way seating was organised is not very conducive to "networking" - I sat at a table with five people I knew, and two people who knew people I knew. I would've liked to meet some more people. I suppose if I was going with that express purpose, I would plonk myself down at a table of complete randoms and inflict my company on them. But the natural thing to do is to grab the nearest table with whoever is nearest to you - invariably the people you know - and with only eight people per table, this slices the attendees up into bite-sized cliques who already know each other.

The talks were, for the most part, interesting. Some of them may have been a little too long, and a little too special-interest (special-interest (adj) 1. boring) for the company, but they all sparked a bit of debate, and none were intolerable. I suspect that as things get going, we'll start getting a feel for what sort of areas we want to focus on. That's if we don't run out of people willing to talk, and topics they're willing to talk about, of course. It's a worry that having seven or eight people talk at a dinner will quickly deplete the pool of people who don't mind standing up in front of others. Time will tell.

As I've said, I wouldn't have chosen Barbarella's as the venue, but it turned out quite well at the end. Discussion for the next venue is happening on the wiki.

I must say here that I strongly disagree with what Jonathan Carter has to say about the geekdinner. The general perception was not that it was going to be a glamblogger get-together - I think most people went with very positive feelings, anticipating a good event. Jonathan's (happily inaccurate) preconceptions about it should not be considered representative of the attendees, and I think everybody who was there is looking forward to the next one.

March 27th

Converting from Serendipity to Drupal

My old blog, on vhata.rucus.net, was running Serendipity, but I've switched to using Drupal for everything on this site, vhata.net. Apart from being written in PHP, which is unfortunate, Drupal seems to be a fairly decent piece of software - pretty, easy to use, and well written. If I needed persuading of this fact, I would have been convinced by how easy it turned out to be to migrate my blog entries from Serendipity to Drupal.

Since I started setting up my omnia.za.net hosting (maybe I should blog about that a bit later?), I've been using Postgres as much as possible, where there's a choice. I am using it behind my shorl generator, my quote database, and behind the various drupal sites on this machine, including this blog. The database that stored my serendipity entries on rucus, however, was a MySQL database.

It was easy enough to extract the information that I wanted to keep from the serendipity database:

   select id, title, timestamp, concat(body, extended) from serendipity_entries;
I wasn't that interested in trying to keep the comments, categories, and so on - I have retained the database, and I will go through the comments later and update various entries to include the comments, I think.

After that, the question was how to insert this data into Drupal. At first I thought of doing it manually: I created a test blog entry, with pg_dumps before and after, so I could compare the states of the database, and how it changed when a blog entry was created. It seemed simple enough, but the whole idea didn't sit right with me. So I had a look at the PHP code behind Drupal, and as I've said, it's incredibly simple and elegantly written.

It turns out, there's a node_save() function that you can call, passing it a node object (which needs properties such as 'title', 'body', etc), and it will update everything for you. It was that simple. All I needed was to write some PHP code that did the MySQL selection above from serendipity, created a node with the right properties, and saved it. This code would, of course, need to run within the Drupal environment so that it had access to the node_save() function, and was connected to the right database. This was also trivial to achieve: There is a nice tutoral on creating Drupal modules that made it easy.

I pre-created a table called 'blogdata' to contain the data I wanted:

CREATE TABLE blogdata (
  id int(11),
  title varchar(200),
  timestamp int(10),
  body text,
  done int(3) default '0'
);
And then populated it:
insert into blogdata select id, title, timestamp, concat(body, extended), 0 from serendipity_entries;
The relevant part of my Drupal module (which I could have actually stuck into any existing Drupal module in order for it to be run) was as follows:
$q = mysql_query("select * from blogdata where done=0 order by timestamp asc");
while($f = mysql_fetch_assoc($q)) {
   $newent = array('created' => $f[`timestamp`], 'title' => utf8_encode($f["title"]), 'body' => utf8_encode($f["body"]),
      'teaser' => utf8_encode($f["body"]), 'format' => 3, 'uid' => 1, 'type' => 'blog', 'status' => 1, "comment" => 2,
      'promote' => 0, 'sticky' => 0);
   $newento = (object)$newent;
   node_save($newento);
}
$q = mysql_query("update blogdata set done=1");
I did actually have some issues at first because my data was encoded in ISO-8859-1/latin1, and Postgres was expecting UTF-8 data, but as you can see, I call the PHP utf8_encode() function to get around this. Many thanks to bje (whose domain is ironically called "serendipity" ;-) for getting my mind straight when I was being kak about this.

And that was it. My blog entries were imported perfectly. I still need to go through a few of them and fix entries that still hard-link to rucus, but that shouldn't take too long.

The only gripe with Drupal at first was the horrible URLs it created: "/node/124" sort of thing. However, with the nifty Pathauto module, those are a thing of the past.

Migration

I have just about finished the migration from my old site on http://vhata.rucus.net/ to this new system. Unfortunately, I can't bring my googlerank with me, but hopefully that will build up in time.

There's still a bunch of stuff that I'd like to add to this site, but it has the functionality necessary to carry on with for now. Time will tell if I ever do get around to fixing it.

Anyway, this is just a quick blog entry to nudge my RSS feed back into life.