Archive for the ‘mac osx’ Category

Migrating from Serendipity to Wordpress

This blog is really a note to myself and anyone else interested in doing the same thing. Basically, I wanted to move off my old blog based on Serendipity 1.1 and onto the latest version of Wordpress (2.3.2 as of yesterday evening!). After picking my way through doom and gloom posts, it’s impossible, I chanced upon a great post by TechnoSailor who had written a wordpress importer script to do this. Bliss! His script worked for me (with the exception that all my posts were put into the uncategorized category, but no big deal). However, other people were have different problems that SoGua fixed and posted out an updated version of the wordpress serendipity importer. Nice man!

The import process goes something like this:

  1. Download and unpack wordpress into a directory.
  2. Create database to hold wordpress content.
  3. Get wordpress up and running by following the instructions /wp-admin/install.php
  4. Unpack and copy the serendipity.php from TechnoSailor from into wp-admin/import directory.
  5. Import the posts by clicking on the Serendipity import from the site admin’s Manage | Import menu.
  6. Follow the instructions and be sure to keep a note of the new admin login details.
  7. Log into wordpress AND change your admin password.

Now that should all work for you, but , my hosting provider (1and1), given that I’m in a shared environment, hides its databases behind a firewall. Which is fair enough. However, the also prevent users that try to access the database from 1and1 trusted servers to access the database directly. Really annoying. Why is this a problem? The serendipty importer is useless to me if I cannot access both the database from 1and1 web servers. Ahhhhh!

So, i did the following:

  1. Created a local instance of wordpress.

    For Mac OSX users with MySql you need to specify 127.0.0.1 within the wp-config,
    not localhost otherwise you get a failed connection

  2. Used 1and1's phpAdmin SQL tool to export a dump of my Serendipity database and re-create the database locally
  3. Imported posts stored in this local Serendipty database into the local wordpress instance using TechnoSailor’s script
  4. Exported the local wordpress database, with all the juicy serendipity posts, as a SQL script

     e.g. mysqldump –opt  -u  -p

  5. Tweaked the exported SQL script.  In particlar, the stuff within the wp_options table needs to modified.
     Namely the siteurl which needs to be changed from your local wordpress instance (http://localhost/~clevegibbon/blog)
     to the target wordpress instance (e.g. http://www.clevegibbon.com/wordpress.  If you don’t do this, when you click
     around your target site it re-directs you to your local wordpress instance’s url.
  6. Use the phpAdmin SQL screen to run the exported SQL script.
  7. Log into your new blog.

Job done. Time for a coffee…

The Knowledge Portfolio

When I started out on my PhD I was given a great piece of advice from a someone who had just completed theirs: whatever you do, whatever you read, document it! Oh, and one more thing Cleve, make sure you read one article, every day, until you have completed your thesis. This was quite a commitment back in the early nineties, when articles were either stored on microfiche and/or you had to send off for hardcopies to research papers that were maintained by other libraries. Believe it or not, not everything was online. There was no Google Scholar! However, I did this and I religiously spent the first 2 hours of every day in the University library reading, researching and reviewing other peoples work. Then, I documented it. At the end of my thesis I had read just under a 1000 research papers in the area of abstract data types, modularity, object-oriented design, software quality and metrics and met some very interesting people.

As soon as I left academia, and went full-time, this all stopped. Boy do I regret this. No, I didn’t stop reading but I did stop taking care of my knowledge portfolio. After reading the Pragmatic Programmer, in which they discuss the need for everyone to maintain their own knowledge portfolio, I feel I need address this. However, you’ve got to understand, within academia I had invested 10 years of my life to C++. When I got my first job, I left both academia and C++ behind (a big relief), and entered the rather simple in comparison world of Java 1.x (and so on), that pretty soon became .NET. Sure, there was other stuff, but those two technologies pretty much had my undivided attention.

That’s all changed now…and over the next couple of months I hope to explain all…

Mac OS X - Linux for Dummies?

Outside of work, I’m responsible for two sites really, clevegibbon.com and helent.co.uk. Both are very simple html sites that have been designed in DreamWeaver. I have decided to move away from DreamWeaver and implement clevegibbon.com in Ruby and helent.co.uk in php.

Now, I have recently dropped the Windows desktop and migrated over to Mac OS (Tiger), steering clear of Leopard for now, too many small issues cropping up. That’s was when I first heard the term Mac OS X == Linux for Dummies. At first I thought it was a joke, but oh no, we have Linux Priesthood, who look down on lowly Mac Users. How I laughed!

I started using Unix nearly twenty years ago. I still remember my very first shell prompt. I logged into Unix and there it was, winking at me, daring me, I could hear it challenging me: “go on then Cleve, here’s a prompt, show me what you can do?”. That’s Unix! So, being the young fool that I was (hmm, am?) I decided to do some damage. That’s when I learnt all about permissions in Unix. I was boxed in and the only damage I could do was to myself and my own files. Unix 1, Cleve 0! Ever since, Unix (and it variants Linux, HP-UX, AIX, BSD and so on) and I have had a mutual respect for one another. Things have been fine. Now, after 10 years in the Microsoft wilderness, I have returned to Unix on my desktop.

So Mac OS X brings Unix to the masses. Great! It standardises and adheres to convention. Nice! It keeps things simple. Sweet! So is Mac OS, Linux for Dummies. No its Mac OS for Mac users. If a dummy can’t use Linux, then who really is the dummy? And yes, I love Linux and for sure, there are some great Linux desktops out there, but Mac OS is just fine for me.

Anyway, I’ve got other issues to contend with. First things first, I need a ruby development environment set up. I’m hearing Xcode, Locomotive, Mongrel, which are new words for me. Time to read…

Mac OS X Desktop Authoring Clients

I’m new to the whole mac os X world. So after a quick google for a desktop authoring client, I found out that I need to pay. But before I do, I’m going to trial the shortlist.

At the moment, i’m going with ecto and this is my first post. Let’s see how it goes.

I spy a Mac

The winds are changing…

Here I am at 05:00 GMT, having uninstalled Napster,  researching MacBook Pros, installing the latest iTunes on my windows laptop that irritates me now, playing around with containers in Ruby using the latest nighly build of the Netbeans Ruby IDE (19Mb).

 

The Netbeans Ruby IDE has intellisense and hover over docs.  Two of THE most important development aids for someone, like me, getting to grips with a new language.  For the more seasoned Ruby developers it has support for JRuby and Rails, project support, Rake builds, a debugger and the beginnings of a refactoring engine that comes with a little warning :-)

 

  • WARNING: Ruby refactoring is not accurate! Inspect everything manually!

 

Now I don’t hold this against them, we all know refactoring in Ruby is damned hard, but funny nonetheless…

 

…as I said, change is afoot!