New here? Then you may want to subscribe to my rss feed. :)

Mad dogs and… dog owners

April 23rd, 2007 | Posted in Funny | 

I need to tell you a true story about what happened nearly a year ago.

Continue reading this article »

Discuss this article »

Convenience gone mad

April 22nd, 2007 | Posted in Bizarre, Funny | 

Whilst queuing up at my local Asda i happened to glance over my shoulder at the person behind to see what they were about to purchase. This was an attempt to make myself feel better about the monstrous Victoria sponge cake i was about pay for.

Amongst all her goods, was a ready made meal. To my amazement, it was a pre-packed ready made omelette. WTF?!?!!

Now, I am famous for not knowing how to cook. Its not that I don’t try, its more that i have a problem with the word simmer. Simmering is something which I cannot bring myself to stand around and wait for. As a result….well…. you can guess the rest. But one dish I can manage is an omelette.

I was not able to read the cooking instructions, something which I plan to do on my next visit. But surely, no matter how simple, it cannot take as long as it would to whisk up a few eggs and fry them. I realise that omelettes come in many different varieties, but this just said “Omelette”. Not to mention the idea of re-heating a half cooked omelette is enough to put you off eggs for life.

Surely, this has to be convenience gone mad. Are we now so busy that we just don’t have the time to mix a few eggs in a bowl? We must be if manufacturers feel their is a demand for such foods. Not to mention Asda in all this, but a large supermarket chain which has a team of people who decide what to put on their shelves thought an omelette in a box would be a real hit. Well they must be onto something, the person behind me bought one.

For those needing cooking instructions from a person whose bookshelf contains 101 recipes by Baldrick.

  • Break eggs in bowl
  • Whisk ‘em
  • Pour into frying pan
  • Fry
  • Put on plate
  • Eat

(p.s. and yes, i had to look up the recipe to make sure :) )

Discuss this article »

DotLucene, Free search engine for .Net

April 19th, 2007 | Posted in .Net, Development | 

A request came In from a client. I was asked to add search functionality to their existing site. Initially the plan was to write long, complicated sql queries with enough joins and sub-selects to make your nose bleed.

Before starting, I wondered if there were any alternative solutions. The site itself is a .Net site with a flash front end and a MySQL database. So naturally, i needed something that i could interface with using C# and MySQL.

Behold, a short google later I came across a free, open source and bloody good search engine called Apache Lucene.

“Apache Lucene is a high-performance, full-featured text search engine library written entirely in Java. It is a technology suitable for nearly any application that requires full-text search, especially cross-platform.”

Fortunately, some very nice and clever people have ported it over to .Net (DotLucene) so I now had a search engine i could use with C# and MySQL.

To top it all, the nice people at DotLucene have also put together a simple tutorial to get you started.

The system has its drawbacks, most notably is the inability to do a wildcard search from the first character. e.g. searching for *ordpress would throw an exception. So you will have to implement workarounds to this and other situations. There is API documentation and a fairly active mailing list to provide help.

I am still relatively new to Lucene so as this project develops i will post any useful nuggets of information to help you along.

Discuss this article »

You have been warned! :)

April 11th, 2007 | Posted in Funny | 

car_sticker.jpg

Discuss this article »

Getting WP-Cache and WPAudioScrobbler to play together

April 7th, 2007 | Posted in Development, Wordpress | 1 Comment

One way to speed your wordpress site up is to make use of WP-Cache. One of the cool features of this plugin is the ability to dynamically load page elements. I wanted to be able to continue to load my Last.FM play list using WPAudioScrobbler whilst having the rest of the page load from a cached version on the server.

To achieve this you make use of two special tags, mclude and mfunc.

Unfortunately the documentation does not make it clear how to go about using the tags correctly, so through carefully analysing the code, deciphering the regular expression and a large chunk of trial and error I managed to get both WPAudioScrobbler and WP-Cache to co-exist.

From within the template displaying your Last.FM play list, replace:

  1. wpaudioscrobbler();

with

  1. < !–mclude wp-content/plugins/wpaudioscrobbler/wpaudioscrobbler.php–>
  2. < ?php include_once(ABSPATH . ‘/wp-content/plugins/wpaudioscrobbler/wpaudioscrobbler.php’); ?>
  3. < !–/mclude–>
  4. < !–mfunc wpaudioscrobbler()–>
  5. < ?php wpaudioscrobbler(); ?>
  6. < !–/mfunc–>

Note: for some unexplained reason, wordpress seems to replace a double hyphen with a minus symbol. If you copy and paste, remember to swap them back and remove the space after the opening < tag.

Discuss this article »