Monday, 28 July 2008

Marginalised countries form list

I am sick and tired of not being able to select Catalonia when an Internet form asks to select my country. This is why I have had the idea of creating a country list form so everybody can suggest their 'invisible' country and I'll add them into the list. I have started by adding Catalonia, Scotland, Galicia, Basque Country, Wales, Quebec, Corsica and Tibet, but there are dozens of other countries not recognised internationally which could be inserted into the list, so please suggest some and spread the word so no country in the world is missed from this list. Please feel free to copy it and use it in your websites so everybody can select their country and are not marginalised anymore.


You can copy the code from here:


And see how it looks here:

These are the added countries:

Thursday, 10 July 2008

Mad with travelodge

I have a job interview (wish me luck) in a city of the midlands and since I have to travel from Edinburgh to there and is over 400Km of journey I will have to sleep for one night there. When I was in Inverness I slept in a Travelodge and found it to be quite good value for money. Per person it was not expensive and the quality of the room, with TV, sofa and en-suite bathroom pleased me.

So, why am I mad with Traveloge I hear you say? Well, I have been trying to book a room for two hours and I still haven't been able to do so. I have tried using Visa, Visa Electron, Mastercard, Catalan accounts, Spanish accounts, Scottish accounts and nothing. Each single time I got an error message as feedback. It has been quite fustrating. What I will do, since Travelodge doesn't love me is book with my old French buddies of the Accor group. They have never let me down before.

Friday, 20 June 2008

Lights and shadows of Firefox 3

Three days after Firefox's third version of the web browser release I think it is time to write a review about the new software. Downloading it was quite hard at the beginning, since it was released worldwide at the same time and with a lot of advertisement and expecting to achieve a world record for the largest number of downloads in 24h the servers collapsed. After three ours of failed downloads I managed to get my copy of the desired Firefox 3, but at a download rate between 5 and 20 Kb/sec, almost like when I was younger and I used a 56k modem. At least the nuisance was "worth" the wait, Firefox achieved the Guiness world record with over 8 milion downloads.

Down to the strict analysis of the software I must say the installation package (as it happened with the upgrade from 1.5 to 2.0) worked perfectly and it kept my bookmarked pages, my add-ons and even my tags intact, not a single change was made, which is great. It was also nice to have the Catalan verision of the software available from day one. I really like the default interface and I have grown accostumed to the new way tabs roll in a very short time. Navigation speed has improved as well, even though not as much in windows as it has in Linux.

But not everything is nice and I have already found several bugs. The first one is that, even though I have marked the option that warns you if you are going to close several tags from a browser window it never does. Firefox 2 worked fine with that.

One of the biggest drawbacks Firefox 2 had was the large ammounts of RAM memory it consumed, and it was announced that Firefox 3 would fix that problem. Well, it has to a certain extent, but has created a new one. I usually have between 50 and 70 tabs open at the same time, I don't like using bookmarks so I keep my favourite pages in tabs, not a good way to work but is how I do it. With so many tabs open it's ovious that the browser will have problems handling them, so Firefox 2 consummed around 400-600KB of RAM memory depending of the number and type of tags I had open. Well, Firefox 3 has decreased this ammount almost by half, now I get a RAM consumption of between 250-350KB of RAM, but I get as well 100% of CPU use. It had never happenened before to me, not even with the diabolical IE, so I'm quite upset about this fact. I cannot have Firefox turned on for a long time because if I do I may melt the CPU an wreck my computer plus it slows down the navigation speed. I hope Firefox fixes this issue as soon as possible, because this is not a new issue and I am not the only one who has this problem.

Thursday, 12 June 2008

Ireland, we count on you

We Europeans have been struggling during over 150 years to achieve what we havfe today, a welfare state with many rights for our citizens and workers. The European Union has helped to achieve this common wealth across the countries which are members. Neither Spain nor Ireland would be as wealthy as they are today if it weren't for the EU funds, so we all should praise the work the EU has done for its citizens.

Until now. The EU constitution was a rip-off which took away many of the hardly earned rights and a confirmation the EU was the Europe of the States instead of the Europe of the people. Thankfully, both France and the Netherlands voted no to it and it was dropped off the political agenda. But the EU governments hadn't said their last word and they invented the treaty of Lisbon, which is a new constitution without the name. This time, to avoid surprises as the constitution gave, they have mainly decided to vote it inside the respective parliaments, not by giving the voice to the people with a referendum. Since politicians where the ones who created the treaty the results have not surprised anybody, yes was the result in all countries. What a great example of democracy. But Ireland has chosen the truly democratic way and has organised a referendum which is being voted today. If the result is no they will stop the treaty and all the EU working class will be grateful to their Irish colleagues.

The EU is not exiting any more, a dark shadow of neo-liberalism has been put over it and it seems to have forgotten the rights and welfare of its citizens. Not only because the the constitution or the new treaty, also the new law which allows a worker to do a 65(!) hours a week schedule. Almost worse than in the 19th century. I don't feel encouraged by the EU any more.

Because we love the EU, Ireland vote no!

Update: The result has been no!

Friday, 6 June 2008

Boycott to Air Berlin

Outrageous. A shame. Unbelievable. And amongst all sad. The president of Air Berlin has written the editorial of the in flight magazine of his airline putting down my language and the language of ten million people, Catalan. The government of Majorca, one of the places where Catalan is spoken, kindly asked him if he could train his workers and adapt his services to include Catalan in the flights leaving or departing from Majorca. His answer has been to discredit and diminish Catalan language saying a bunch of lies like that Spanish language is almost banned from the public life, when everybody knows that the weak language is Catalan. What I wander is, why is this monstrosity of human being mettling in internal affairs which have nothing to do with his business? Maybe is he some kind of German Imperialist wanting to invade Majorca? And, putting myself to his same low level, is maybe an unrecycled Nazi wanting to recover the Third Reich which would include the Balearic Islands as a holiday resort? Each place has its problems and nowhere external intrusion is welcomed. You can see the article (in german) here or in Catalan here.

I shall never take an Air Berlin plane until a formal apology is made and this pillock is fired from the company. I encourage everybody with some dignity to do the same, not take any Air Berlin plane, it doesn't matter if you are Catalan, German, Scottish or French. If you want to communicate with Air Berlin to tell them how you feel about this issue e-mail them. Another option is to use the model given here (in Catalan).

Some related links in the news:
Shame on you mr. Hunold, shame on you.

Thursday, 5 June 2008

Change the attribute name of a column in ArcGIS

ArcGIS is a very useful and powerful programme, but sometimes its so complex that to do a very simple thing can become a nightmare. Today I wanted to change the attribute name of the columns of the attribute table in ArcMap because after messing around with a shapefile I had ended up with some funny names. The problem came when I tried to do it and I realised I didn't know how to change the name of the attribute. I thought that by clicking it or just right clicking I would be able to adapt the headings to my desired option. But I was wrong. I went nuts trying many options, exporting the table and open it in Excel, open it with a text editor, using SPSS,... I even downloaded the program DBF Manager to change it, but it was useless. It has been then when I have discovered how to do it.

It is very simple, you just have to go to properties in the layer menu (right click the layer name to access it):



And then go to the Field tag. You will only be able to change the alias of the table, but it should be enough because is what you see in the attribute table.


In my discharge I shall say I had found that menu at first, but when I tried to change the name, not the alias, so I thought it didn't work that way. This has been tested in ArcGIS 9.1 and 9.2

Wednesday, 4 June 2008

How to know the IP address of a visitor

Many times it is required to know the IP address of a visitor to our webpage. Among the different uses may be recording it to be able to ban a user or to personalize some web services. I will show you how to retrieve it using PHP.

You can know your IP address by creating a PHP file in your server with the following text in it:

So by adding this little piece of code to your PHP project you should be able to retrieve the IP of any visitor.

There are other functions associated to the $_SERVER array like knowing the browser used to access your webpage. This can be useful to know which is the most used browser to surf your page and design it having it in mind to benefit the majority of your visitors (some webpages look quite different depending of the browser used). You can get a full table of the different functions $_SERVER has by creating a PHP file with the following code in it (remember to open it from your server, otherwise it won't work). If you run this file from your computer you will know
everything about it and about your server.

Keep in mind that to use this you must have a server with PHP.

Tuesday, 20 May 2008

Raven, by Edgar Allan Poe


While speaking with my girlfriend about a short-stories book I remembered one of the best pieces of English literature I know of, Raven from Edgar Allan Poe. I had read a translation to Catalan before and I really liked it, but after reading the original version I am speechless. The special use of alliterations and rhymes make a very musical yet powerful poem, one you have to read on a dark night with the only light of a candle when a thunderstorm is pounding outside the window. For those who have never read it or what to read it again here is a link to it and the first paragraph so you want to continue reading.

You can find the rest of it here: The Raven

Once upon a midnight dreary, while I pondered weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door.
`'Tis some visitor,' I muttered, `tapping at my chamber door -
Only this, and nothing more.'


Tuesday, 13 May 2008

Ubuntu 8.04, at last a Linux for Windowers

Even though it was released some weeks ago I hadn't had time to install and test the new Ubuntu release known as Hardy Heron. I don't have a lot of experience working with Linux environments, I used to have Kubuntu 7 installed in my computer, but a re-installation of Windows deleted the entrance paths to it and I had to format it, but never bothered to install it again. Apart of that I have been working during the last year with a command-based Linux version -I don't know which one- at the university. The problem was that I found Windows easier to use and since I've grown accustomed to it I found Linux too much of a change.

But not anymore. In my opinion the new release of Ubuntu will be the good one to allow the transfer of users from Windows to Linux. The graphical interface is amazing, is very intuitive to use, it's available in many languages (like Catalan :)) and it comes with all the applications any standard user may need, like an Instant Messenger, Firefox 3, text processor, spreadsheet, sideshow editor, many games and a lot of other things. I have fallen in love with it. I run it from an external USB HDD and works perfectly and fast (I would like to see Windows doing the same), in fact I am typing this post in my Ubuntu environment and no problems at all.

Even though I really like it and I have good feeling about its success it still has some issues other Linux versions have, like some computers don't seem to like having Linux in them (I am lucky because mine was specifically designed to work perfectly with both OS) or that a lot of software it is still designed to work only with Windows and not with Linux. I any case, a great step forward.

You can download Ubuntu by clicking here. Here you can see a demonstration of how it looks before you choose to install it (this video uses the compiz extension, but is the same one I use and it is very easy to install):


Friday, 2 May 2008

Highlands breakdown

On Sunday we headed towards the Scottish Highlands to spend some days visiting a part of Scotland we hadn't seen yet. The trip was going great, we visited the Devil's Elbow, Balmoral Castle, Aberdeen, Peterhead and when we were heading towards Inverness we stopped for a second in Burghead, a little town close to Elgin. The exact point where we stopped can be seen in the map below. We stopped here because there is a Picti Fort right at the left. The problem is that the fort is not even ruins, it says it was a fort and you have to believe so, because there was nothing which resembled a fort.


Mostra un mapa més gran

When I tried to lock the car the central locking went on and off very fast, and when I tried to close it again the remote key didn't work. I thought it was the battery of the key, so I didn't worry about it. After seeing the grass field supposed to be a fort I headed back to the car and tried to start it. And from there everything went wrong. The car wouldn't start. I tried to push the car down a slope and start by changing gears, but it wouldn't start either. I tried for a while and when I gave up I called my road assistance service.

My road assistance is given by the Catalan company RACC and I just love the service they give, it is just awesome, I highly recommend it. They sent me two tow trucks, one to try to fix the breakdown on the spot (it was a blown fuse and he didn't have one) and another one to tow me to Inverness and to find a hotel.

When I woke up in the morning I walked to Ness Motors Inverness, the official Renault service in Inverness. When they told me they were full for the day so they could not help me, maybe the next day or the other I freaked out, I thought I would stay forever stuck in Inverness. At noon I had to buy another night in the hotel and I just didn't want to spend the whole week up there, so I phoned Ness motors every two ours begging to look at the car and fix it, because I was in a hurry and it was not a major failure. Before they closed I popped by and ask for my car. I was ready to get mad and then they gave me my car back, and fixed, I was so happy I wanted to kiss the car when I sat back in. The next day we came back to Edinburgh.

I want to finish by thanking a good Samaritan who helped me when I first realised the car was broken in Burghead. He was passing by and I asked him where could I find a mechanic. He told me the town's mechanic was closed, but a while after leaving he came back and asked us if we wanted to go spend the night at his house. I refused his offer, but I was extremely thankful to him. I don't know your name, but thank you!