Archive for August, 2004

The power of beer

It’s amazing what you can do after a few drinks.

I’ve just re-written the directory summaries (popular locations, popular categories, popular interests) on BritBlog so that they all use cached data (held in arrays in files) instead of hitting the database with a query each time. I’ve not done any tests, but it must be loads quicker. The queries used to have two JOINs (i.e. three tables) and WHERE clauses, so they weren’t exactly light-weight. The database is on a physically separate server too, so that won’t help things either. The cache arrays are updated every four hours via a cron job, so they should never be too out of sync with the real values. All I have to do now is apply a few sorts to them to get the data in the different orders that I need.

I went through and replaced several other database queries in this manner too :-)

I’ve also added an index of all the interests people have. Again, this is built from a cached snap-shot of the database, so it’s pretty swift.

And what did I learn with this exercise? Well, I learned how to use the usort function for sorting multi-dimensional arrays. That’s pretty nifty!

Well, this post is boring the tits off me. I’m new to this blogging thing, and when I started one of my planned uses for this blog was to talk about the work I do on BritBlog. So there you have it: work I did on BritBlog.

Got to go to Cambridge tomorrow night (um, actually tonight now). Yet another friend has got engaged (- the world has gone mad!) Still, it should be a good crack. It’s always good to meet up with my friends from up there :-)

Canon PowerShot Pro1

// Virtual Canon PowerShot Pro1 //

I’m thinking of getting a new camera. I’ve been using film for years (with my trust Canon EOS 5), but have been hankering after a digital camera for some time.

I’d really like to get the new Canon EOS 1D Mark II, but at 500 it’s quite a lot. The other problem is that it weighs a ton, and I think this is one of the reasons I don’t take as may photos as I used to - my EOS 5 is just so heavy to lug around all the time (and not very practical in social situations).

So even if I go for a Canon 10D (070) to save money, I have a feeling that I wouldn’t lug it around so much. Or would I? Maybe I’d feel like I have to. At the same time, the 10D has been around for a while, and it could be ready for a replacement…. So should I hold on?

So I’ve been thinking about getting a compact camera to keep me going until either (a) I’m rich, or (b) canon introduce a new affordable dSLR that is better than the 10D. I’ve looked at a few, and they all seem to have bad lenses at the wide angle end of things. This seems stupid, as most people that use digicams want to take pictures of mates (in the pub) where the light may not be great and they haven’t got much room to move back.

Anyway, I just have to have at least a 28mm (equiv.) lens, so I’m looking at the Canon PowerShot Pro 1 (30).

Canon Powershot Pro 1

While this doesn’t have the speed of an SLR, it has a decent lens (28mm equiv.), it has a hotshoe for flash gear, and all the manual overrides you could want. Has anyone ever used one of these? If so, what are your thoughts? Have you had any problems with it?

BritBlog RSS Feed

I’ve finally RSS-ified the news at BritBlog. I’ve been meaning to do this for ages, and thankfully another site needs something similar so I’ve managed to do a bit of a copy and paste job on it ;-)

For those that are interested, I used the PEAR XML_Tree package. It’s quite useful you know, so if you’ve not played around with PEAR you should go and do so now!

Just ran the spell checker. It makes me laugh that the Blogger dictionary doesn’t include ‘RSS’. And it wants to replace ‘BritBlog’ with ‘veritable’, which isn’t very nice :-(

WordPress

I can see if I wait for a WordPress port to PostgreSQL I’ll be waiting a long time, so I’ve given in and am going to try it on MySQL (thanks to the nice guys at my web host for setting me up a database :-)

So, when I get a chance I’ll install it and see what it’s all about. Won’t be for a while though as I’m bogged down with work :-(

Strange

Proposed Dutch law would ban unsolicited toe-licking Heh, came across this at forgetfoo. Very odd.

Spider in my Garden

Spider in my Garden

Here is a spider I just snapped in my back garden. It was sitting on its web, just under our classy garden table.

Spider photograph setup

The second photo shows the setup: a Canon 300D, Canon EF 28-105mm f/3.5-4.5 USM lens, on an EF25 extension tube. You can just about make out the spider to the left of the tripod head, below the table top. The lens was set at 105mm, and the exposure was 1/60th second at f/16. I used a mirror to provide some fill in light, and this had the effect of making the background seem darker. The camera was on aperture-priority, and I under exposed by 1 stop. This is the full image: it has not been cropped, tweaked or fiddled with ;-)

Blinkx

A friend of mine is working on the Blinkx project, and he asked me to try it out and provide feedback.

So I’ve downloaded it and have tried it. They have this very cool thing called a broadband query where it draws a cunning interactive map of the results. I like that, though it doesn’t seem like much use and you don’t need to have the software to try it.

As far as actual searching goes, I guess it does what you’d expect. It searches various channels, including local files, news, blogs, images, and the internet, so it’s quite comprehensive. I’m told that as it uses the Autonomy software it’s really good.

I think my main problem with it is that the application works in a new window. I think it should be better integrated with your web browser. Anyway, I’ll continue to have a play with it and see how I get on with it. It’s only on version 0.3.110 BETA, do I guess I shouldn’t expect too much!

If you want to try Blinkx then you can get it from here.

Arrgghh!

I’ve just spent about 20 mins looking for an error in some code. After all that I ealised I’d missed a curley brace:

function cancel(mode)
{
  if(mode == "new")
    window.location.href = 'action.php?mode=cancel-new';
  } else {
    // mode == "existing"
    window.location.href = 'action.php?mode=cancel-existing';
  }
}

instead of

function cancel(mode)
{
  if(mode == "new")
  {
    window.location.href = ‘action.php?mode=cancel-new’;
  } else {
    // mode == “existing”
    window.location.href = ‘action.php?mode=cancel-existing’;
  }
}

I think my mind must be distracted. But then I’ve been working since about 10 AM ish, so it’s been quiet a long day ;-)