Wednesday, 16 March 2016

Plug and Play NMEA

For some time now I have been looking at how I get access navigational data for use in my spatial development. That sounds awfully grand, let's try that again!

There are instruments all over modern boats; wind speed, wind direction, depth, vessel heading, location even other vessel locations, all available over a few different communications systems with the title NMEA - Which actually stands for National Marine Electronics Association, so strictly speaking NMEA is not a type of communication, in the same way the Hoover is not is not a vacuum cleaner. It turns out the NMEA set standards for communications. At the time of writing there are essentially 3:
  • NMEA 0183 - V1 The original standard, basically RS232 at 4800 baud
  • NMEA 0183 - V4 The last of the Serial standards working at 38000 baud
  • NMEA 2000 - Essentially CAN bus
The NMEA standard does lots more than just set the protocol, it all defines the messages (or sentences) that are sent over the wire

If you have played around with serial communications before you soon realise that you can only really connect one serial device to another, you can't connect lots; as they will all talk over each other. So either you have devices with lots of serial ports (often you find displays on boats with a few inputs for NMEA) or you have instruments that daisy-chain together to pass the messages along or… you get a multiplexer.

A multiplexer acts like a hub, grouping all the serial messages together and passing them down a single port to be read by your down-stream devices, they are very clever as they buffer all the messages and group them together. However this has some problems as well.

Typically 4800 baud is fine for a single instrument, 4800 bits per second, or 600 8 bit words per second should be enough for a spinning wind vane, even with direction information. Except of course it's not just the data being sent, it's also the tags saying what sort of data. Even if that is only a few letters (e.g. HDG for heading and 180) you are talking 6 letters, plus start, end and error correction. Suddenly you are looking at tens of messages per second. A 10hz GPS updates 10 times per second for location, direction and speed. That on its own could saturate a single NMEA connection. What happens if you have many of these or are transmitting more than 1 instrument? Well the NMEA redefined things and allowed 38000 baud - or roughly 500 messages per second, which is a lot better. But you still have issues connection lots of things together and even then you can use up 500 messages fast!

CAN bus is a relatively new boy in town, it actually comes from the automotive industry as a fault tolerant, high speed communication solution for cars. The idea being you don't need to run a wire for each of the little computers in a car, you just daisy chain them all together and they will cooperate. It's a bit more complicated than that, as it is still a serial communication bus, just a more intelligent one running at up to 1mb per second - or about 128,000 messages per second. That is more like it! You only need one wire between all the instruments and you can have as many receivers or transmitters as you like!

So we have lots of ways to get the instruments to talk together, which one shall we use? Well, there is the quandary; NMEA 0183 has been around the longest and is arguably the easiest to implement, so "Low cost" instruments all use it. NMEA 2000 is obviously the best and easiest to use from user point of view, but it costs more to implement it in the electronics, so typically what you end up with is a mix of all of the protocols:
  • NMEA 0183 @ 4800 baud for depth sounders, logs, autopilot maybe GPS
  • NMEA 0183 @ 38000 baud for AIS and maybe GPS with heading sensors
  • NMEA 2000 for AIS, GPS, autopilot and modern plotters

Anyone who has tried to work with this knows how notorious NMEA 0183 can be for just not working, so I was not looking forward to trying to harvest data from all the disparate busses (busi? Bus'?)

Step up to the mark Actisense they have a range of multiplexers and NMEA bridges that link all this stuff together. I got myself an NDC-4 which lets you plug 4 NMEA 0183 devices together (configurable to 4800 or 38000 with message filtering and priority) + a USB port - which looks like a serial port to any PC. Then I got an NGW-1 which lets you communicate bidirectionally between NMEA 0183 and NMEA 2000. So I can plug the USB into almost any NMEA port. Admittedly I really ought to get the NGT-1 which plugs NMEA 2000 into USB, but all the test software I could get only really talks NMEA 0183 messages, the interface to NMEA 2000 has an SDK and has potential to be fast, but odd. So First things first, prove I can wire all the stuff together and get data!

On my desk I am looking at half a dozen flashing LEDs. I bought a NASA AIS receiver and a B&G GPS and heading sensor - So Location, speed, heading and AIS Data (AIS tells you about other vessels within VHF range at 38000 baud.) The B&G GPS is NMEA 2000 and the AIS is NMEA 0183. So I simply connected the NGW-1 (NMEA 2000 -> NMEA 0183) to the NDC-4 (NMEA Multiplexer) the instructions are in the box with lots of pictures. Remembering that transmit wires on one device connect to receive wires on the other. Then connected the power to the NMEA bus and the NDC, plugged the GPS into the NMEA 2000 bus (plus the terminators and power) and finally plugged a USB cable from the dedicated connector in the NDC-4 into my Windows 10 PC - which automatically detects the NDC as a serial port!

How do you test NMEA networks? Well there are lots of flashing LED's going on here. The handbooks tell me that there is data being exchanged. I can even put a serial port monitor on and capture text flying over the serial ports. But by far the easiest way is to run something that understands these messages. The obvious choice would be OpenCPN, an open source chart viewer with various plug-ins… Unfortunately I have never really had the patience to get on well with OpenCPN, it doesn't choose it's scale band well and the way it renders annoys me intensely. It also suffers from the traditional open-source malaise of only having the sexy bits complete. The hard bits, like declutter, error trapping and reliable import/export all have annoying issues. So I tend to fall back on a reliable (and inexpensive) paid for product, Nuno Navigator.

Nuno Navigator is written by Chersoft who also wrote the digital versions of the UK Hydrographic Office (otherwise known as the Admiralty)  SOLAS Books for radio signals, list of lights, tides and safety publications. That includes not only the user products (known as ADP and Total Tides) but also the systems used internally to manage the products, with an additional layer to license them. Underneath the Admiralty products is a very flexible rendering engine that they also use in their Leisure products - Like Nuno Navigator. I used to work for the UKHO and I have a lot of respect for Chersoft (and more importantly the guys that own and run it!) as people who not only understand their products, but also how they are used by sailors.

Needless to say I quite like Nuno Navigator. I started it up after I had plugged in the NMEA spiders-nest I had created and within a few seconds voila, I had location data and AIS data as an overlay on the chart for Southampton. This all worked first time, no trial and error - just plug and play!

The next step is to see if Signal K (an open source restful interface for marine data) is viable and allows me to do the kind of spatial logging I have planned… But that is for a later blog!

So what is the moral of this rambling blog post?
  • Using products like Actisense NDC-4, NMEA really is now plug and play, in fact it's easy!
  • Nuno Navigator just gets more and more impressive! 

Tuesday, 8 March 2016

So I Bought A Boat

Today I bought the third most expensive thing I have ever paid for… But it wasn't a house. It's funny, immediately after I say yes to any number with more than 3 zeros in it I always get that little pang of self-doubt. All the inertia leading up to the moment washes away and I am left on a little island of "You've done it now" but in this case it's a rather nice little island, with perhaps a palm tree or two.

It has been many years in the planning, a minimum of twenty years, probably closer to thirty, but I have always planned to retire, or at least stop living to work, as close to 50 as I could. I think my father first put the idea in my head and nearly every plan I have made since has involved having everything in place do that. The Mortgage will finish when I'm about 50 and the kids will all be over 18, that's the major things I suppose! I'm not 50 yet mind you, it's all in the planning.

My wife says I'm just trying to copy my dad, in a way I am; but only in the way that you would look at somebody putting their umbrella up and agree that putting on a coat might be a good idea. When my parents separated, my mother went off into Europe with my siblings, I stayed at home making a living and my father decided to buy a steel boat (from memory for about £10K) he then spent another £10K making it ocean going, then, with about £30K in the bank he set off around the world, going sort of the wrong way through the med. He never got all the way around, but he learnt a lot (some of which he told me) and he had a right giggle on the way.

Today I took my own view on my father's bright idea, I bought a second hand Ocean going cruising yacht. My take is I bought one that you could set off in immediately. I'm not going to (set off immediately that is) but I am going to use it as a base to live in whilst I work as a solution architect for Ordnance Survey in Southampton. The idea is I learn all the foibles in a nice safe mooring and get to implement all the bright ideas I've had in an environment that won't kill me! In the meantime I have a place to live very cheaply near my work place (I actually live in North Devon.)

The boat I bought is a Steel Callisto 385, I'll cover why Steel is about the best material in later posts, take it from me it is. This particular boat seems to have been owned by somebody who knew what they were doing, it's actually very difficult to find anything wrong with it; apart from being 19 years old, the previous owners meticulously took care of it, possibly too well, so everything is as original. The standing rigging for instance is original, it is in beautiful condition and fantastically well specified. But it is 19 years old. Really you should change the rig every 10 to 15 years, but the owner took such good care of it you wouldn't be able to tell it from a 5 year old rig unless you looked at the records - that may come back to bite me if the insurance company insists on a set age for the rig, or indeed just one piece has in fact worn.

The Yacht is a Bill Dixon design, built by Croft Marine. The builders went bust in the late 90's because, well, everyone was going bust then; particularly those in the luxury sector. Bill Dixon to this day is one of the worlds most respected designers. The boat itself is fantastically pretty, a round bilge design (meaning it has a smooth rounded hull, rather than the plate chines you normally get with steel.) I may actually have stumbled upon an absolute gem of a boat though, when they built the hull it was sprayed with molten aluminium inside and out, kind of like a high class galvanised coating that heals itself if it gets scratched. We could hardly find any rust on the boat at all! All over the boat everything is extremely well specified if not over specified, from water management to pumps to sails to cupboard space to cookers to heating. In fact we found it very difficult to fault the build in any way! The only areas of doubt on the whole boat were:
  • The teak decks - which had been cleaned so often they were getting too thin
  • The Sole plates (floor boards) - which for some reason were finished with linoleum rather that a nice wood
  • The instruments - which were fairly basic, I suspect because the owner actually knew how to sail properly
  • The Main in-mast furling - which can be troublesome or joyful; but are unloved by cruisers
Overall though nothing would stop you from just getting on the boat and sailing into the sunrise (must resist just a bit longer!)

Paul Fay ( helped me do an inspection after my initial viewing, he confirmed my view with proper evidence of the quality of the boat and he will be doing the full survey. Have a look at his site, he has more experience of self builds and steel boats than I care to think about and is massively pragmatic and practical. I would trust my life with him on a boat, indeed I kind of have!

I will write more as my journey progresses, in the meantime Aquamarine of Beaulieu is waiting for me to take ownership. It will be an interesting voyage.

Wednesday, 12 August 2015

The joys of Azure Site and Database Migration

Many Many moons ago... In a coastal town far away... I ran an internet café. Three C's Internet Café (Which stood for Coffee, Cocktails & Computers. Nobody got it, even though it was written in foot high letters across the front of the building!) Three C's had a web site ( which had many visitors!
I sold the internet café in 2010, they renamed it Karma Café and carried on in their own way. The website however continued, partly because I was lazy, partly because it still had many many visitors!
I decided today to migrate it off the old Rackspace hosting to Azure, this should be easy... or so I thought.
The Three C's website is very old-fashioned, a frames site using classic ASP to a little SQL Server Express database (migrated from Access) with a few JavaScript tricks and ASP hacks. Webmatrix let me migrate the site easily enough (whilst not telling me it was ignoring some of the web.config settings!) then came the joy of migrating the database.
As with all proper sites, the database server backs itself up every night (I have a series of very useful SQL Express automated backup scripts.) Normally to migrate servers I would restore one of these scripts to the server, reconnect the users and everything would be good.
Failure #1 - You cant restore a SQL database backup to Azure (bummer)
OK, try connecting from the the server using SQL Management Studio, success! Ah, but half the menu items are missing (mostly around data exporting and backups) and of course the version on my web server is SQL 2008 R2 Express, you need 2012 to get to all the toys.
Failure #2 - You need SQL Server 2012 to use all the toys.
OK, I have SQL 2012 on my local PC, restore the database locally an deploy/export it from there. Easy... Except it wont deploy, SQL Azure must have a clustered index on all tables, well it is more efficient, but it wasn't a requirement with on-prem SQL Server.
Failure #3 - You need clustered indexes on all tables with SQL Azure
This actually took me a while to solve, many solutions presented themselves.
  • Exporting the data instead (same clustered index problem)
  • Creating the tables with scripts, edited to have clustered indexes
Failure #4 - you cant have disk references in your scripts (Azure doesn't have disks in the same way as on-prem SQL Server)
  • Create the tables with scripts, modifying the Primary Keys to be clustered in scripting, then export the data with identities switched off
Failure #5 - Importing data can muck up your referential integrity (Which I guessed, I was hoping that switching off identities would help... nope!)
Inevitably I had been a good boy and used proper referential integrity. Yes this complicates the database, no I didn't want to switch it off.
  • Fix the database locally (making clustered indexes) then use the SQL 2012 Deployment wizard
Failure #6 - Exporting from access creates some read only columns (my own fault)
  • Delete the Access specific fields
Failure #7 - SQL Azure doesn't like Extended properties

It would appear that the combination of upgrading from Access to SQL Server, and then updating whenever a new version came out (in combination to masochistic tendencies) creates many extended properties on a database, in many different places, all of which need deleting :(
I found a query online that would create another set of queries to delete the extended properties:

/* This script will generate calls to sp_dropextendedproperty for every extended property that exists in your database. Actually, a caveat: I don't promise that it will catch each and every extended property that exists, but I'm confident it will catch most of them! It is based on this: by Angelo Hongens. Also had lots of help from this: by Adam Aspin Adam actually provides a script at that link to do something very similar but when I ran it I got an error: Msg 468, Level 16, State 9, Line 78 Cannot resolve the collation conflict between "Latin1_General_100_CS_AS" and "Latin1_General_CI_AS" in the equal to operation. So I put together this version instead. Use at your own risk. Jamie Thomson 2012-03-25 */ /*Are there any extended properties? Let's take a look*/ select *,OBJECT_NAME(major_id) from sys.extended_properties xp /*Now let's generate sp_dropextendedproperty statements for all of them.*/ --tables set nocount on; select 'EXEC sp_dropextendedproperty @name = '''''' ,@level0type = ''schema'' ,@level0name = ''' + object_schema_name(xp.major_id) + ''' ,@level1type = ''table'' ,@level1name = ''' + object_name(xp.major_id) + '''' from sys.extended_properties xp join sys.tables t on xp.major_id = t.object_id where xp.class_desc = 'OBJECT_OR_COLUMN' and xp.minor_id = 0 union --columns select 'EXEC sp_dropextendedproperty @name = '''''' ,@level0type = ''schema'' ,@level0name = ''' + object_schema_name(extended_properties.major_id) + ''' ,@level1type = ''table'' ,@level1name = ''' + object_name(extended_properties.major_id) + ''' ,@level2type = ''column'' ,@level2name = ''' + + '''' from sys.extended_properties join sys.columns on columns.object_id = extended_properties.major_id and columns.column_id = extended_properties.minor_id where extended_properties.class_desc = 'OBJECT_OR_COLUMN' and extended_properties.minor_id > 0 union --check constraints select 'EXEC sp_dropextendedproperty @name = '''''' ,@level0type = ''schema'' ,@level0name = ''' + object_schema_name(xp.major_id) + ''' ,@level1type = ''table'' ,@level1name = ''' + object_name(cc.parent_object_id) + ''' ,@level2type = ''constraint'' ,@level2name = ''' + + '''' from sys.extended_properties xp join sys.check_constraints cc on xp.major_id = cc.object_id union --check constraints select 'EXEC sp_dropextendedproperty @name = '''''' ,@level0type = ''schema'' ,@level0name = ''' + object_schema_name(xp.major_id) + ''' ,@level1type = ''table'' ,@level1name = ''' + object_name(cc.parent_object_id) + ''' ,@level2type = ''constraint'' ,@level2name = ''' + + '''' from sys.extended_properties xp join sys.default_constraints cc on xp.major_id = cc.object_id union --views select 'EXEC sp_dropextendedproperty @name = '''''' ,@level0type = ''schema'' ,@level0name = ''' + object_schema_name(xp.major_id) + ''' ,@level1type = ''view'' ,@level1name = ''' + object_name(xp.major_id) + '''' from sys.extended_properties xp join sys.views t on xp.major_id = t.object_id where xp.class_desc = 'OBJECT_OR_COLUMN' and xp.minor_id = 0 union --sprocs select 'EXEC sp_dropextendedproperty @name = '''''' ,@level0type = ''schema'' ,@level0name = ''' + object_schema_name(xp.major_id) + ''' ,@level1type = ''procedure'' ,@level1name = ''' + object_name(xp.major_id) + '''' from sys.extended_properties xp join sys.procedures t on xp.major_id = t.object_id where xp.class_desc = 'OBJECT_OR_COLUMN' and xp.minor_id = 0 union --FKs select 'EXEC sp_dropextendedproperty @name = '''''' ,@level0type = ''schema'' ,@level0name = ''' + object_schema_name(xp.major_id) + ''' ,@level1type = ''table'' ,@level1name = ''' + object_name(cc.parent_object_id) + ''' ,@level2type = ''constraint'' ,@level2name = ''' + + '''' from sys.extended_properties xp join sys.foreign_keys cc on xp.major_id = cc.object_id union --PKs SELECT 'EXEC sys.sp_dropextendedproperty @level0type = N''SCHEMA'', @level0name = [' + + '], @level1type = ''TABLE'', @level1name = [' + + '] , @level2type = ''CONSTRAINT'', @level2name = [' + + '] ,@name = ''' + REPLACE(CAST( AS NVARCHAR(300)),'''','''''') + '''' FROM sys.tables TBL INNER JOIN sys.schemas SCH ON TBL.schema_id = SCH.schema_id INNER JOIN sys.extended_properties SEP INNER JOIN sys.key_constraints SKC ON SEP.major_id = SKC.object_id ON TBL.object_id = SKC.parent_object_id WHERE SKC.type_desc = N'PRIMARY_KEY_CONSTRAINT' union --Table triggers SELECT 'EXEC sys.sp_dropextendedproperty @level0type = N''SCHEMA'', @level0name = [' + + '], @level1type = ''TABLE'', @level1name = [' + + '] , @level2type = ''TRIGGER'', @level2name = [' + + '] ,@name = ''' + REPLACE(CAST( AS NVARCHAR(300)),'''','''''') + '''' FROM sys.tables TBL INNER JOIN sys.triggers TRG ON TBL.object_id = TRG.parent_id INNER JOIN sys.extended_properties SEP ON TRG.object_id = SEP.major_id INNER JOIN sys.schemas SCH ON TBL.schema_id = SCH.schema_id union --UDF params SELECT 'EXEC sys.sp_dropextendedproperty @level0type = N''SCHEMA'', @level0name = [' + + '], @level1type = ''FUNCTION'', @level1name = [' + + '] , @level2type = ''PARAMETER'', @level2name = [' + + '] ,@name = ''' + REPLACE(CAST( AS NVARCHAR(300)),'''','''''') + '''' FROM sys.extended_properties SEP INNER JOIN sys.objects OBJ ON SEP.major_id = OBJ.object_id INNER JOIN sys.schemas SCH ON OBJ.schema_id = SCH.schema_id INNER JOIN sys.parameters PRM ON SEP.major_id = PRM.object_id AND SEP.minor_id = PRM.parameter_id WHERE SEP.class_desc = N'PARAMETER' AND OBJ.type IN ('FN', 'IF', 'TF') union --sp params SELECT 'EXEC sys.sp_dropextendedproperty @level0type = N''SCHEMA'', @level0name = [' + + '], @level1type = ''PROCEDURE'', @level1name = [' + + '] , @level2type = ''PARAMETER'', @level2name = [' + + '] ,@name = ''' + REPLACE(CAST( AS NVARCHAR(300)),'''','''''') + '''' FROM sys.extended_properties SEP INNER JOIN sys.procedures SPR ON SEP.major_id = SPR.object_id INNER JOIN sys.schemas SCH ON SPR.schema_id = SCH.schema_id INNER JOIN sys.parameters PRM ON SEP.major_id = PRM.object_id AND SEP.minor_id = PRM.parameter_id WHERE SEP.class_desc = N'PARAMETER' union --DB SELECT 'EXEC sys.sp_dropextendedproperty @name = ''' + REPLACE(CAST( AS NVARCHAR(300)),'''','''''') + '''' FROM sys.extended_properties SEP WHERE class_desc = N'DATABASE' union --schema SELECT 'EXEC sys.sp_dropextendedproperty @level0type = N''SCHEMA'', @level0name = [' + + '] ,@name = ''' + REPLACE(CAST( AS NVARCHAR(300)),'''','''''') + '''' FROM sys.extended_properties SEP INNER JOIN sys.schemas SCH ON SEP.major_id = SCH.schema_id WHERE SEP.class_desc = N'SCHEMA' union --DATABASE_FILE SELECT 'EXEC sys.sp_dropextendedproperty @level0type = N''FILEGROUP'', @level0name = [' + + '], @level1type = ''LOGICAL FILE NAME'', @level1name = ' + + ' ,@name = ''' + REPLACE(CAST( AS NVARCHAR(300)),'''','''''') + '''' FROM sys.extended_properties SEP INNER JOIN sys.database_files DBF ON SEP.major_id = DBF.file_id INNER JOIN sys.data_spaces DSP ON DBF.data_space_id = DSP.data_space_id WHERE SEP.class_desc = N'DATABASE_FILE' union --filegroup SELECT 'EXEC sys.sp_dropextendedproperty @level0type = N''FILEGROUP'', @level0name = [' + + '] ,@name = ''' + REPLACE(CAST( AS NVARCHAR(300)),'''','''''') + '''' FROM sys.extended_properties SEP INNER JOIN sys.data_spaces DSP ON SEP.major_id = DSP.data_space_id WHERE DSP.type_desc = 'ROWS_FILEGROUP'

It returns a series of rows that you simply copy and paste into another query window then run, which deletes all the extended properties.

Finally, run the deployment wizard - preferably with your fingers crossed!

It does run, I now have my cocktails database installed on a free instance of SQL Azure, and it is very quick! It was also very painful, I probably would have been better off re-writing from scratch and importing the data as cut and paste for this small data-set. But I've done it now, I've recorded it here and I can now do it again... Right up until Microsoft change their minds on how it works!

Wednesday, 25 February 2015

Numeric characters in circles

Having searched the web for ages (and found lots of conflicting posts) I decided to document the [ALT] key sequences for alphanumeric character enclosed in a circle:


Thursday, 31 January 2013

JQuery Sliders, Galleries and SEO

I've always had a dislike for Flash based galleries and sliders. They are awful for SEO, dire for mobile devices and a pure PITA for normal browsing as you wait for the dreaded rotating icon as they load to show you an image that would have been there in half the time!

Thankfully the death knell for Flash started well over 3 years ago and now with the advent of tablet devices, notably the iPad, we hardly see any at all. In its place we find a plethora of JQuery based galleries and sliders.

JQuery widgets were once the domain of the particularly geeky (says he writing a tech blog!) with the whole case sensitive commands and obscure, code only access that has still meant that the odd Flash Gallery got used occasionally. But easy to use libraries are now emerging; the kind of thing where you can simply put your images on a page, surround them with a <div> and call a single line of code. Hey Presto! a working gallery. To the point where even the defaults are good enough!

I have been playing with a nice JQuery gallery called Galleria. It's reasonably pretty, free (in vanilla form) and has a nice series of options (not free but good value!) that are quite worth while. It's flexible enough that I've tweaked it to be a slider as well without having to re-invent the wheel and uses a reasonable css model that you can override quite easily. Not only that they have gone for all the latest HTML5 and CSS3 trickery so its fast and kept legacy browser compatibility. Oh and it's touch compliant for mobile and tablet use!

If you dig inside the code it's really quite a clever piece of coding, with nice calls you can make after its loaded to play with the functionality and with enough documentation to get you started. I'm glad I didn't have to write it!

Now for the big question, does it have any SEO value? It's a really good question, because it is naturally assumed that JQuery is parsed by the search engine spiders. The problem is that may be true for specific JavaScript tricks and redirects, but it doesn't work for content and it doesn't count towards the ranking of your page or images. What spiders really like is ordinary HTML with ordinary Tags; like <img> or <a> There is a nice article about it Image SEO that describes what gets indexed quite well.

Modern JQuery Galleries have nice solutions to this though. As with Galleria, all you need do is use ordinary image tags on your page <img src="MyHouse.jpg"> and the JQuery will pick them up and reformat the page to make it look like a gallery. This means you can assemble your images as you would for any ordinary page and populate it as you need to for SEO.

As a quick Summary this is what most of the spiders understand. (there is a lot more, but this is the simple version!)

  • <img
    The spider now knows its an image!
  • src=""
    This is where the image is, using a full path makes life easier for the spider (and quicker)
    The usual caveats with friendly urls apply, the easier it is the more (little) marks you get!
  • alt="This is a picture of my house in Devon, it's beautiful in the sunny weather"
    Really important bit! This gives the picture context and allows good indexing and relevance. Don't just use a list of keywords, you get more marks for something that makes sense, remember the spider needs to be quick, so Keep It SimpleS. Look to get a simple sentence structure with context and include small words that won't get indexed (it's the easiest way to check if it's a real sentence)
  • title="My House"
    Apparently this isn't used to rank you result, but does help in the same way that a page title does in ordinary search results to give your image context where they may be hundreds of others.
  • >
    Don't forget to close the tag!
At the time of writing, nothing else counts in the image tag. You may find your JQuery Widget lets you use other tags as well, typically data-description or data-something which are valid HTML but are not indexed, they often control internal linking and order, so are worth doing if you want to take the time.

I will agree with the developers <img> tags with loads of attributes doesn't make for nice code, i.e.: 
<img src='images/WP_000039.jpg' data-title='Dog Washing' title='Dog Washing' data-description='This is actually our own Dalmatian, she doesn&#39;t like the bath so she is excellent practice!' alt='Dog Washing - This is actually our own Dalmatian, she doesn&#39;t like the bath so she is excellent practice!' data-thumb='images/T_WP_000039.jpg'>
JSON is a far nicer way to represent the data. 
link: '/seo',
title: 'Dog Washing'
description: '<H2>Dog Washing</H2>
<p>This is actually our own Dalmatian, she doesn&#39;t like the bath so she is excellent practice!<p>',
image: 'images/WP_000039.jpg',
thumb: 'images/T_WP_000039.jpg',
But the search engines can't read it, so avoid it, unless you specifically don't want it read by the spider. Which is often the case if it's a slider that just repeats what is further down the page.

If you do it right you will be pleasantly surprised at how fast your images appear in Google, Bing et-al. 

I've been pestering my wife to sort out her Dog Grooming Business, eventually I gave up and did a totally vanilla site and within a week the images in her little gallery started appearing in obscure Dog Grooming Searches, that's brownie points worth earning!

Wednesday, 5 December 2012

The Perils of Duplicate Content

Currently one of the most frequent questions I am asked is - Does duplicate content really matter? Just for a change I can give a definitive answer - As far as Google is concerned at the moment; Yes!

As with all these questions what is really meant is does this matter to Google and we can see from Matt Cutts blog and the Google Webmasters Blog that it's not just a myth, You will be pushed down the rankings for doing it.

Google actually identify duplicate content down to short quotes, if you don't link it to the originators site as a quote you *will* be marked down and the content will have a lower ranking in the Search Engine Results Page (SERP.) THere is a short YouTube Video about it.

Overnight this has destroyed the concept of article "syndication" where a journalist or copywriter would write an article one and send it to multiple publications, being paid for each one. I have seen writers weep, on stage as they have recanted this. I feel for them, but that's how the internet has changed life (I was fed up with reading the same article in different motoring magazines anyway!)

The problem with all of this is that it is retrospective. All those old news articles on your high authority site? check them as they can suddenly be marking you down. Those datasheets that just said what was on the main article? The old ideas that if you keep saying the same thing over and over on different pages in your site to just to drive up the rankings? Now we all knew it was 'cheating' now you get penalised for it.

A really common mistake I am coming across on even large sites is page replication across domains and URL's. I thought this was obvious and people knew, but I will spell it out... Having and as the same page is duplicate content. I have tested it, having removed the page and redirecting all the incorrect links and watched the site climb up the search rankings over the next few *days* This really seems to make a difference!

The other really simple mistake is buying all the domain names that relate to you and pointing them at your site. having the same content as *is* duplicate content! It seems really obvious, because it is! but if you must have multiple domains redirect them, better still make them relevant to the country/business type. Best advice, if the domain doesn't relate to you, don't buy it. You may not want as a porn site, but knowing that xxx is blocked as porn, do you want it pointing to your home page? Leave it alone!

If you are worried, get somebody that knows what they are doing to look at it. Just fixing the stupids will make a remarkable difference!

Thursday, 20 September 2012

Fun with Windows 8 Preview

I've spent the last few days playing with the Windows 8 Consumer Preview. Indeed I am using it now to post this entry.

I am using an Asus EP121 as a test machine:
  • 64GB hard drive
  • Additional 64GB SD Card
  • Bluetooth Keyboard (essentially a Microsoft 6000 keyboard re-branded by Asus)
  • Microsoft Arc Touch Wireless Mouse (with RF dongle)
First impressions were very good, I had more issues backing up my existing Windows 7 installation than I did installing a fresh version (Windows backup really needs to be left on it's own... Don't try and do anything whilst it's working, just be very, very patient!)

The installation itself worked flawlessly without the need for a mouse or keyboard, it picked up the touchscreen and configured itself perfectly. Several minutes later I was faced with a fresh looking 'Metro' interface, clean and uncluttered with a nice new desktop behind all using what looks like a cleaner font and nice new background images that fade in and out.

However beyond the skin things get more difficult. I needed to join my home domain; normally I do this by right clicking the computer entry on the start menu and choosing properties. But there is no start menu in Windows 8... OK, system in the control panel, um control panel is on the start menu. Choosing settings from the Charms menu (slide finger in from the right of the screen) produces no sign of the control panel. Eventually I cheated (Windows key + R -> run menu -> type control) and hey presto the control panel appears and I could choose system to join the domain. I have found since that the charms menu is context sensitive, so that when you are in desktop mode (traditional windows interface) the settings button takes you to a sub menu that does have the control panel. It is somewhat less than intuitive!

Windows 8 joined the domain fine, as usual all the homegroup stuff stops working. Many of the sample applications seem to use aspects of homegroup and library functionality mixed in with live/Xbox sign in, much of which doesn't work properly at the time of writing.

Lets see how it progresses!