Monthly Archives: January 2007

A better problem for my flatmate : The bear in the window

Yesterday my flatmate was complaining about my previous post. He read it, and he found the solution quite quickly… he asked for a real challenge. Then we started to comment logical problems throughout the supper. And now, I’ve prepared a big one.

“The bear in the window”
I was a bit bored at home, so I decided to have a walk. 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?

If you want to see the “easy” solution, look at the first comment. And no, there is no mistake in my walk-path. Moreover, my house is a normal house, and it’s on the surface of the Earth.

Problem: When a day is not a normal day

NOTICE: Find more in my tech blog: liopic.me.

Monday morning. I’ve just arrived at the office, and I see my first task to do: fix a bug in a calendar from one of our websites. Actually there are 2 calendars, and one calculation to show the difference in days between the two dates. Somebody discovered a weird behaviour when you select a range of days in the end of March… the difference of days is not an integer number, but a float one!

I isolated the problem, shortening the range of days, until I discovered that the problem is in the last weekend of March. From Friday 23rd to Monday 26th of March, there are 2.95 days (instead of just 3 days). What’s happening that weekend? Why is the last weekend of March somehow weird? Any idea?

If you want to know the solution, see the first comment of this post. Tip: I use a PHP function to convert the dates into integer timestamps (seconds), I substract these integers, and finally I divide by 3600*24, to know the difference in days.

Spanish Championship Finals : A psychological view

Dimas in light On the last weekend I was helping in the course of the Spanish Go Championship Finals. I went to note down the games played by the 8 candidates in my laptop. But luckily I discovered an open WiFi net, therefore I decided to broadcast in live the games, on KGS (a Go server). I was happy to see a lot of people watching my broadcast (around 30 observers in the 3rd round), and thanking me for my comments.

In my comments I didn’t focus on the board situation (I can roughly understand what a Dan player is thinking), but I described the faces of the players. In Go, as in any confrontational game, the “psychological game” has a lot of weight. Sometimes they put a stone on the board with a strong hit, remarking security or angriness; other times they put it with a calm and subtle movement, like telling you it’s not an important move (or a deep-thought one). The faces also showed the mood, the stress, the tiredness. And finally I also wrote where their eyes where looking. “Dimas is burning the board around H-6 with his eyes”, for example.

Some of the observers discovered a new way to improve in the game. And eventually they started to ask me: where is he pointing his eyes?, what can you tell us about his face?, etc.

Finally Dimas won the Finals, getting the right of a place for the next World Amateur Go Championship, in Japan. Also I have to mention Oscar, a young player (age 17), who got a place for the Korean Prime Minister Cup, in Korea, thanks to his good results in this Finals.

Finishing interesting webs

NOTICE: Find more in my tech blog: liopic.me.

In the first part of January I have been closing some projects:

In my current job I’m working in the new website of Buff, a catalan company which sells headwear. We have been publishing modules of this website for 2 months. And now it’s almost finished. One of the most interesting pages it has is the catalog section. It was like a scroll-research for me. I started programming a lot of different methods of scrolling in Javascript, and later I was watching people using the page (like an UI test or usability session), discovering the most natural way to let the user navigate thru the images. Finally I cut out the unuseful methods, leaving a fluid page.

In my spare time, since the last summer, I’ve been working on the new website of the Spanish Go Association. It’s nothing special what the public can see. But there is a CMS made with AJAX that allow the administrator to click and directly edit (“edit in place”). It was funny to discover the surprise of the people in the association comittee: “it’s deadly easy”, “great job”, “it’s going to help our work a lot”, etc 🙂 Anyway I have to refinish some details of the public website. When you are a perfectionist you cannot stop improving your creations, what a problem!