Monthly Archives: June 2007

“A bear in the window” problem, revisited

Some months ago, I posted a nice problem:

I walked 10 Km to the South, then I turned left, walking straight 10 Km to the East, and then I turned again, going 10 Km to the North, directly arriving to my home. Then I opened a window, and I saw a bear in the outside. Where my house is?

EarthThe easy solution was the North Pole.

The not easy solution was… there is some Earth parallel (like the red one of the picture) with a perimeter of just 10 Km, near the South Pole (actually, 89º59′49″ S), thereby my house could be 10 Km to the North of of that parallel. In this way, I walk 10 Km to the South (arriving to the magic parallel), then I walk 10 Km to the East (doing just a full turn), and finally 10 Km to the North, returning to the same initial place.

The funny thing is that we (my flatmate and I) have discovered (by mistake) another solution…
There are more places on Earth’s surface with the same property!! A lot more!! Try to find out.

You can find the answer in the first comment of this post. A clue: Harmonics.

The struggle to getting ahead

ShapeI’m among kyus (pupils) most of the time, but sometimes I’m among dans (masters). Playing with kyus is like chatting, you don’t need to be really concentrated. But if you play with a dan, you shouldn’t loose your concentration, never. Of course, this makes the situation far more interesting. You really fight!

When you are a top kyu (my personal position), just the kiai (fighting spirit) is what defines if you are going to jump the frontier, and become a dan. The feeling of “this is NOT good enough, I should find a better result“.

Every time I have the opportunity of sitting with dans, I realized how much I still have to learn. I can understand the topics, but I try to learn all the details, as much as I can. Tireless learning is the secret weapon.

Soon I’ll beat them (if they accept to play with me, of course).

Stupid robots generating the Spanish Congress’ website

NOTICE: Find more in my tech blog:

The thing to speak about this week in Spain is the end of the football league. But I don’t follow it!!

Let’s restart: the thing to speak about this week in Spain, regarding the “web world”, is the new website of the Spanish Congress, This new version was worth a bit less than 200 thousand euros. And it’s probably the worst HTML I’ve ever seen… just thousands of lines of tag soup. Just try to see the source code (right click in the page, and “View Source Code”)… even if you don’t know anything about HTML, you can see some really weird things, like a thousand of lines of CSS definitions that are stupid. It’s quite impossible to do it worse!

The truth is that it’s quite clear that some kind of robot has generated all this tag soup. Humans are not in this magnitude of stupidity. Finally, all the government’s websites must follow (by law) standards and usability guidelines: I guess they haven’t any idea of what this really means.

“Welcome to Spain”… What a shame!

“Tomato plants” sorting algorithm

NOTICE: Find more in my tech blog:

Yesterday I was trying to program a Heapsort algorithm in C, just as a practice to remember how C was (as rough and pure as I remembered). It’s an interesting sorting algorithm, which doesn’t use extra memory, and has a good time complexity, O(n log n). In theory it is as good as the popular Quicksort, but it does have a weird behaviour with almost ordered lists (unsorting the items and resorting them later), using more time than Quicksort uses. This is the reason for its short popularity.

This behaviour has induced me to think about similarities between computer algorithms and nature algorithms. Some algorithms have somehow an inspiration from nature, like the Bubble sort which, as its name suggests, imitates bubbles inside a liquid. Others don’t reflect nature, and this maybe is not too good.

New plants growingI have a lot of tomato plants growing on my balcony. There are too many small plants. Some of them will grow quicker, stealing the soil’s energy from others. Some will not have enough energy to develop. Natural selection. Energy movements, randomness, and quicker first states remind me of something like Simulated annealing. It’s not a honest algorithm, meaning its result is not perfect, and maybe some items get better positions that they should. But it’s an interesting path to develop…

“Part of the inhumanity of the computer is that,
once it is competently programmed and working smoothly,
it is completely honest.”
Isaac Asimov

P.S: … or maybe I must keep my mind disconnected on Sunday morning, and spend the time watching some brilliant animated shorts.

The first potato!

The first potato I’m happy to announce that I’ve got the first potato of this season!

This morning I was moving my 3 potato plants into a bigger box, and I discovered one potato ready to be eaten. I hope I’ll get more and bigger ones (I’m a greedy farmer!) in the new plant box, which is actually an old aquarium that I found in the street. It doesn’t work as aquarium (because it has leaks), so I gave it a new role. The walls were covered with paper to diminish the light going into the ground. And I set a layer of stones, then one of earth and finally one with compost. Let’s see what is going to grow there!

Ubuntu rules

NOTICE: Find more in my tech blog:

I can claim:
Ubuntu is the OS with the quickest and painless installation that I’ve ever installed in a PC

· I need only some hours to install Ubuntu (with some extra programs).
· I used to need a weekend to install Windows (with the pain of looking for drivers).
· I used to need some weeks to install older Linux versions.

I’m not the kind of geek who installs the OS of his computer offen. I normally install it when it’s really necessary (normally once every 2 or 3 years). But seeing the installation of Ubuntu, I can’t understand how people still think that Linux is complicated…

Alternative ways for interviewing candidates

NOTICE: Find more in my tech blog:

Working hard in the officeNowadays almost all the companies use standard methods for interviewing candidates. They still use some common techniques like tiers of technical tests to find the perfect person… who can have an incredible CV and outstanding skills. But later he could be a complete fool, or he doesn’t fit in the company atmosphere. During my University days I saw people getting better results (than me) in the “Nets” subject, without really knowing what is an IP address! And while working in different places, I’ve seen the same: people without really good tech skills being really good coworkers (trying to learn every single day, trying to create a nice office mood…), and people with impressive knowledge avoiding to share it, or being incredibly selfish. What I’m trying to say is that maybe it’s good to do some filtering regarding technical skills, but later you must focus on testing the person, and not in testing the professional.

Example 1: could be a dream place for working. Specially if you love music, web and charts. Yesterday I was looking at their job offers and it was nice to find as a requirement: “with something that passes for music taste 😉. Brilliant!!

Example 2: Some weeks ago my manager was interviewing some candidates for an “HTML layout specialist” position. I suggested him to ask them “are you lazy?”, and they should answer “yes” because “the lazy programmers get the things done quickly, and try to do the things in a neat way, to finish quickly”. Of course it was somewhat of a joke. But he got the hidden idea. And finally we hired a chemist, with some experience in HTML Strict mode and mad as a hatter, instead of a telecommunications guy with an overfull CV (mostly filled with glossy titles) and having bad manners during the interview. Eventually, he fits perfectly in our department, so it was a good decision.