Archive for the ‘Commentary’ Category

A trip to Belfast?

My parents are missing James and John so we’re thinking of taking a short trip over to coincide with my Dad’s birthday next week.

Ordinarly, such a short time before booking the flights would mean crazy prices but, of course, we’re in the lull before Christmas and in fact the return tickets are a very reasonable £50 each including taxes for a flight from Barcelona direct to Belfast.

The snag is that James is now at school so we’ll have to have a think about that as Santa’s coming to the school sometime fairly soon and they’re in the midst of preparations for the film that they’re producing of the kids.

Copyright © 2004-2014 by Foreign Perspectives. All rights reserved.

Mixing and matching database contents

One of the perennial problems that you have when trying to use information from someone else’s database is that they never code the information in quite the same way.

If the external database is one from an unrelated company on the Internet then the only way around that is to create a little translation routine or, if you’re lucky and it’s only the names that are different, a translation table.

From a purely practical point of view, the table is the way to go if that can be accomplished and that’s what I’ve done in stage one of the roll-out of the integration of a propery feed for my listings sites. Simple things such as my use of the proper name for the Algarve (ie “Faro”) whereas they use the more popular “Algarve” are easy to allow for like this and indeed just doing that this morning as bumped up the percentage of information that I’ve been able to include quite considerably.

Why not just rename things in my own database? I could do that at the moment but the problem is that I intend to integrate other databases in due course to improve the coverage of my own site and at some point I’ll need to be able to translate terms as there’s no common usage of terms across the various databases that I’m looking for.

Where things get much more difficult is if the basic structure of the information provided by the external system is radically different from that which your own system uses and then you can potentially be talking of quite a bit of work. Unfortunately, there’s no easy way around this.

Copyright © 2004-2014 by Foreign Perspectives. All rights reserved.

Adding XML processing to the websites

Although I’ve been running database driven websites for a couple of years now what I’ve not done before is to access other peoples’ sites from my own until now.

A common way to offer people access to corporate databases via the Internet is by way of providing an XML feed. What’s XML? Well, it’s a way of holding offering both the data and the data structures via a webpage. It looks a little bit like normal HTML in that it uses the <angle> brackets but other than that it’s completely different.

The problem is that it’s a very general purpose format and not tied to any particular language. In my case, the site that I wanted to access provided examples in ASP but I use PHP so they weren’t a whole lot of use to me. Neither as it turns out was the big book on XML that I’d bought to get me on the road with the development.

However, as always there’s a lot of help around on the Internet if you look in the right places. After a few abortive attempts I found the PHP routine clsParseXML which provides a very simple yet powerful interface to XML data. Essentially what it does is to read the XML file and return it in an array or rather an array of arrays.

The database I wanted to access is essentially one large structured list of place names around the world each of which have a list of diffent accommodation at them. So, first of all I had to read the entry which listed all the regions ie Africa, Asia, Europe, etc., then choose the code for the region I was looking for and run the query again to get the countries in that region, and so on down to counties. Within the lowest level there’s a link to properties in that area requiring a whole new qyery.

Sounds very complicated, doesn’t it? Actually, it’s very simple and the high level queries run to only a few lines of code:

  • region_id=get_region_id(“0″,”Europe”);
  • region_id=get_region_id(region_id,”France”);
  • region_id=get_region_id(region_id,”Languedoc-Roussillon”);
  • region_id=get_region_id(region_id,”Pyrenees Orientale”);

Which gets me a region_id for the properties in the Pyrenees Orientale. With that I call another routine to scan through the properties in that region and return an array containing all the information of properties there.

With that, I was able to run up the HTML to integrate the properties on the external database with those from my own database thus giving, for example, the Languedoc-Roussillon page where the only way to identify the properties from the external database is by the “VR” prefix to their reference numbers.

How long to complete? Well, I started yesterday afternoon and had the test version running in a couple of hours with the live version completed in under an hour this morning. However, in reality it took much less than that as a lot of the time went in looking for that critical routine to read XML into a PHP array.

The game plan was to roll out this development to my sites listing properties around Europe but unfortunately the external database isn’t structured in the same way as my own outside France so I’ll need to run up some code to translate between the two structures first.

Copyright © 2004-2014 by Foreign Perspectives. All rights reserved.

Where are all the readers?

It’s always interesting to look at statistics on the websites. They never fail to turn up surprises.

For one thing, if you strip out ourselves, the majority of the visitors to this site are from America with the UK coming in second place. Or at least that’s what google says. For alexa on the other hand, it’s abot 35% from America and under 5% for the UK which reflects the greater use of the alexa toolbar in America as compared to the UK.

But that’s not too accurate either as the number of readers that arrive via Reuters dwarfs everything else yet isn’t counted by either of the above systems.

In theory, that means that I should be targetting the articles towards the Reuters audience but I’ve not worked out how to do that just yet (suggestions welcome!).

Copyright © 2004-2014 by Foreign Perspectives. All rights reserved.

A difference in understanding about pagerank and how that technology works

Something that’s very typical of any technology is that those producing it use some of the terms to describe it in a way that it completely at odds with the understanding of the users of that technology.

Perhaps the highest profile example around at the moment of this divergence in understanding is “pagerank” or PR. You’ll likely have seen that as a little green bar if you have the google toolbar loaded.

For google, it is a measure of the authority that they assign to each webpage on the Internet and runs from PR1 to PR10. If it’a a very new site or one that google have “issues” with then it’ll have PR0. So, a PR4 site has more authority than a PR3 site. The problem is that google measure this authority by reference to the number of sites which link to each page. Thus a PR4 page will have more links to it than a PR3 site.

However, a considerable number of people have confused the issue of “authority” with that of traffic coming to the page. So, they, by and large, assume that a PR4 page will have more traffic than a PR3 page. In fact, that’s far from always the case since at a very simplistic level you could have a PR10 site exclusively writing about, say, dust on tables and it would be the site with the most authority about dust on tables. It might get virtually no traffic though. Whereas, you could have a travel booking site with loads of traffic but relatively few links.

This difference in understanding has meant that advertisers have been willing to pay more to have things written about them on sites with high pagerank than they offer for low pagerank sites. For example, a typical article might get $10 on a PR2 site but you’d get $50 for the same article on a PR5 site. Yet, as noted, that PR2 site might well have a lot more traffic than the PR4 one does.

But google don’t want their pagerank algorithm being manipulated by those companies that buy articles and links so what they’ve done is to artificially drop the pagerank for many (but not all) of those sites which get paid to write articles. So, for instance, we see JohnChow.com now sitting on PR4 when previously he was, quite rightly, on PR6. Somehow it does seem something of a nonsense to have his site sitting on the same pagerank as mine when he quite clearly has a considerably greater amount of traffic on his site than I do and the links to go with that too.

Google people actually refer you as having broken the Terms of Service of google by taking payment for writing posts. The problem with that is that very, very few people (if any) actually have a contract with google. In fact those Terms of Service refer to the use of specific tools on google and I fail to see how a totally separate website could breach Terms of Service when it wasn’t using those tools at the time. Strangely though, the google people can’t see the problem in that stance.

I think this is something that will run for a while yet!

Copyright © 2004-2014 by Foreign Perspectives. All rights reserved.
Archives