So it seems we are in the middle of the worst financial crisis we have ever faced, which was also led to an economic crisis. In addition to that, nobody knows for sure what to do to fix our Economy. Great.

Here is my proposal: require cheap-labor countries (China, Guatemala, Indonesia, etc) to give their workers the same rights and benefits they do have in our countries (European Union, USA, Canada, etc). If they don’t, heavily tax importations from those countries.

Why is that measure the solution? Read on.

This single change will for sure:

  1. Increase the production costs in cheap-labor countries
  2. Increase inflation in Occident, which now faces deflation
  3. Create jobs in Occident, as cheap-labor countries will be not-so-cheap now
  4. Create jobs in cheap-labor countries, as it will put an end to 12-hour and 14-hour workdays and require an average of 1.5 to 2 workers to perform the same work they do today
  5. Create a middle class in cheap-labor countries, thus creating “good” jobs in those countries (i. e. not just manufacturing jobs)

Not only that: this change is 100% ethical and just. Let us no longer exploit Third World countries in our benefit.

Is this protectionism? No, it is not. It is justice.

Will this destroy jobs in cheap-labor countries? No, it will not. In fact, as we would have cut shifts in half, it will create lots of new jobs in factories. Furthermore: by creating a middle-class in those countries, we will be creating a whole new kind of jobs: the same ones we have now in Occident.

Why heavily tax those importation from those countries unless they abide by this rule? Because it’s the only way to force them to abide

Won’t this make Occident’s situation even worse? Won’t this create inflation? Yes, it will create inflation. Which is exactly what Occident needs now, because Occident is facing deflation and that is really bad.

When this measure is finally adopted by every country, currently-cheap-labor countries will not be so competitive, thus creating jobs locally (i. e. in Occident). Until they do, tax them!

Will this ever be implemented? I don’t think so. A decision like this must be taken in the World Trade Organization context. It may take ten years to reach an agreement. Problem is, Occident will not be able to contain the hemorrhage for more than a year. Either the WTO fast-tracks this decision, or Occident is doomed for the next 10 years.

(English version at the end)

A lo largo de los últimos años he tenido alojado este dominio en un proveedor americano que funcionaba relativamente bien. Aunque algunos correos llegaban con retraso y tenía la sospecha de que algún correo se perdía, por falta de tiempo no había cambiado a otro proveedor. La semana pasada cambié a Google Apps for your Domain. Así, a bote pronto, veo que he perdido centenares (posiblemente miles) de correos en los últimos años. Si me has escrito y no te he contestado, no es porque sea un maleducado: simplemente es que tu e-mail no me llegó. Si me escribes de nuevo, prometo contestar.

The last few years I have hosted this domain with a ISP form the USA which worked acceptably. Although some e-mails arrived with some delay and I was suspicious some mails were getting lost, I was too short on time to find and move to another ISP (hopefully, one which would not have those problems). Last week I moved to Google Apps for your Domain. Now it’s confirmed: I have been losing hundreds (maybe thousands) for mails in the last few years. If you wrote me and I did not answer, it’s not that I’m ill-mannered: it’s just your e-mail never arrived. If you write me again, I’ll answer – I promise!.

On November 4th, the US Presidential Election was held. Once more, we were remembered of the President of the USA is not chosen directly but indirectly by the Electoral College.

I, like most Europeans, think the Electoral College method is extremely unfair. Take for example California: 55 Electoral Votes (that’s 11% of the total Electoral Votes), 17.3 million registered voters. One candidate might win the Election in that State by a single vote and still get the 55 Electoral Votes, which means 50% of the voters are totally ignored.

So, I took the data the USA Today newspaper published in their website and calculated how the Electoral Votes would be distributed if the 2008 Presidential Election would have used the D’Hondt Method. Here are my findings:

OBAMA MCCAIN
ALABAMA 6 3
ALASKA 1 2
ARIZONA 5 5
ARKANSAS 2 4
CALIFORNIA 34 21
COLORADO 5 4
CONNECTICUT 4 3
DELAWARE 2 1
WASHINGTON DC 3 0
FLORIDA 14 13
GEORGIA 7 8
HAWAII 3 1
IDAHO 1 3
ILLINOIS 13 8
INDIANA 6 5
IOWA 4 3
KANSAS 2 4
KENTUCKY 3 5
LOUSIANA 4 5
MAINE 2 2
MARYLAND 6 4
MASSACHUSETTS 8 4
MICHIGAN 10 7
MINNESOTA 6 4
MISSISSIPPI 3 3
MISSOURI 5 6
MONTANA 1 2
NEBRASKA 2 3
NEVADA 3 2
NEW HAMPSHIRE 2 2
NEW JERSEY 9 6
NEW MEXICO 3 2
NEW YORK 20 11
NORTH CAROLINA 8 7
NORTH DAKOTA 1 2
OHIO 10 10
OKLAHOMA 2 5
OREGON 4 3
PENNSYLVANIA 12 9
RHODE ISLAND 3 1
SOUTH CAROLINA 4 4
SOUTH DAKOTA 1 2
TENNESSEE 5 6
TEXAS 15 19
UTAH 2 3
VERMONT 2 1
VIRGINIA 7 6
WASHINGTON 7 4
WEST VIRGINIA 2 3
WISCONSIN 6 4
WYOMING 1 2
TOTAL D’HONDT 291 247
TOTAL ELECTORAL COLLEGE 364 162

Obama still wins, but instead of a 364 vs 162 advantage (202 votes), he only has a 291 vs 247 votes (44 votes). Given that 270 Electoral Votes are needed to be President, the D’Hondt method would make a fundamental difference.

It is interesting to note that even thought the other candidates (Nader, Barr, Baldwin, McKinney and Paul) do not win any Electoral Vote using the D’Hondt method with the current vote count, one can safely assume this is because voters knew very well with the Electoral College method Nader, Barr, etc had no real chance of winning. If the Election method would be changed to the D’Hondt method, or any other proportional method, Nader, Barr, etc would have the chance to win some votes, and more people would have voted for Nader, Barr, etc.

This is a common mistake I see every time an English speaker tries to speak Spanish, or a Spanish speaker tries to speak English.

  • Mister = Seņor
  • Sir = Caballero

When in English you would say “Sir, your umbrella”, do not say “Seņor, su paraguas” but “Caballero, su paraguas”. Also, never say “Gracias, seņor” for “Thank you, Sir” but just a plain “Gracias”.

I received an invitation to Shapeways, a 3D printing service. How it works is easy: you upload a 3D model (X3D, COLLADA or STL) and they use a fancy 3D printer to produce a stereolithography in the material you choose (there are 4 options as of now), which is sent to you in 10 working days.

Obvious uses of this service: produce the coolest and greatest anime or RPG miniatures

Not-so-obvious uses of this service: build impossible to find pieces for home appliances, vintage computers or anything else you can think of.

It’s been painful, but I’ve finally upgraded to WordPress 2.6 from 1.2.2. I’ve needed to go all through 1.2.2 to 1.5, 1.5 to 2.0, 2.0 to 2.1, 2.1 to 2.2, 2.2 to 2.3, 2.3 to 2.5 and 2.5 to 2.6. And I took a DB backup each time in case it failed!

The jump from 2.1 to 2.2 was painful due to the UTF8 issue. I tried to fix that using this helper script but it didn’t work and in the end, I found an easier fix: instead of converting my database to UTF8 and have have this wp_config.php

define(‘DB_CHARSET’, ‘utf8’);
define(‘DB_COLLATE’, ”);

I did the exact opposite: I kept my database as latin1_swedish_ci and changed wp_config.php to read

define(‘DB_CHARSET’, ”);
define(‘DB_COLLATE’, ‘latin1_swedish_ci’);

The upgrade from 2.3 to 2.5 was also painful: the public blog worked fine but I was not able to log in to the site admin interface, there was an infinite redirection loop to /wordpress/wp-admin. I was left with only two options: move restore the WordPress 2.3 DB backup and reinstall WordPress 2.3, in the hope of finding what was wrong, or move forward to WordPress 2.6 and cross my fingers hoping that it’d work. I did the latter and I’m fortunate it has worked, yay!

ffmpeg has been able to record a screencast on X11 for a long time now, using the x11grab input format and the :0.0 device (for the first instance of X). You’d run
ffmpeg -f x11grab -y -r 12 -s 800x600 -i :0.0+480,200 -vcodec ffv1 -sameq ./out.avi
and get a lossless video of the upper right 800×600 area of a 1280×800 desktop. Easy. You could even transcode to a lossy format (such as H.264, Xvid or Theora) if you had a powerful machine.

On Windows it was not that easy. First of all, Windows is not X11, so x11grab does not work on Windows. You need to use GDI or DirectX but ffmpeg did not have support for GDI or DirectX capture. If you wanted screen-grabbing features in you application, either you developed your own solution (ugly, specially because of the video encoding part) or you used Camtasia Studio (Wink does not include a DLL or ActiveX component you can use in your app).

Ramiro Polla and Christophe Gisquet had a heated discussion about one and a half years ago and some very interesting code was shown. Unfortunately, neither Ramiro’s nor Christophe’s code would work with current ffmpeg.

Today I’ve finally brought Ramiro’s code up to date and it works with ffmpeg trunk. It is not perfect, though: it does not capture the mouse pointer, contextual menus shown as a result of a right-click and video scaling and color is not perfect (ffplay shows the video a little blue-ish). Patch. I’ll try and bring Christophe’s code up to date tomorrow, or fix Ramiro’s code.

PS: A request for ffmpeg developers: please, replace your custom configure script with some cross-platform build system. I like CMake but Scons, Waf and others would also do.

On Wednesday July 23rd I’ll try and upgrade my blog from the ancient WordPress I’m using (1.2.2) to the latest and newest one (2.6). I expect the transition NOT to go smoothly due to the many antispam customizations I made to WordPress 1.2.2, so downtime might be long.

Yesterday was a very kitchen-intensive day: about 10 hours baking pastries: muffins (magdalenes in Catalan), tarts (coca de la calda), eggrolls (rotllos d’ou; not Chinese/Korean eggrolls!) and almojāvenes (although here we do not add cheese to the recipe). It was a hard work but I’ve got breakfast and tea snacks for one month 🙂