Of staircases and textbooks


This week, I’m talking you about a little identity that crops up often in the study of algorithms and which isn’t found in formula compendia—anyway, none that I have. I’m talking about this function:

\displaystyle C_{n,a}=\sum_{i=1}^n i a^i

This is a variation on the Gabriel’s Staircase function that does not have an infinite number of terms. Let us solve it without supposing that 0<a<1.

Read the rest of this entry »

Code Style: Vertical vs Horizontal?


The only difference between coding styles and religion discussions is that coding styles have claimed fewer victims—at least until now. A few post back I discussed color schemes, and this week I’ll be discussing code geometry for enhanced clarity.


Read the rest of this entry »

Cargo Cult Programming (part 1)


Programmers aren’t always the very rational beings they please themselves to believe. Very often, we close our eyes and take decisions based on what we think we know, and based on what have been told by more or less reliable sources. Such as, for example, taking red-black trees rather than AVL trees because they are faster, while not being able to quite justify in the details why it must be so. Programming using this kind of decision I call cargo cult programming.


Originally, I wanted to talk about red-black vs. AVL trees and how they compare, but I’ll rather talk about the STL std::map that is implemented using red-black trees with G++ 4.2, and std::unordered_map, a hash-table based container introduced in TR1.

Read the rest of this entry »

More on ISIEA09 (and on Malaysia)


One thing I didn’t notice right away is that the number of female participants (including presenters) at the conference was very high.

In Canada and the U.S., it seems that women are not that interested in the hard sciences like maths, engineering, or computer science. And that’s not because they are kept out of those faculties; quite the contrary: there are numerous incentives and wooing programs; or that they can’t do it: they just don’t care, it seems. Women study more than men (in a 2:1 ratio in universities, at least in Québec) but they do not choose engineering, maths, or computer science; they prefer health and care studies, like medicine, social works, etc.

Here, in Malaysia, there seems to be a large number of women studying in engineering, computer science and maths; at least a great deal more than in Canada. I wonder if we could borrow their strategies to get women to be interested in engineering and sciences or if it is rather the result of a fundamental cultural difference between our two countries. I say I wonder if it’s not cultural because a large percentage of the women (but not all) wore a conspicuous hijab headscarf.

Readers, any ideas/impressions on this?

Nonce and other Frobnulated Words


Language is always fun to use to better effect, whether it is to make your point or break your adversary’s point. All natural languages are rich and contain a number of regional, rare or made-up words. French has a number of them and so does English.


Rare, nonce, or simply made-up words show up in comedy, literature, and even programming. As I am not a native English speaker (which I am sure you gathered by now by reading this blog) I do often read books about English to better my grasp of the anglo-saxon language. Not all of them too serious.

Read the rest of this entry »

Third day of ISIEA09


On this last day of ISIEA09, a lot of the participants have already left. This gives me the impression that many participants just left as soon as they had presented their paper. I feel sorry for the last presenters who spoke before almost empty rooms. I think that it is rather rude, nay, even cheap to run away as soon as your paper is presented.

Compounded with the fact that a lot of presenters didn’t even show up—there was a lot of them—the last day at ISIEA09 was rather intimate. On the good side, it meant more time to discuss between talks and some exchanges were rather good. This being said, I think ISIEA should adopt the same ‘no show’ policy other conferences have. Unless you cannot show up because some case of force majeure, your paper is withdrawn from the proceeding and you are banned from the conference for a number of years. That’s harsh, but that prevents situations where 20-25% of the speakers do not even show up.

Second day of ISIEA’09


ISIEA’09 is the most varied conference I attended so far. Usually, conferences are more or less focussed on a specific topic. Here, everything vaguely industrial is a welcome topic: one speaker discussed optimal pump control to avoid cavitation, another an automatic ablution machine using machine vision… I think this kind of conference is very stimulating because you get to discover areas of research you did not necessarily knew about.

* *

I presented my paper on the speeding up of motion estimation in video coding using SIMD instructions and approximate metrics—I will put the paper and the slides online when I return. I think the presentation went pretty well, as it drew some attention.

First Impressions on Kuala Lumpur


I arrived at Kuala Lumpur for ISIEA’09 yesterday. After a good night sleep (the trip from Montreal takes something like 28h, door to door) I set out to visit a bit. My first impression is that Kuala Lumpur is a safe city, filled with friendly people. I visited the Menara Kuala Lumpur and the Petronas Towers (although I will have to return as the skybridge was already sold out for today).

This is the second time I visit a country where I do not speak the language at all, but the people here know a little English and seem to be willing to help if they can. I like the people here. They’re polite, warm, and industrious.

The conference begins tomorrow. I am eager to see what’s hot on the Asian computer science scene—this is an Asia-centric conference, for a change.