Archive for the ‘My Sites’ Category

Max-width Content

Thursday, July 19th, 2007

I’ve just made a small change to motorcyclesurvey.com, to see if applying a CSS max-width to large block of text content improves the visitor experience, by keeping the line lengths from becoming too long.

Internet Explorer 5 & 6 users won’t see the change (max-width isn’t supported in those browsers), and nor will most users of small monitors, but hopefully restricting the text content to a width of 33ems (ems being used so the max-width scales with font size), with auto left and right margins, will make the reading experience more pleasant for visitors.

As usual, if this change seems to be positive, I’ll roll out the change to the car and mobile phone sites.

As an aside, for tracking the effect of small changes like these, I’m finding the Google Analytics Pages/Visit figures very useful.

More “More reviews links”

Thursday, June 28th, 2007

The more reviews links I implemented just over a month ago seem to be working well (visitors are viewing more pages per visit).

In light of this, I’ve just added additional links of this type, to other pages on Carsurvey.org and related sites.

Breadcrumbs alone don’t seem to be enough for visitors who are new to a site, as they’re easily scrolled off the top of the page.

Simplified pages for adding reviews

Thursday, June 21st, 2007

As promised in my Simplified pages for adding comments post, I’ve now made a similar set of changes to process for adding a new review. The number of pages has fallen from 6 to 4, which will hopefully result in more reviews being added to the site.

Less ads for Carsurvey.org members

Wednesday, June 20th, 2007

For a long time, I’ve played with the idea of switching off ads for Carsurvey.org members. How Ads Really Work: Superfans and Noobs helped persuade me that it really was the right thing to do.

With immediate effect, anyone who has recently visited the Members Area of Carsurvey.org (the car site, not the airline site), will be able to view the main car site with almost all the ads removed. The members cookie lasts for 31 days. If you login to the Members Area at least once per month, the ads will stay removed, regardless of how many reviews or comments you rate.

The only exception to the ad removal is the UK used car search facility, which is doesn’t take up much screen real estate, and is subject to an agreement that I don’t want to break.

MySQL foreign key data types

Tuesday, June 5th, 2007

I’ve just made some changes that have massively improved the database performance of Carsurvey.org.

Back in 2000, when I added comments support to Carsurvey.org, I made the very silly decision to set the foreign key in the comments table to be a varchar (I thought I might want some flexibility above and beyond integer ids), and this varchar foreign key referenced an existing integer id field in the reviews table.

All seemed well, but for the last week I’ve been puzzling over why some of my join queries between comments and reviews were quite slow, and weren’t using the indices that I thought they should. After several days, I decided to change the comments foreign key datatype to integer, so it would match the reviews id datatype. Suddenly indices started being used in the way I was expecting, and I got a big performance increase.

So there are two lessons to be learnt here:

1. Unless you have a very very good reason, make your foreign key datatype match the datatype of the unique key in the reference table. It’s common sense for most people, but apparently not me circa 2000.

2. MySQL (version 4.1.20 anyway) doesn’t appear to optimise joins well where it has to match columns with different datatypes. This is presumably because of how it does type conversions.

Hopefully my confession will help anyone else who’s made a similar mistake, and is trying to work out why their query isn’t using the index they expect.

MySQL Optimisation

Thursday, May 31st, 2007

I’ve just spent a couple of days optimising some of the database code on Carsurvey.org. Performance wasn’t becoming an significant issue, but I had bee in my bonnet about some of the existing code, where I knew there were some simple improvements I could implement. Specifically:

Replacing lots of nasty PHP mysql_result and mysql_num_rows calls, with more efficient mysql_fetch_array loops.

Using the slow query log with its log-queries-not-using-indexes option, to find some a couple of stray queries that were doing full table scans, which were quickly addressed by adding suitable indices.

More reviews link

Thursday, May 24th, 2007

Below the main text of each review on Carsurvey.org, MotorcycleSurvey.com, and MobilePhoneSurvey.com, I’ve added a “More XXXX YYYY reviews” link. For example, a More Ford Focus reviews link on all Ford Focus review pages.

There are similar links on other parts of the page, but for visitors who arrive from a search engine, and aren’t familiar with the structure of the site, this will hopefully make it easier for them to find additional reviews.

Related to this change, the read comments link has been moved across to the right of the page, and the spelling and deletion links have been shortened, to make the wording more direct.

If this change works, I’ll look at replicating this sort of change for other pages on the site - for example, putting a link to All Ford Reviews at the bottom of a page listing Ford Focus reviews.

We’re back

Saturday, May 19th, 2007

The Carsurvey.org webserver is now up and running again.

I’m letting it bed in for a few hours before I turn on the addition of new reviews and comments, but things are looking good so far.

Apologies once again for the downtime.

Carsurvey update

Saturday, May 19th, 2007

The server seems to have left the world of the living, and at long last, the hard drives are being swapped into a new server. Hopefully (crosses fingers and toes) Carsurvey.org will be back up shortly.

In the medium term, I’ll be moving to another web host, as I have no desire to repeat the experience of the last few days ever again.

Another server update

Friday, May 18th, 2007

The Carsurvey.org web server is still stuck in support hell. I’m pretty sure it’s a hardware fault, but no one at the hosting company (The Planet) seems to have got to the source of the problem. In the medium term, I’m definitely going to move hosts, as my recent experiences support at The Planet have been very poor.

Sorry for the long wait, and if things aren’t resolved soon, I’ll just rent a server from someone else, and rebuild Carsurvey.org from my backups. That would take a day or so, plus the time needed for the DNS change to take effect, so I’m still going to give The Planet one last chance to fix the problem.