A beautiful new theme!

Whenever i upgrade WordPress i am usually so impressed with the elegance of the admin area that i tend to feel it’s time to change the front end theme.

To that end, i have said goodbye to the theme i had with WordPress 2.5 …

Wordpress 2.5

And welcome to my new theme for WordPress 2.7 …

Wordpress 2.7

It is the WPTD Green Theme 1 found on freewpthemes.info.

I have also downloaded a couple of new plugins, most notably the very nice WP-Syntax plugin for displaying code nicely. An example is my tutorial about attachments with CouchDB on Rails.


So beautiful! Of course i spent the entire last night tagging every piece of code in my blog with the correct language attribute so that it could be displayed with pretty syntax highlighting!

This morning i reinstated my blog as an OpenID URL, using the MyOpenID plugin. Previously i had hardcoded the meta lines into the theme, but it makes more sense to use a plugin. I am also trying out the Twitter for WordPress plugin but i don’t like the way it works. I prefer it to update via JavaScript. Maybe i’ll find another plugin, or write my own.

There is another simple plugin that i’m intending to write, but i’ll make another blog post about that when i’ve done it! :D

By sermoa Posted in admin

WordPress 2.7

I have upgraded my WordPress! :) It has been nagging me for so long about it, and i’ve just been ignoring it, but tonight i just came home and felt in the mood for an upgrade. Our company blog is on WordPress 2.7 and i really like the colour scheme and style of 2.7, plus i want to install a couple of new plugins.

Suddenly i feel i’d like a new theme too. Perhaps i’ll have a look for one tonight. Nothing better to do on a Friday night, hey?! ;)

By sermoa Posted in admin

Loving the vimtutor

A couple of times recently i’ve found myself doing <ESC>:wq in the internet instead of pressing the submit button. I don’t use Vim very much at the moment – really only to make Git commits – but i’ve had enough of a taste that i feel it’s something i want to learn properly.

For a few months i’ve been searching for a text editor that i can use both on the Mac at work, and Linux on my netbook and PC at home. TextMate is a wonderful thing, but there is no decent Linux equivalent. A colleague and i started writing OpenMate – an open source cross platform equivalent to TextMate … but it’s hard! I enjoy gedit but failed to get gedit installed at work. I’ve tried NetBeans and jEdit but didn’t like them much, and they feel too big and clunky for a netbook.

After a little bit of reading about Vim i have become very excited. More excited that i’ve ever felt about a text editor before! I’ve realised that my conception of Vim has been wrong. I used to press i straight away to get into Insert mode, and stay there until i wanted to perform a command, in which case i’d press <ESC> followed by the command. Now i realise that a better way to use it is to be in ‘Normal’ mode most of the time, press i to enter Insert mode very briefly, and press <ESC> as soon as i’ve finished inserting.

This afternoon i discovered vimtutor and have been really enjoying it! You can run it on any Unix/Linux based system; just type vimtutor at the command line. It takes you through every command, at your own pace. It gives you samples of text to correct, using the commands you have just learnt. It’s actually quite fun and demonstrates the power of Vim very effectively!

At the moment i’m still muttering everything as i go, like “delete … 3 … words” as i very slowly type d3w and i’m exclaiming in delight at almost everything i learn – like – “Wow! That’s so clever!” I’m sure soon enough i’ll be able to use it effectively without making a lot of noise about it!

It is interesting learning it for Dvorak, but not too difficult. The up and down keys are in my left hand, and the left and right keys are in my right hand. They all actually fit rather neatly under my hands and feel intuitive even though they are not all in a line together. To be honest, i think i probably prefer it to the way it works under Qwerty.

Here is a helpful Vim cheatsheet laid out for Dvorak. Thanks, Mark Schoonover!
Here is an excellent article about the wonders of Vi/Vim.

It’s ridiculous how exciting this feels to me! Perhaps it’s the sense of moving up another level in the geek hierarchy! :D

Apache tricks on Linux

Most of my life is spent coding Ruby on Rails, but occasionally i venture into the world of PHP. When i do, i sometimes need to configure Apache because, unlike Rails, it does not happen automagically! To save myself always looking things up on the Internet, here is a little summary of the things i have learnt.

Don’t do this!

When i very first started using Linux, i discovered that you could put files into /var/www and access them through http://localhost. This is a very bad idea because you don’t have permissions to the /var directory (for good reason!) so i used to end up chmodding everything. Also, keeping anything outside your home directory is bad news because you’re liable to forget to back it up before you do an upgrade! WHOOPS!

A perfectly good solution

The next thing i learnt was symlinking, or creating shortcuts. So you can set up a shortcut from the /var/www directory to an appropriate place in your home directory. For example:

sudo ln -s /home/aimee/websites /var/www/html

Now if i have a directory called mac2 under my websites directory i can go to http://localhost/html/mac2/index.php. Nice!

More advanced: VirtualHosts

Later on i started experimenting with Apache’s RewriteRule and RewriteBase for nice ‘pretty’ URLs. You’ll soon find out that the symlink method is no longer suitable because you’re not using relative URLs anymore. It’s time to learn about VirtualHosts, so that i can access my local files with a URL like http://mac2.aimee.

Apache2 keeps a list of available configurations under /etc/apache2/sites-available. I have one called aimee.conf because i am egotistical like that!

sudo vim /etc/apache2/sites-available/aimee.conf

It must start with this line:


Then, for each site that i want, i add a VirtualHost like this:

  ServerName mac2.aimee
  DocumentRoot /home/aimee/websites/mac2
  CustomLog /var/log/apache2/mac2.log combined
  DirectoryIndex index.php

It really just needs to know where to find the source files. The log and directory index are not especially important. It’s probably fairly obvious why i added them. There are plenty of other options you could use if you wanted to, but this is about all i use.

Next we need to enable the configuration. It’s as simple as symlinking the file from the sites-available directory. You only need to do this once per .conf file (and i only use one for simplicity).

cd /etc/apache2/sites-enabled
sudo ln -s /etc/apache2/sites-available/aimee.conf .

The next step is to configure the hosts file such that when i type http://mac2.aimee into a browser it knows to look on my actual computer rather than on the Internet.

sudo vim /etc/hosts

I enter a line like this:       mac2.aimee

Finally, restart Apache and all should be very well!

sudo /etc/init.d/apache2 restart

The best of both worlds

If you want it both ways (and hey, why shouldn’t you?!) it is quite simple to set up another VirtualHost for localhost. Just add it in like this:

  ServerName localhost
  DocumentRoot /home/aimee/websites

Restart Apache again and now the same site is accessible at both http://mac2.aimee and http://localhost/mac2/index.php.

Happy day! :)


This is how i made it work on Ubuntu Linux in a development environment. Other operating systems may behave differently. I have no idea about setting up production servers!

If Apache is in a different place on your computer, you can find it like this:

whereis apache2

To find your hosts file:

locate hosts

I am not an Apache expert, so if you have any questions, chances are i can’t answer them! Scroogle is your friend! :)

Windows 7 quick review

I installed Windows 7 Beta for a few reasons:

  1. Because it’s free! (as in free beer)
  2. In order to test things under Windows and IE8
  3. To get SecondLife / OpenLife which are kinda dodgy on Linux
  4. Just for curiosity because all the reviews have been good

I think Microsoft have done a really good thing here, generating such an interest and making it available to as many people as want to try it. From the looks of things it’s a good release both in looks and in functionality, and they should get a lot of great publicity that should lay the disastrous year of Vista to rest. Plus loads of free testing and feedback of course!

Fear not, i am still a great big Linux fan, and i will continue to use Ubuntu as my operating system of choice. But you know, if Windows 7 is really worth it, i might just cough up the money for the real thing when it comes out and the beta expires.

I followed the instructions here: How to dual-boot Vista with Linux (with Linux installed first) to create some space for Windows 7, install it to the new partition, and then fiddle with GRUB to make the two play nicely together. In fact they did not play together to start with. Windows 7 tried to hide Ubuntu, and then i fixed that, and Ubuntu refused to let Windows 7 have a turn. I got “BOOTMGR is missing” and had to run the Windows 7 fix program on the DVD twice before it came back to life.

Anyway, i got it working now and there are some pretty cool things that have impressed me. This is not going to be a full review; that has already been done by plenty of other people … but here are some snapshots of my experience.

I was delighted to see that it comes with a “United Kingdom” theme, possibly because i entered United Kingdom as my location. How very thoughtful and welcoming! The background changes every 30 minutes with nice scenes from around the UK.

QUICK! Find Antivirus!

The “important message” is Windows 7 anxiously urging me to install a virus checker. Welcome back to the world of insecure operating systems, hah! I have installed the Kaspersky preview for Windows 7 which annoys me with popups every time i try to do anything. Rubbish, hey!

My first piece of feedback to Microsoft, if i could be bothered to give it … the Start button has a spiky highlight. It looks a little bit threatening, to me.

Spiky Start button

Previews are pretty awesome, especially in Internet Explorer 8 where each tab becomes a separate preview. When you hover over the preview, the full-size image appears. It’s neat!

Clever tab previews

The hover colours themselves are actually really stunning! It seems to take colours from the icon, and apply a beautiful glassy effect, for example the Firefox one is mostly orange:

Beautiful hover colours

The ‘show desktop’ now works both as a click and a hover.

Show desktop hover

I’ve already done that a couple of times tonight to have a check on the time and temperature. It’s quite nice that a quick mouse gesture (to the bottom corner) can quickly minimize and bring back again. However, the gadgets are not always visible, which may be a glitch or maybe i’ve just not understood when they show and when they don’t.

Finally, Second Life! I was initially disappointed because Second Life claimed that it didn’t like the video card driver. So i went to Control Panel – Hardware and Sound – Device Manager, right-clicked on my Display adapter and requested an update. Windows 7 found a good one for me!

Second Life working under Windows 7


Windows 7 direct download

Like half the world, i have been trying to download Windows 7 tonight. I might have found a legitimate link, thanks to @benhedrington – i clicked this and it started downloading something. It obviously comes from download.microsoft.com and it begins with the number 7000, which i suppose is a good sign.

http://download.microsoft.com/download/6/3/3/633118BD-6C3D-45A4-B985-F0FDFFE1B021/EN/7000.0.081212-1400_client_en-us_Ultimate-GB1CULFRE_EN_DVD.iso (2.4GB)

Update: Steve Clayton corroborates this link, and also provides a 64-bit link:

http://download.microsoft.com/download/6/3/3/633118BD-6C3D-45A4-B985-F0FDFFE1B021/EN/7000.0.081212-1400_client_en-us_Ultimate-GB1CULXFRE_EN_DVD.ISO (3.2GB)

Possibly downloading Windows 7

Let’s hope it’s the right thing, hey!

I think we also need an activation key, otherwise it will only work for 30 days. I managed to submit my email address on the technet beta program signup, so hopefully they will send me one.


New Week's Resolution

I don’t do new year’s resolutions. For me, a year is too long a time. I do, however, always try to do something for Lent, and occasionally i make new week’s resolutions, which usually last just from Monday to Friday.

This week i am following a resolution that i was inspired to make after reading Nye’s Top tips for a tidy home. It is full of many excellent tips, but the part i really liked was this:

You’ve had a really hard day at work and you’re tired. Wait! Don’t sit down on the sofa, no matter how tempting it is. Do a couple of chores first and then sit down. Give yourself a pat on the back!

It is true, when i come home from work i am only mentally tired. It seems to work really well to balance that with some physical exercise that doesn’t require much brain power. This week i have aimed to do two chores, but ended up doing more because i found i actually had quite a lot of energy to use up.

Contrast that with my previous technique which was to put things off until after washing up, forgetting that i often don’t get round to washing up until 10pm, and if there is a lot of washing up to do, i don’t feel like doing chores afterwards at all. Meaning that i ended up doing most of my chores on a Sunday afternoon!

So thank you, Nye, your advice really seems to work well, and i hope that this will become a habit that lasts for more than just a week! :)

In other news, i just lol’d at this picture found on urban dictionary … what’s the opposite of ‘pro’?

What's the opposite of 'pro'? Clearly 'n00b'!

The teacher is a total n00b not to know that the opposite of ‘pro’ is blatantly ‘n00b’!


So my epic holiday is nearly over … i go back to work tomorrow after more than 3 weeks away. I actually can’t wait to get back! I so enjoy the work that i do, and i appreciate the structure of knowing what is going to happen each day.

Here is my holiday summary:

  • A few days at home relaxing and getting ready
  • Four days in Germany
  • A week in De Panne, on the North coast of Belgium over Christmas
  • Back home and time with family and friends
  • Dealing with horrible damp mouldy walls that got really bad when we were away

For more details and photographs, read on … but beware of the mould pictures if they might squick you out!

Continue reading

God bless your year

I have always liked this poem which my grandad wrote in nice calligraphy for me when i was young. Since i have never found it attributed anywhere on the Internet, i assume that my grandad wrote the poem. I think it’s time to let the Internet know of it! :)

God bless your year
giving you —
Time for the task
Peace for the pathway
Wisdom for the work
Friends for the fireside
Love to the last

Philip William Carter 1921 – 2004

GitHub in the Crunchies!

If you feel so inclined, you might like to vote for GitHub as the best bootstrapped startup of 2008 in the Crunchie awards.

I am extremely fond of GitHub and the joy and collaboration it has brought to programming. It is very clever and very useful!