Monthly Archives: August 2006

Nature is the answer

NOTICE: Find more in my tech blog:

Twisted columns in Park GüellI live in Barcelona, a city marked with Gaudí’s spirit. Gaudí was a wise architect who studied shapes from nature, as a form of inspiration, and he used them to create new buildings. These shapes, like spiral, helix or hyperboloid, are not only beautiful but also interesting ways to sustain a building’s weight. Both beauty and engineering, a really good research.

This morning I was thinking about it: how can nature help us to discover new solutions? It spent millions of years fixing and optimizing common and uncommon problems, so it’s obvious that we should look at it to try to get some inspiration, some tips or clues, while trying to solve a problem. Also with Computer Science problems!

What does nature do to sort things? Maybe a new sorting algorithm is waiting to be discovered. How can DNA replicate itself with an incredible error-tolerance method, and making mutations a way to evolve? It has lots of examples to study. And you needn’t be a biologist to understand its behaviour. For example: look at the way you walk, moving your arms and legs in a curious synchronization, i.e. 4 elements moving “at the same time”. It’s probably an excellent method to save energy. Now imagine you have 4 arrays in your program, and you need to make a complex operation with them. Maybe the easiest way is to implement 4 nested loops to do this process (with a complexity of O(n^4)). But it might be a way to implement this process operating with these 4 arrays at the same time, with only a loop (O(n)!). It might be hard to find, although the result is worth the effort.

Now we are using some behaviours from nature, like neural networks and genetic algorithms, but I think we need to go further.

“Computer science is no more about computers than astronomy is about telescopes.” – Edsger Dijkstra

Holidays off

I came back to Barcelona. Holiday time was over. Again to work, to take the metro, to cross among dozens of people in the street. When I arrived I felt like empty, but in a few hours Barcelona filled me with this magic it has.

To start with, I had 3 laundries, lots of housework, a web almost finished and some meetings with friends. I spent some days doing this, and now I’m pretty free. Maybe today I can start with one of the “projects” I have in my list, from learning how to use programs (Inkscape, Gimp, Blender) to learning new programming languages (Python, Ruby).

Chair repaired and blue paintedYesterday I was cleaning my room when I looked at an old chair I have, and I thought it needs some restoration. So I started to improve its stability, holding the legs with new long screws. Later I painted the legs in blue, so the result is quite curious, as you can see in the picture. The blue paint adds more visual force to the legs, in a way that they are brighter than the rest of the parts. Funny!

The land of the fireworks

I’m spending the last week of my holidays in my hometown, Novelda. Like every summer, I got fascinated with different demonstrations of fireworks in Elche’s festivals (a neighbour city, where some of my cousins live). I can assert without doubts “this is the land of unbeatable fireworks”. I went 2 nights to watch these fireworks, and it’s quite impossible to explain. I’ll try to do it, although:

-“La nit de l’Albà” (the night of the dawn)- Imagine a city with a population of 200,000 hab. Imagine every person buying a lot of fireworks and firing them the same night, between 21:00 and 00:00. Also imagine the city council paying for more than 350 palm tree shaped fireworks, 9,000 dozens of rockets, 1,800 thunder-sounding fireworks, 500 whistle rockets, and more… and firing them in only 1 hour (between 23 and 00). The result is an astounding explosion of the senses, the whole sky full of light (and smoke from the rockets), thunder-like sounds everywhere. Next, at midnight, everything stops, the city goes dark, and from the Basilica’s tower, they launch the “imperial palm tree”, 900 rockets which fill the sky with light, covering the center of the city. Unbeatable! Every year I promise myself to come back, again, next summer. And I should record it on video!

-“Castillo final” (end fireworks’ castle)- The end event is also a demostration of fireworks, fired from a bridge. But in this case, it’s not so important the quantity, but the quality and innovation. Normally the city council hires a famous fireworks-builder family, who put the strongest effort in creating the most surprising fireworks. This year the result was amazing! Comets like fireworks, which slowly move in the sky, showing their big tail. Classical golden palm tree fireworks. A waterfall made with light sparks. Delicious to see!

Also on my holidays, I’ve had the pleasure to read some interesting texts. For example “Sock Sorting“, which explains some different sorting algorithms applied to this mundane task. Or a new idea to obtain “Power From the People“, which speaks about the way to get energy from usual actions made by the people, like crossing the subway gate.

Come back to Spain

Beach-line and pierFinally, after staying for 2 weeks in Bournemouth (UK), I came back to Spain last Saturday. This stay was like a fire-drill (or a trial-run), a way to verify my skills with English language. I was travelling alone, I met some gentlemen Go players, I studied some English, etc. The result, as you can see, is quite satisfactory. And my laptop and I overcame the horrible restrictions in British airports without problems!

The pictures!

So now I think I’m ready to work in a foreign country, outside of Spain. Beware of me! 😉

I was two weeks in UK and it never rained (but neither sunny)… and I arrived to Barcelona and it was heavily raining! Anyway I carried on travelling, to Alicante, to stay some days with my family. And the best way to start with is watching the “Nit de l’Albà” in Elche. An unbelievable demostration of fireworks; thousand of them fill in the sky 🙂 The real thing!

The curse of the men’s underwear

One of the most impossible things to find in this life is decent men’s underwear. With “decent” I mean slips or boxers which are neither flat white, nor “gay” multicoloured. Where can I find a nice green or orange slips, please?

In Barcelona I go shopping sometimes, but fashion shops don’t have a lot of options to choose from. Normally the shop space is mostly filled with ladies’ clothes, and “the rest” with men’s. In fact you usually have to go upstairs to the tiny men’s section, and look for the incredible small underwear section… where you don’t usually find anything interesting.

Today I tried to look for some underwear in UK. It was a surprise to find a shop with a big underwear section (upstairs, of course), with a 4×2 metres wall only filled with these things. Sadly, there weren’t “different” colors, but only white and black. Five shops later I didn’t find anything, still. Finally I came back without new underwear (only with a couple of egg-yellow socks).

Women, do you understand now why men don’t like to go shopping? 🙁

A curious Zen story


One day Chuang Tzu and a friend were walking by a river.

“Look at the fish swimming about,” said Chuang Tzu, “They are really enjoying themselves.”

“You are not a fish,” replied the friend, “So you can’t truly know that they are enjoying themselves.”

“You are not me,” said Chuang Tzu. “So how do you know that I do not know that the fish are enjoying themselves?”

(almost stolen from renegade Zen)

Absolutely English .vs. Holeness Spanish

English language is more formal than Spanish. You should say/write every single word of a sentence, avoiding “ellipsis” (leave out words). On the other hand, Spanish language uses a lot of ellipsis. An easy example:

“I was cooking a paella, when she saw me, and {she} asked me {if I could} teach {her how} to cook {paella}”

In English you usually say all the words, and if you forget to say one probably the other person ask you about the meaning. In Spanish you can say the previous sentence without all the braced words, and your listener will understand you perfectly. It’s an economic way to use the language, quicker; but it doesn’t mean it’s better, because we have a lot of ambiguities. Sometimes having these ambiguities causes problems, but sometimes they are usefull (when you don’t really want to say anything, or you want to hide the real meaning of something which you don’t want to show).

Anyway, this week my head is playing with the thought: “I (or we, Spaniards) do a strong use of the context information”. This is quite interesting, because I discovered a lot of situations, while speaking with English people in English, where I don’t really need to understand every single word they say. I strongly use the context information to guess, in an automatic way, what they are going to ask me. In fact, sometimes I answer instantly, without a real process of thinking and understanding. I’m not sure if this is good or bad… have I a lazy brain or a wise one? It’s disturbing when sometimes I’m not sure if the stuff I just understood comes from a good listening or from a good context guessing. How weird!!

Stonehenge, the 1st computer made by humans?

StonehengeToday I have visited Stonehenge, one of the most outstanding prehistoric monuments. I spent two hours (by bus) to arrive there, and I can say this journey is paid off. The place is really excellent for astronomy purposes, because it has a perfect horizon, without hills or mountains disturbing the skyline. You can see only some of the original stones it contained, just the stones which are still there.

They made this to establish and study the seasons. There are stones marking the position of the Sun in the different season. Nobody really knows how those humans did it, how they brought the stones from far mountains, how they put them in perfect positions. I know there are recent studies (made with the help of computers) which show an incredible variety of lines between the stones, pointing to different (and exact) positions on the horizon. Anyway it’s a really enjoyable journey for an astronomy hobbist (or ex-hobbist, as I am).

And I must say I was lucky in my visit, because some people next to the place were blowing a big balloon, and they offered a trip for free. So I took some pictures of Stonehenge from a bird’s view! Excellent!

Sometime ago I read in a humour novel about computers that said “the first computer made by humans was Stonehenge”, because (roughly speaking) it “calculates” something. So, for me, this journey wasn’t only a visit to a prehistoric monument and an astronomical place, but also a computer science and engineering construction!

Go in Bournemouth

Yesterday I had an excellent time playing Go!

I looked for some Go players in Bournemouth (where I’m staying for my holidays), and I found a phone number at the British Go Association website. I rang him and we arranged a meeting. He was totally surprised: he received a call from a player with a Spanish accent, looking forward for some games. I went to his house, and I met some local players, from 1 dan to double-digit kyus.

My first game, my presentation letter, was a chain of tough fightings! Kiai from Barcelona. “What a surprise!, normally Bournemouth players are really agressive, so it is strange to see one of them being attacked”, my host said. I played two more games, and we spoke a lot… about Go politics and such things. Surprisingly they have the same problems like us, for example, there is a really strong player in the city (I think he is 5 dan) but they avoid to see him because he belongs to a sect.

Also I promoted Barcelona’s tournament, because it’s easy to arrive from Bournemouth airport (to Girona). So maybe next year we will have some British players 🙂