Llibre: Los Últimos Libres

Fa poc que he acabat el llibre “Los Últimos Libres” de Victor M. Valenzuela. Es pot comprar en format epub o en format paper.

M’ha agradat molt! L’autor és enginyer informàtic, el llibre és fàcil de llegir i m’ha enganxat molt. Es pot llegir en pocs dies ja que és curt i fàcil de llegir.

Si podeu done-li una oportunitat, a veure si us agrada. Va d’una parella que són informàtics i usen programari lliure.

El llibre està situat en un “futur proper” i m’ha agradat com barreja coses que passen avui dia, coses que podrien passar i coses que són més ficció. I tot té prou sentit.

London LOOP finished

Last June I mentioned in another blog post: on the last weekend of April I started the London LOOP (London Outer Orbital Circle).

In the first weekend of October I finished it! 240 Km, 15 stages (officially 23 stages but I followed a book that divided it into 15 stages).

The London LOOP has been my first hike in multiple stages. It visits different parts of Greater London. I started in spring and finished in autumn: I saw the changes in nature (especially the starting/ending point… where I was 5 months later).

Many people have asked about my favourite stage. I’m not sure which is my favourite stage… They are so different! To mention a few random good memories:

  • I walked part of the Grand Union Canal (in Uxbridge). A friend lives there and he joined me on 2 stages
  • I started (and finished!) in Cockfosters: where the Piccadilly Line trains that I use come from or go to
  • I walked through corn fields (yes, in London, just 20 minutes from an underground station there are corn fields)
  • I saw amazing views of London (from South London)
  • I walked in nice woods (I like woods!)
  • A few friends joined me on the way (thanks to all of them!)
  • I walked 20 Km. and finished near a house warming party of a friend… what a good coincidence!
  • I met Derick Rethans: a mapper from Open Street Map that we discovered on IRC that we could meet easily
  • I walked just next to Heathrow airport seeing and hearing the planes (did you know that there is a nice wood just next to Heathrow with a river?)
  • I got really exhausted in a few stages… which was rewarding
  • I went to parts of London that I wouldn’t visit otherwise: I like London and I like to discover unknown parts of London
  • I could see the Queen Elizabeth bridge from far away
  • I crossed Greenwich Meridian twice
  • I closed a circle: arriving to the same point 5 months later

The official stage number 1 (it wasn’t the first stage for me): it’s nice because I arrived Capital Ring. It’s a similar idea to London LOOP but smaller: closer to the city, shorter stages, but it seems that it goes through interesting bits of London too. So far I like it.

So, if you want: have a look at London LOOP. My favourite resources were Luphen’s webpage and Waymarked Trails.

Python UK Conference 2014: very personal point of view

Like in 2013 I attended the Pycon-UK conference in Coventry. Amazing conference, I went to many talks with different topics: Python itself, high performance Python, testing software, some more social talks, the always interesting lightning talks, etc.

I could write about many of the talks but some people are already doing it in the PostConf Wiki page.

For the second year the conference happens on the Open House London weekend (which is not great, since I have to miss it) and the conference, for second year, is on my birthday.

Last year I thought “oh no, the conference on my birthday?!”. But actually I’m getting used to it, and it’s not too bad.

I spend the birthday with some friends who come to the conference… and many other Python developers, all of them are nice. In a way, I consider the Python-UK my very personal birthday present that I buy for myself.

I also buy some chocolates to enjoy with friends. Next year I might get some more sweets to share more widely after the dinner, this year I didn’t have enough I think.

I would like to say thank you to tall the organizers, sponsors and also the delegates themselves to make this conference quite special! The fact that the schedule is on a Wiki and organized partially on the Wiki shows how open it is.

Anyway, next confirmed conference: FOSDEM!

London-Barcelona metro unexpected differences

There are many webpages talking about the London Underground. The oldest in the world, very iconical, unused stations, etc.

Here I just want to compare a few things between the London Underground and Barcelona metro.

One of the subtle differences is the escalator speed. Yes, the escalators in the London Underground are noticeably faster than the Barcelona ones. One effect is that now when I’m in Barcelona and I use an escalator I lose my balance because I expect it to be faster. I didn’t notice this when I moved to London.

Another different thing is the train frequency. In London it is much higher than in Barcelona. When I’m in Barcelona if I go to the metro and I see “6 minutes” the first thing that I think is “ohhhhhh noooooo!”. In London, in zone 1 or 2 it’s quite unusual to wait for more than 5 minutes, usually it’s 2 or 3 minutes. More than 5 minutes usually indicates that a problem has occurred (this is only usual further away from the centre).

And the last thing that I wanted to mention here is the distance between stations. In London, outside zone 1, the distance between stations is much bigger than in Barcelona. In Zone 1 the stations are ridiculously close but in zone 3 or zone 4 some stations are quite far away. One consequence is that walking between stations might take too long. Another one and with bigger impact: when there is a lot of distance trains must leave a station before the train ahead arrives at the next station. If the train ahead has a problem (a broken door, someone stuck on the door, someone needs help because feeling unwell, etc.) the train behind must wait until the issue is resolved… and the train behind must wait in the tunnel which is quite stressful.

In Barcelona because the stations are closer and the trains don’t run so frequently the trains usually don’t leave if they can’t make it to the next station, or at least this is what I’ve observed in Barcelona in the zones that I use.

If you like this topic you might this other external blog post. Since living in London I’ve also noticed quite a few things from that blogpost.

Barcelona Super Computing Centre: Mare Nostrum visits

Last month I went to Barcelona and I visited Mare Nostrum: a supercomputer in Barcelona.

For information about the Mare Nostrum you could read the Wikipedia (obviously Dr. Watson), the Barcelona Supercomputer Centre webpage (or see the photo gallery). They even have a Youtube channel with interesting videos.

Mare Nostrum is inside a building that it used to be a chapel (this is very unique among the super computers). The guided tour last a bit more than an hour. It consist on a video, see the super computer, explain a few facts, questions and answers to the engineer, another video and then there is a small museum of previous Mare Nostrum computers.

If you are or go to Barcelona it’s really interesting and worth the visit (if you are into computers).

In order to request a guided tour please visit the Visits to the BSC webpage. Enjoy!

Geek music

Helen Arney, during one of the Festival of the Spoke Nerd, sang this song:

She did amazingly, as always! I’ve talked about her here in Pintant (with a video or the Festival of the Spoken Nerd).

And another song worth a mention:

Prime numbers have always been special for me. My second webpage, in 1996, was Prime Numbers.

Related blog post (with other videos).

Recipe for a bad programming day

Do you want to have an non-productive and bad programming day? I can help you! Keep reading, be my guest. Everything will go bad, don’t worry!

First of all, and for this particular example: you need a bug. A non trivial one and a bit obscure is better. Let’s say that to test if the bug it’s fixed you need to do a few steps involving the mouse.

Recipe for the bad day:

  1. Ignore your existing unit tests. Don’t even compile them
  2. Don’t add a new unit test to reproduce the bug. Anyway, you have some steps (more or less) for this, right?
  3. Don’t think of the root of the problem. Just use the debugger and change some code here and there (try changing multiple things at the same time)
  4. Don’t think of the consequences of your changes. Just change it
  5. Use the staging servers for the testing, that ones that they are being changed too. Don’t write fake/mockups/double classes for the tests

When you are believe that everything is working: run the existing unit tests. See how a few of them fails. Start again. You can spend a full day or even more.

When tired of this programming by coincidence try a better approach:

  1. Step back and think of: what’s the root of the problem? Ask yourself “Why” a few times, not only once (5 whys?)
  2. Write a unit test that fails because this bug (this will help to understand the problem, possibly with an Eureka moment where you will see a very simple fix)
  3. Fix the problem

I still wonder why I tried the incorrect approach that day.

Telegram, Whatsapp and APIs

At Mendeley we are working on a new API and the documentation is already available at dev.mendeley.com. We think that a good API is important to promote Mendeley, create an ecosystem, help niche use cases that we could not tackle, etc.

Since January I have been using Whatsapp. It helps me to keep in contact with some friends and specially with my family. I also installed Telegram which I’ve not been using until recently when some friends from Catux Linux User Group installed it and we created a group on Telegram.

I always wished that I could use Whatsapp on the computer but this is not possible. There are no Whatsapp clients (Web or desktop applications). Whatsapp developers don’t create them, and there is no API to create them. I don’t much like typing on the mobile and many times when I use Whatsapp I have my laptop with a better keyboard just next to me.

I knew that Telegram had a public API. And yes, there is a good desktop application that also runs on Linux. So far I’ve used Telegram Desktop with great success: no problem to install or use. A friend tried the Web Telegram app and he is happy too.

Typing (swiping) on the mobile while I have a good keyboard next to me makes me sad. Now on Telegram I can use the good keyboard if I wish. Or the small.

Telegram has a few interesting features that are not available on Whatsapp: private chats, setup the notifications per group (instead of all groups), the aforementioned API, etc.

I see that some people use WeChat. This one has a Web interface too. I don’t think that it has a public API.

Seems that Whatsapp is very popular in Spain and in a few countries but other applications have better features and almost the same user interface. As always, it’s very difficult to change social applications usage.

Web Jordi Pina

Finalment el meu germà Jordi Pina també té pàgina Web!

Si algú necessita un enginyer industrial o químic que avisi.

I want this application to have this option. Found a patch. I did it 2 years ago?

Yesterday I upgraded my Debian distribution. I usually use Debian Testing but I don’t run apt-get upgrade frequently. Many years ago, when I was studying, I used to do it every day but nowadays I do it a few times a year.

Yesterday I upgraded the system and I got a new Firefox version, LibreOffice 4 (the load speed of some of my spreadsheets is much faster), systemd and many other new packages. So far so good!

I use korganizer as a calendar application (I prefer to have it locally instead of using Google Calendar). To be able to access the calendar remotely I have a small script called by cron that reads the vCalendar files that korganizer creates and prepares an HTML and CSS. The script uploads them to the server and then I can access my calendar from any browser. I can’t change it remotely but I don’t usually need to. This system might sound complicated but I like it and it’s a bit of a hobby project.

Anyway, after the system upgrade the ical2html application didn’t work anymore. I quickly realized that the script was using /usr/local/bin/ical2html binary and it couldn’t load a shared library due to the aforementioned system upgrade. I didn’t remember why I was using /usr/local/bin/ical2html instead of the Debian binary (/usr/bin/ical2html). I assumed that when I prepared this calendar system the Debian package had some problem so I downloaded a newer ical2html and installed in /usr/local/bin

Then I thought that this time I would try to use the Debian binary. I changed my script to use the /usr/bin/ical2html and it failed because the script passed the option “-m” which wasn’t recognized. I deleted the “-m” option from the script and I got the calendar in HTML as expected. But the week started on Sunday instead of Monday.

Then, what we do? Well, as a good software engineer with many years of experience in programming languages, systems, toolkits, integrations, etc. I Googled for “ical2html monday” and I found a Debian bug report #679194 that had a patch! So cool! Someone needed the same as me and sent bug report with a patch, thank you very much!

When I was reading the bug report I saw:

Locale: LANG=ca_ES.UTF-8, LC_CTYPE=ca_ES.UTF-8 (charmap=ISO-8859-15) (ignored: LC_ALL set to ca_ES@euro)

How interesting! Someone with Catalan localization sent the bug report. Who was the person? (let’s see if I know him to thank him)… I scrolled up… IT WAS ME!, 2 years ago.

I had completely forgotten. I had added the option “-m” for Mondays. I sent the patch to the original developer who I think said that he was not maintaining ical2html anymore. I sent the patch to the Debian bug report system and no-one answered. Now I applied my own patch again and I have /usr/local/bin/ical2html with -m (for Mondays) support again. Thank you Carles-2-years-ago, I really appreciate it!

This also shows that code is better released than stuck in the hard disk – in this case I probably wouldn’t have remembered it since I would have never searched on my hard disk for this patch. Even though I had it a few centimetres from me I downloaded it from the other side of the world.

Something similar has happened to me before: I sent a patch, I forgot about it. Years later I started receiving emails from some project and I didn’t know why I was receiving it. Then reading the emails I realized that someone was commenting on some very old patch for something that I wasn’t using anymore.