Patrice's Blog

This is just another blog on the web, but it's mine ;-)

Technorati Sign Up: Is it Incoherent?

Thursday, 25th of January 2007 by Patrice

When I signed up to Technorati last week, reading carefully the Sign Up form, I was quite astonished by some incoherent information! On one hand, you can read: We will never disclose your personal information to a third party, and on the other hand, you also have: Your username, first name and last name will be publicly visible on Technorati.

I am not a native English speaking guy, but I was thinking that my first name and last name were quite good examples of my personal data :-/

Digg!


Is UK part of Europe?

Tuesday, 16th of January 2007 by Patrice

For a Belgian citizen like me, the answer was obviously YES: the United Kingdom (which consists of England, Wales, Scotland - who together make up Great Britain - and Northern Ireland) is a member of the European Union. But, the other day, listening to my colleagues from UK, I was quite surprised to hear something like When I came to Europe for my holidays, ... Then, I did realise that it was maybe not as abvious as I thought, these guys for UK were talking about Europe as something they were not part of!

Finally, I got the evidence that United Kingdom is NOT part of Europe. When I was in Edinburgh last week, I had to buy a power plug adaptor (I had fogotten mine in Europe!) and here is what I read on the package:

FOR USE IN UK [...] FOR VISITORS FROM EUROPE [...]. Now, It's crystal clear ;-)

Digg!


The Best Placement for Google Ads

Tuesday, 16th of January 2007 by Patrice

You will probably not be surprised if I tell you that I have not earned a lot of money through the Google Ads placed on my blog. I would say that it is quite normal, since I do not propose huge (interesting) content yet ;-) However, I have already browse a lot about the optimisation of the placement of Goggle Ads in order to be ready when the traffic will come. Finally, the most interesting article I have found is the one from Google Ads Help: Where should I place Google ads on my pages?

This article is proposing this nice "heat map" showing that certain locations tend to be more successful than others. The colours fade from dark orange (strongest performance) to light yellow (weakest performance). All other things being equal, ad placements above the fold tend to perform better than those below the fold. Ads placed near rich content and navigational aids usually do well because users are focused on those areas of a page. It looks like this "heat map" is quite old since, for instance, the post Adsense Ads - Which Position Works Best? from the famous ProBlogger blog was written in April 2007.

Regarding the ad put within the post content, I started to use the ad format Medium Rectangle (300 x 250), but I finally decided that the smaller Button (125x125) is not more appropriate ;-)

Digg!


I Love to Play with XPath within XSL Scripts

Tuesday, 10th of January 2007 by Patrice

I am still working on the first beta version of the Krakowpat's Blogware. Unfortunately, I am not yet working within my krakowpat-blogware project on Goggle Code Project Hosting. To be honest, I have just starting to read the Subversion documentation, which is a new topic for me... I am currently using Microsoft Visual Source Safe as version control repository. Anyway, I wanted to share with you my first challenge in finding the right XPath for my main XSL script.

In one sentence, the architecture of the Krakowpat’s blogware is: A unique XML document processed by a (set of) XSL script(s). All the data of my blog are in one single XML document, and the different HTML pages you are reading on my web site are the results of its processing by (set of) XSL script(s). The general structure of the XML document looks like the following example:

<Posts>
  <Post ID="post7">This is the content of the 7th post.</Post>
  <Post ID="post6">This is the content of the 6th post.</Post>
  <Post ID="post5">This is the content of the 5th post.</Post>
  <Post ID="post4">This is the content of the 4th post.</Post>
  <Post ID="post3">This is the content of the 3rd post.</Post>
  <Post ID="post2">This is the content of the 2nd post.</Post>
  <Post ID="post1">This is the content of the 1st post.</Post>
</Posts>

First, I started to develop a XSL script to create the root index page of my blog using a XPath like:

/Posts/Post[position()<=5]

which is giving the following result when applied to the example above:

<Post ID="post7">This is the content of the 7th post.</Post>
<Post ID="post6">This is the content of the 6th post.</Post>
<Post ID="post5">This is the content of the 5th post.</Post>
<Post ID="post4">This is the content of the 4th post.</Post>
<Post ID="post3">This is the content of the 3rd post.</Post>

For the pages with individual post, I then created a second XSL script that was more or less a copy-paste of the first one, but with a XPath like:

/Posts/Post[@ID='post7']

where the string 'post7' is passed as a XSL parameter. It gives the following result when applied to the example above:

<Post ID="post7">This is the content of the 7th post.</Post>

After the completion of this 1st version of my blogware with two different XSL scripts, one to generate the index page and another one to generate the individual post pages, I found that having two XSL scripts looking the same for 99.5% of their content will be a pain to maintain! But, in order to merge the two scripts into a single one, the challenge was to combine the two XPaths described above... and I like XPath challenges!

I started with the following stupid combination, which obviously does not work:

/Posts/Post[@ID='post7' or position()<=5]

and start to thing about an elegant working solution... From this stupid combination, if you want to retrieve the result of the 2nd XPath, you need to cancel the effect of the second part of the or, which can be easily done by adding and false() to it:

/Posts/Post[@ID='post7' or (position()<=5 and false())]

On the other hand, if you want to retrieve the result of the 1st XPath, you need to cancel the effect of the first part of the or,which can be easily done by taking an @ID that does not exist in the XML document, something like 'index' for instance (in the XSL, this string is a parameter), while the and false() should be changed into and true():

/Posts/Post[@ID='index' or (position()<=5 and true())]

The elegant (and working) combination is now close. I am just missing a kind of "function" with the result false() when its parameter is an @ID that exists in the XML document, and true() when it does not exist. Indeed, we can just count the number of <Post> with the given @ID, and compare it to zero:

count(//Post[@ID='post7'])=0) is false()

and

count(//Post[@ID='index'])=0) is true()

Thus, I can finally write that, on one hand, the XPath:

/Posts/Post[@ID='index' or (position()<=5 and count(//Post[@ID='index'])=0)]

gives the same result as the first XPath:

<Post ID="post7">This is the content of the 7th post.</Post>
<Post ID="post6">This is the content of the 6th post.</Post>
<Post ID="post5">This is the content of the 5th post.</Post>
<Post ID="post4">This is the content of the 4th post.</Post>
<Post ID="post3">This is the content of the 3rd post.</Post>

while the XPath:

/Posts/Post[@ID='post7' or (position()<=5 and count(//Post[@ID='post7'])=0)]

gives the same result as the second XPath:

<Post ID="post7">This is the content of the 7th post.</Post>

The maintenance is now easier since I have only one single parameterised XSL script for the generation of the index page as well as for all the individual post pages, using the following XPath:

Posts/Post[@ID=$ID or (position()<=5 and count(//Post[@ID=$ID])=0)]

and it was good fun to find it ;-)

Digg!


How To Avoid Traffic Jam on the Brussels Ring Highway?

Thursday, 4th of January 2007 by Patrice

Of course, the title is a little bit too presumptuous. I just wanted to share with you this page, from the Flanders Traffic Control Centre, on which you can see several camera view of selected spots of the Brussels Ring Highway. I always try not to leave the office before having a look at it.

Unfortunately, the URLs of these images are changed regularly, so it is difficult to re-use them on your own web site. This is not really Web 2.0 compliant :-(

For those of you who do not know the Brussels Ring Highway, I have found the video below using Goggle Earth. You will see how long it can be for me to go back home :-/


Traffic Jam - video powered by Metacafe

Digg!


The Project "krakowpat-blogware" on Goggle Code Project Hosting

Wednesday, 3rd of January 2007 by Patrice

For the development of my blogware, i.e. the Krakowpat's Blogware, I have created a project called krakowpat-blogware on Goggle Code Project Hosting. For the moment, it is just an empty box, I will keep you posted about any progress ;-)

By the way, I was really surprised about how easy it was to create a new project on Goggle Code Project Hosting. Starting from Google Code Home, you go to the section Open Source/Project Hosting (still labeled as new while I am writing these lines), and then click on Create a new project. Then, you just have to type your (1) Project Name (consisting of a lowercase letter, followed by lowercase letters, digits, and dashes, with no spaces), (2) Summary, (3) Description, and select your (4) License. For this last selection, I was not very confortable since I am not familiar with the Open Source sphere, anywa, I have selected GNU General Public License 2.0, and I have put the reading of it in my (long) to-do list. You also have the possibility to include some optional labels, I guess they are used to index your project.

The next step is to find-out how to check-in/check-out my source files to/from Goggle Code Project Hosting. Wish me good luck...

Digg!


Which Articles Did I Print on the 2nd of January 2007?

Tuesday, 2nd of January 2007 by Patrice

Digg!


Welcome on Patrice's Blog

Tuesday, 2nd of January 2007 by Patrice

In June 2006, I discovered an offer from my internet service provider to get a free .net domain name and link it to the personal web space included in my package. I jumped on that offer and I created the "krakowpat.net" domain name. From then, there was a brilliant Hello World! default page on it.

During summer 2006, I have also started to explore the world of blogging, also called the blogosphere. I remember that I have been particularly impressed by the Washington Post article A New Model For Getting Rich Online, which explains how people can now (comfortably) live only from the money generated by advertising on their blogs. In addition to that, I also remember that the reading of this article was close to when I have heard for the first time about the incredible story of a college student who earns $1,000,000 online in just a few months with a clever idea, The Million Dollar Homepage. In other words, I have realised that it would be possible to earn some (if not a lot of) money using the internet with a null money investment, a bit of time, and some luck in order to be at the right place at the right time.

Then, I have created my Google AdSense account, followed by dozen of blogs created using Blogger.com, with no sucess in making some money :-(

Finally, I have decided to create my own blogware, and this post you are currently reading has been published with it ;-)

Digg!


 Copyright (C) 2007 by Krakowpat. All Rights Reserved.
http://