BBC Spam

    22 Oct 2005   11:36 am

I got some BBC spam today, well actually not BBC spam, but Mentorn TV spam who are producing a TV show for the BBC, the spam is looking for people to appear on the show - it sounds like one of those crappy BBC 3 things.

The BBC say

Don’t reply, ever!
Never buy anything from a spammer. Don’t make spamming worth the effort - plus you’ll get even more spam once they know you’re willing to buy.

So I expect the BBC will be rather disappointed in the number of particpants the show gets, and will presumably be ceasing all business with Mentorn TV, which would actually be a great shame as it produces a lot of quality shows, but really that just makes it worse that they’ve descended into sending spam.


htmlnaut - foafnaut in html

    11 Oct 2005   5:36 pm

foafnaut is the SVG viewer of foaf data, unfortunately the current data doesn’t get updated as I’m trying to convince other scutter people to provide the data. I’ve just put together an HTML version, this does much the same as the SVG version, but not as impressively, there’s no sproings linking the blubs for a start. (A blub is the thing that represents a person, a sproing the line between them.)

In Internet Explorer using VML, or in Deer Park using SVG, there are sproings, the lines are drawn in. This shows very well how well mixed namespace documents can work, html is good at marking up the information panel, but atrocious at drawing the lines - especially ones that are animated. Hopefully soon Opera and Safari will get scripted SVG - Opera still has static - so I’m not going to attempt an alternative with lines for them, just wait until the UA’s catch up with the script.

The SVG version is still much richer, there’s some automatic layout to keep blubs away from each other, the dragging is more reliable, the graphics much better, but for a simple taster the htmlnaut isn’t too bad.


Annoying the Opera Gods

    01 Oct 2005   1:17 pm

I seem to have annoyed the Opera Gods, as Opera 8.5 has introduced a bug which when rendering this blog appears to push the CPU to 100% and make all the links inaccessible, I can’t seem to isolate the cause, at first because it didn’t happen on my localhost I thought it might be the 0 byte favicon.ico I have (I really do not like browsers auto-requesting favicon.ico, it’s my URI I chose what it means not you!) but that’s not it, it just seems to only happen remote. An archived version of the page can be found at /2005/10/opera-bug.html.

I couldn’t seem to isolate any other stuff, so I’ve not been able to author a workaround, if anyone can see one let me know, as I’d quite like Opera people able to follow links, if not we’ve just got to wait until Opera fix bug 182028.


RDF Parser Updated

    28 Sep 2005   1:03 am

I’ve made a couple of changes to the Javascript RDF-Parser, this was to include Opera and Safari support, based on a patch provided Gorm H Eriksen via Chaals. And to fix a couple of bugs found by Ian Dickinson related to xmlbase and some leaking of global variables.

At the same time I’ve updated the very limited documentation and included the owl:sameAs code I wrote some time ago which never made it into a “released” version, also the rdf:datatype and xml:lang support hadn’t previously been mentioned, so that’s documented too now.

If anyone is using it, good luck, and please let me know of bugs, I’ll gladly fix them!


The (current?) failure of local search

    27 Sep 2005   10:31 am

There’s lots of talk, and lots of work in the search engine world about local search, I’m sure the reason is to get more advertisers - there’s only so many people who it’s relevant for to advertise globally, or even nationally, local shops for local people however would pay for local adverts.

I wanted to find a bike shop in Kingston, so I could find one that’s likely to have a tourer as I’m thinking hard of cycling longer distances to get rid of the current fat belly (very old readers may remember me running 20:19 in the club handicap a few years back, 28:05 was my this month fat time).

One of things I knew was there was Evans cycles near the station, and there’s one just down the road from me in surbiton - a few miles from Kingston. Google local was my first choice as they put it on the map which is great. First there’s a search for Bike shop and Kingston. First up, google offers me 2 Kingston’s to disambiguate - good, but I’ve searched for stuff in Kingston before, it really should remember which Kingston I’m near, at least give me the results for upon Thames, and give a link “did you mean Kingston upon Hull” if I’ve just asked 5 minutes ago.

Telling it Kingston upon Thames I get some results. The nearest result is Action Bikes - 3.8 miles away from Kingston in Richmond, the furthest is 13 miles away in Harrow or Lewisham - neither of the two bike shops I actually know about are listed at all - this is the big failure of local search - people know their local area, they know if there’s results missing, with a web search it doesn’t matter, I’ve no idea what resources the search engine hasn’t found, but with local search I know what’s missing and I’ll get annoyed.

Yahoo doesn’t have something called a local search, but it does have a business finder which does the same job. So bike shop in kingston returns no results at all, but a suggestion to try more general words, and bike in kingston turns up a big list mostly linked to motorbikes, however there’s one on the first page and it has a link to a category cycle shops clicking on that I get a list of 4 in Kingston, no way to enlarge the area though, and it doesn’t mention the ones just outside Kingston. It also took 4 pages and thought of my search terms, much too much effort on a smartphone, and too much effort even in the office.

MSN search was just crazy bike shop in kingston tells me that “kingston” was not recognized. Please be more specific changing kingston to anything fromKingston upon Thames to Surrey or London didn’t get me anywhere at all, I always got the same message - I couldn’t find any location that it actually worked for!

The providers of business information to google and yahoo are Yell and ThomsonLocal. Yell performed the search without any problems, both guiding me through the process of narrowing down what I wanted to cycle shops, and returning me a list in Kingston and a wider area. Thomson Local however fail to map bike shop to anything about bikes, somehow suggesting I might want shop fittings, if I deliberately choose cycle shops (what I’ve learnt they want them called) then it finds them no problem.

Local search appears to have a very long way to go, and will always suffer the problem of being different to what the local person knows of their locality - if you know the chip shop has closed, you’ll be annoyed if it appears on the map, if you know the best chip shop is on the high street and there’s nothing there on the search you’ll doubt all the results. I can’t see local search being a useful feature to me, they have a very long way to go, if you have to use one though, yahoo is the way to go, even though they still haven’t bothered with a background colour.


Using SVG for paths in Google Maps with Deer Park

    07 Sep 2005   9:31 am

The Google Maps API uses VML in Internet Explorer for drawing polylines over the top of the map - for directions etc. In the other supported browsers though, it renders transparent pngs on the server, so a higher bandwidth load, and not so neat for the user. SVG shares a lot in common with VML, so I decided to see if I could hack SVG support into the Google Maps API code in the SVG Enabled Deer Park.

It was surprisingly easy, the google maps API is all in one large function and relies on a closure so modification of the functions requires you to rewrite that function. That’s simple get the source code of the string by converting the function ref to a string: GMapsNamespace+'' then you can use regular expressions to change the code.

Adding SVG support requires only 2 changes:

  • From this.createImageSegments to this.createSVGVectorSegments this was simply to make the Mozilla path call a new function, and be slightly more robust to changes than trying to replace the entire createImageSegments function.
  • Inserted a function before G.prototype.createVectorSegments that is my new createSVGVectorSegments function.
  • These changes only happen if window.SVGElement exists, which is a current way of testing for SVG support in Mozilla, it may not be future proof when Opera and Safari get scripted SVG support (Opera currently throws a strange script error stopping rendering but the nodes are added to the DOM).

The createSVGVectorSegments function:

G.prototype.createSVGVectorSegments=function(a,b,c){
 var d=this.getVectors(a,b); var e=new Array(); var f=new D();
 this.getBitmapVectors(d,e,f);
 if(!c){
	 c=new D();
 }
 var g=D.intersection(c,f);
 var h;
 if(e.length>0){
	 var i=this.map.centerBitmap;
	 var n=1; var v=1;

This is all the same as the VML version, it just gets the vectors from the polyline and does some initialisation work.

	 h=document.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\");
	 var path=document.createElementNS(\"http://www.w3.org/2000/svg\",\"path\");
	 h.appendChild(path);
	 h.style.position=\"absolute\";
	 h.style.width=\"100px\";
	 h.style.height=\"100px\";

This creates the svg element and a path element that will be the actual polyline, note the importance of using createElementNS and the SVG namespace -http://www.w3.org/2000/svg.

   var vpath=this.getVectorPath(e).toUpperCase().replace(\"E\",\"\");
	 arr=vpath.split(/[ML,\\s]+/gim);arr=arr.splice(1,arr.length-2);
	 var aminX=arr[0];var aminY=arr[1];
	 for (var zzz=2;zzz<arr.length;zzz+=2) {
		 if (arr[zzz]<aminX) aminX=arr[zzz];
		 if (arr[zzz+1]<aminY) aminY=arr[zzz+1];
	 }
	 outstr=\"M\"+(Number(arr[0])-aminX)+\",\"+(Number(arr[1])-aminY)+\"L\";
	 for (var zzz=2;zzz<arr.length;zzz+=2) {;
		 outstr+=(Number(arr[zzz])-aminX)+\",\"+(Number(arr[zzz+1])-aminY)+\" \";
	 }
	 var k=this.map.getDivCoordinate(aminX,aminY,sb);
	 h.style.left=l(k.x);
	 h.style.top=l(k.y);
	

This converts the VML path into an SVG one, and rescales it to be in a coordinate space near 0, I had to do this because of a bug in deer park where it clips to the initial viewport even if overflow is set to visible, so just translating the coordinates with a translate to bring it back to 0 didn’t work. It’s quite simple, simply loop through the path moving it by the offset of the smallest coordinate in the string. The getDivCoordinate is a Google function which converts the google world coordinates into screen px coordinates, so allows us to position the path in the right place.

	 path.setAttributeNS(null,\"d\",outstr);
	 path.setAttributeNS(null,\"opacity\",this.opacity);
	 path.setAttributeNS(null,\"stroke\",this.color);
	 path.setAttributeNS(null,\"fill\",\"none\");
	 path.setAttributeNS(null,\"stroke-weight\",l(this.weight));
 }
 return h;
}

This is just to set the last few properties on the path - this is exact same as in the VML.

And that’s it, that’s all you need to do to make your Google Maps API use SVG for polylines rather than crappy old pngs, hopefully google will soon integrate the code themselves as Deer Park moves towards release, but until then, or at least until google doesn’t break the hack somehow - which is of course extremely easy for it to do. If you want to try it out for yourself, just include the code before you call the new GMap( ... to initialise the google map.

You can also see it in action in my Exmouth to Seaton Cycle ride tracklog demo., which was what got me interested in the Google Maps API, and will be writing more on shortly…


Friendster spams and lies

    06 Sep 2005   3:09 pm

Today, I got some friendster spam, bad friendster, but not surprising social networking sites like sending spam, so I visited their privacy policy which stated that they were a licensee of the TRUSTe Privacy Program. Unfortunately this appears to be a lie, the TRUSTe people are quite confident that friendster is not a member. It appears that not only are friendster quite willing to send spam, they’re also only pretending to be members of a privacy watchdog, you can check yourself at https://www.truste.org/ivalidate.php?url=www.friendster.com.

This would be very worrying, if friendster didn’t only have information on me that is freely available in a hundred FOAF resources, but if you’ve got actual data in there, do you really want to be storing it somewhere that lies on their privacy policy? I guess I’ll just have to kill the email address friendster have on me to stop the spam…


The end of SVG Open

    20 Aug 2005   8:01 pm

I’ve just returned from a week in holland, I had a night in Amsterdam before heading off to SVG Open in Enschede, finding a hostel took quite some walking around the red light district, last time I was there, everyone seemed to think I was called Charlie, but now they just say Viagra. I’m obviously getting old…

SVG Open itself was great, but I missed the excitement of the Cricket and had to follow along the crucial last moments via IRC and delayed BBC commentary, and even then ended in disappointment for me, and joy for others

and it's a draw!
. Of course the australian joy of a draw will soon disappear come the next test, just like it did in the 2nd test.

As always at SVG Open, we had lots of great fun, and saw lots of interesting SVG stuff, unfortunately not that many photos have appeared on line yet, most disappointing, there’s definately some ones out there, even people licking pigs

The SVG Wow session was as always great, even with Vincent having to do it without Dean Jackson this year. Suns own Java mobile implementation looked really good both in that demo and Cartoon interfaces. The mobile track had lots of interesting content, and the Ikivo presentation all showed off some interesting ideas.

I was happiest to learn of GSM cell id’s which allows you to get positioning info on any Symbian 60 phone. Of course the data needs to be gathered first, just like openstreetmap or similar. Hopefully a way can be found to combine gathering and sharing of all this data people walking around with GPS’s are collecting, to help out sign the geodata pledge and the geo manifesto.

SVG Open is great fun, come along next year, it’s a great excuse to drink beer…


From Shiny to Orange…

    05 Aug 2005   10:40 pm

Fresh from my shiny experiences, I’ve now joined the Orange people. T-Mobile, who I’d happily used for years, finally sent me too many spam text messages, so I had to leave, I chose Orange, thanks to some Lobbying from a friend who wanted to go to the cinema - Orange Wednesday gives customers 2 for 1 cinema tickets for 10p sms charge, and someone else recommended the deal available.

It’s a good deal, and now aswell as my Nokia 1100, I now have a Nokia 6680, it’s a videophone, so I made my first Video call, and completely pointless it was do, I had to get dressed to make it, I had to look at the screen, rather than wander around the room, and the quality wasn’t good enough if someone was trying to show me something actually interesting. It’s unlikely I’ll ever make another video call…

The nost annoying thing about the 6680 though is that it interferes with the audio on the TV when it’s being used, it’s a cheap TV, but GSM phones don’t cause it any problems, and the 6680 in GSM mode don’t cause it a problem. I think other than when I’m using data, I may well keep the 6680 in GSM only mode, the battery life is miles better, and it doesn’t interfere with anything, I certainly wouldn’t recommend 3G for anyone else, stick with the cheaper GSM phones, smaller, neater, better battery life, and more reliable. The 6680 also comes with no games, not even snake, this has depressed me about Nokia, it looks like they’re pandering to the networks to encourage more people to buy downloaded games, they should remember who their real customers are.

Opera 8.0 and wireless IRC have been installed and are working nicely though, The Symbian Opera 8.0’s javascript support looks really good, and the xml http request object works nicely, with all the examples, including the newly added one, working well.


Wot no body { background-color:white; } ?

    24 Jul 2005   8:55 pm

Yesterday I had a good day at opentech which was good fun and met lots of intersting folk, but I missed an opportunity to ask a Yahoo Search bod - Jeremy Zawodny why their search site didn’t bother setting a background colour, so instead, I’m going to start what’s hopefully not a regular look at sites which fail…

All of the major brands on the web other than Amazon failed to do the most basic QA on their sites, and all of them suffer from developers who don’t really know the common pitfalls of designing. I don’t know why this is, but please sort it out, it really looks bad for your brand - go back to your style guides, and read the bit where it says white backgrounds…