Paul Maddox

Software development team leader specialising in Microsoft Visual C# and C++ from the Northwest of England. Experience working in a globalised business and team; understanding of enterprise business operation and practices; experience reporting to executive management Skills in numerous languages and technologies; knowledge of formal software development lifecycle; experience of architecture design

Tuesday, August 7, 2007

Syntax highlighting in colour in HTML

I recently found a fantastic feature in GVIM that allows me to syntax highlight my code and turns it into HTML. I'm sure there are tools out there specifically for this job, but given the convenience of having this built into my editor I couldn't help but mention it.

You can get GVIM from their website. When you've loaded your code up (and practically every language is supported), click the Syntax -> Convert to HTML menu option.

Here's a sample:


<?php

if (isset($_GET['album']))
{
//echo 'gallery: ' . $_GET['album'];
$d = dir('Photos/' . $_GET['album']);

$bFirst = true;
while ( ($file = $d->read()) !== false)
{
if (strpos($file, 'tb.jpg') !== false)
{

Thursday, August 2, 2007

Search Engine Effectiveness - Practical Test

I've been wondering recently how effective alternate search engines are compared to Google. As a small test I decided to take 25 searches I had performed in the last week and search on Google, Yahoo and MSN Live Search to compare results.

The following table shows the results. A score of zero means the target info was found on the search page itself (I didn't have to click through to the site). A number 1-10 is the position of the search result with the target info. A blank score means the target info was not found on the first page of links.

The score is a sum of each search position negated from 11. As so:

Target info on search page: 11-0 = 11
Target info on page result 4: 11-4 = 7
Target info on page result 10: 11-10 = 1
Target info not found: 0



Conclusions:

I was pretty suprised Google was so far ahead compared to Yahoo and MSN. Google won because it was better at finding more niche searches, whereas Yahoo and MSN failed completely. For more obvious searches all three performed flawlessly and may do for day-to-day searches.

Google tended to either have the result first, or not at all. Yahoo had a few useful results in the top five. MSN had some results nearer the bottom of the top 10. This is significant for MSN because much lower results seriously increases the time taken to find what you want.

Some oddities included Yahoo having numerous entries that were highly irrelevant and MSN having a curious slant to open source results, particularly source code.