May 2008

Brain dump and Email31 May 2008 at 10:40 by Jean-Marc Liotier

I work as a project manager for a very large ISP that Dilbert readers would sometimes find strangely familiar. But nothing prepared me for the shock and disbelief I experienced when some of my co-workers in the information systems division asked me why I kept sending them mail written in 10-point Courier New font whereas I was sending them plain text.

Following on their remark I soon found that many people found likewise that my messages are difficult to read because of that poor choice of font. Apparently, no one realized that plain text is rendered as whatever you want it to render as, including Fette Fraktur or even Zapf Dingbats if you fancy hieroglyphic form.

Sometimes I wonder if I am really working for an ISP. If you think that such company is an oasis of Internet culture, then if you joined one nowadays you would be sadly disappointed.

Anyway here is a tip for them, straight from the horse’s mouth :

  1. From the main Microsoft Outlook window, on the “Tools” menu, click “Options” and then click the “Mail Format” tab.
  2. Click “Fonts“.
  3. Next to the “When composing and reading plain text” box, click “Choose Font“.
  4. Select the fonts you want, and then click “OK“.
  5. Enjoy my plain text messages in your favorite font and size.

Plain text grants the recipient freedom to render as he sees fit, including in Braille or as audio speech – plain text is that flexible.

I do not have a fetish for the spartan aesthetics of plain text in green monospace font on a black text console. What I appreciate is universal portability : I can read plain text on any device in any situation and process it with any tool including old or underpowered ones – and I actually do. That is the power of plain text.

Of course, as an interpreted markup language, HTML can also be rendered in a variety of ways and I could probably use it, but plain provides even more freedom. HTML being a standard I nevertheless welcome it in my mailbox even if I seldom send any HTML mail. A good maxim to live by when you are writing anything which has to interoperate with other systems is : “Be liberal in what you receive, and conservative in what you send”. It is as old as the Internet but it’s a great way to make things highly compatible and interoperable.

Writing this rant probably dates me as a unixian dinosaur… But it could be worse : just wait until someones gets me started about proper mail quoting !

Methodology14 May 2008 at 17:45 by Jean-Marc Liotier

Youthful ignorance can be horribly embarrassing, but I hope this confession will help others follow the righteous path. I plead guilt about having in a not so distant past grossly misused Microsoft Excel for writing monster spreadsheets that really begged to be databases. When you reach Excel’s row number limit on several tabs with several occurrences of vlookup on each row, please consider it as a sign that you should reconsider your choice of tool !

This lack of judgment is so common that there are now even Excel add-in tools that mimic joins for users who can’t leave the comfort of their spreadsheets. But a better solution would be to stop being afraid of the big scary database. SQL is not that hard, and if it comes to misusing Excel and not having a MySQL server at hand you even have a credible excuse for using Microsoft Access.

Once you’ll have performed joins in a proper way and seen your files deflate a hundred fold and your query time divided by a thousand, you’ll understand how spreadsheets and relational databases are answers to different use cases – the linked article is thirteen years old but no less true today.

And to help get the message through, I coined a meme that actually seems to have found some traction in the office : vlookup is the poor man’s join !

Africa and Cycling and Economy13 May 2008 at 18:51 by Jean-Marc Liotier

Urban transport in Africa is chaotic and only getting worse by the year – degrading infrastructure, growing megalopolis and rising energy costs are not helping. I traveled in quite a few African countries and I had the dubious privilege of using public transportation such as the legendary minibuses which are a mandatory part of the African experience. At home in Paris, I mostly ride my bike. I always wonder why bike transportation is not more developed in Africa : it would be practical, sustainable and consistent with the local standard of living while extending business opportunities and access to goods and services – all while using few imported goods and mostly local workforce.

At first glance the bicycle seems ideal transportation for many in Africa cities: most are flat, trip distances are short and money for private motor vehicles and public transit systems is scarce. But generally bicycles are underutilized in Africa” writes David Mozer in “The Bicyclist’s Dilemma In African Cities”. He notes that “a survey of literature by Africa writers indicates that bicycles were a prominent mode of transport during the first half of the twentieth century. But for reasons that are not totally clear the bicycle and bicyclist don’t fare well in the contemporary Africa city. [..] Bicycles are used less in most African urban centers than in many European and North American cities. Africans show a substitution directly between walking and motor transport as income increases“.

The difference with Asia is striking. Ten years ago, at the UNCHS (Habitat) Regional Symposium on Urban Poverty in Asia, A. Rahman Paul Barter noted many differences between bicycle use in Asia and Africa : ” In most Asian cities, bicycles are within reach of many poor households and have been widely used for the last several decades (Replogle, 1992). In Asia, unlike most African and Latin American cities, bicycles are affordable even to many of those for whom public transport is not affordable (Godard, 1997; Howe and Dennis, 1993; Tiwari and Saraf, 1996)“.

The difference may have a lot to do with the presence of a deliberate industrial development policy geared towards the building of a sustainable local cycling manufacture and maintenance industry : the UNCHS paper goes on : “Several Asian countries have successfully pursued policies in the post -World War Two era which enabled a local bicycle manufacturing industry to flourish and for large numbers of affordable bicycles to be available on the local market. The main low-income examples is China but bicycle manufacturing is also significant in India and Pakistan, while earlier Japan and Taiwan also developed very large bicycle industries (Replogle, 1992). In China before 1979 bicycle ownership and production remained something of a privilege but with market reforms bicycle ownership rose steeply (Hook and Replogle, 1996). China has also long provided direct government and employer-based subsidies to workers for the purchase of bicycles (Replogle, 1992). India and China have also managed to become large exporters of bicycles. The lack of a significant domestic bicycle industry and high tariffs on imports in Bangladesh contributes to bicycles being beyond the reach of the poor in Dhaka (Gallagher, 1992). There are some examples of successful credit schemes for the purchase of non-motorised vehicles by low-income people in Sri Lanka and Bangladesh (World Bank, 1996)“.

Why African governments have disregarded the opportunity to develop a home grown light industry consistent with local manpower, local competence, local needs and ressources is a nagging question, especially since such light industry can be the seeds of an economic biotope within which more sophisticated industries can develop in a grassroots fashion.

But practical obstacles and hostile individual attitudes toward cycling are also to blame, most of them catalogued in Rahman Paul Barter’s paper. I had the opportunity to interview locals about them. The objections related to security and afford ability are easily invalidated by the fact that in many African countries light motorcycles are overwhelmingly the popular way to provide individual transportation as soon as it is within economic reach, as anyone who has ridden among the hordes of mopeds can testify.

So what remains is prejudice against human powered vehicles in general and bicycles in particular as a serious mean of transportation. As I have heard from potential users in Africa, riding a bicycle is not recognized as a dignified mean of transportation. Physical exertion being shunned, the bicycle being seen as a child toy unworthy of an adult, cycling being incompatible with the socially accepted role of women… The objections I witnessed in Africa are strangely similar to the ones I hear in Paris. And apparently they are the same elsewhere in the world. A lot of communication work remains to be done everywhere in the world so that cycling becomes a serious choice for transportation. It is sad that even where it makes the most sense and delivers the most positive externalities, cycling still needs propaganda to convince transportation users.

Of course, cycling is not a universal solution. But it is a valid tool which is currently underrepresented in the transportation mix, especially in poor countries where in many situations where it is economically and practically optimal, it is neglected for irrational reasons. I hope that African entrepreneurs will see the opportunity along with micro-credit institutions and ambitious politicians who can foster awareness initiatives.

Brain dump and Jabber and The Web09 May 2008 at 9:57 by Jean-Marc Liotier

Openness is everything – the rest is details. The technology is there and people have been talking about it for more than a year. Let’s bow to the inevitable : just as Compuserve, AOL, The Source, Prodigy and their ilk have all dissolved in the Internet, Twitter will find a decentralized replacement. And let’s make the inevitable happen by pushing XMPP !

Techchrunch reported that “over the last few days a number of popular bloggers have complained, loudly, that it’s time to ditch Twitter and move to a decentralized version of the service that won’t go down every time usage spikes“. But I could not care less about that : I am not even a Twitter user. But I think there are good uses for micro-blogging and social instant messaging, so I want a free and open solution. That means decentralization in the classical Internetworking style.

Debian and Systems administration and Unix08 May 2008 at 20:08 by Jean-Marc Liotier

After reading the USP and elevator pitch for Ack, someone took the time to review the hype and make his own opinion about ack. It appears to him that although Ack is not a drop-in replacement for Grep, the DWIM factor makes it a very interesting alternative for many situations where interactive use by a human is involved.

So I decided to give it a spin. ‘apt-cache search ack’ matched 15971 packages related to crack, backup, pack, slack and whatever else you can imagine, but an ‘apt-cache search ack | grep -E ^ack’ solved that problem at once.

In Debian, there was already a kanji code converter named “ack” – but since we don’t intend as far as I know to write Kanji anytime soon I tought it was reasonable to alias ack=’ack-grep’ so that our shell takes advantage of the short name.

After toying with it a little, it appears that Ack is indeed a handy tool which I’ll be definitely using in the future. There is a performance tradeoff when operating with the C locale, but since we strive to be an all UTF-8 shop I don’t care much about that. And anyway, in most interactive situations, brain usage and fingers motricity are far more precious ressources than run time or CPU time…

Code and Jabber and Music08 May 2008 at 2:27 by Jean-Marc Liotier

Now that in its 2.0 incarnation Ejabberd supports publish-subscribe and therefore personal eventing, it is time to play with it and demonstrate to the wider world the marvellous use-cases that the future holds. A nice first one that should be popular and therefore useful for propaganda purposes is using Psi so that contacts can see in your presence status the music that you are playing. I stumbled upon an Amarok script that notifies Psi’s through the tune file interface and lets Psi publish the currently playing song status via PEP – and it looked good.

PEP is defined “XEP-0163: Personal Eventing via Pubsub“. And Pubsub is defined by “XEP-0060: Publish-Subscribe“. So far so good. But digging around a bit I learned about “XEP-0118: User Tune” and then it dawned on me that there appeared to be room for improvement : the script outputs a composite “tune” element which is a radical simplification of the schema specified in XEP-0118.

So I had a go at modifying the script to get it as close to the specification as possible. You can judge of the resulting output for yourself : not quite XEP-0118 compliant but a good step in that direction.

The source code is available from the usual dump, but if you are an Amarok and Psi user you might actually want to use the Amarok script package that installs and runs in a coupe of clicks – thanks to the previous authors whose work I built upon.

While I was at it I discovered a bug that causes Psi 0.11 to use the element tag “source” to contain the album information, so I promptly provided the psi project team with the trivial patch needed.

It is is 3:30 AM and a few hours ago I did not realize that upgrading Ejabberd would get me that far for today…

RSS and Social networking and The Web07 May 2008 at 18:29 by Jean-Marc Liotier

I keep my regular daily reading sources in publicly available aggregator built with the excellent although not updated for a good while Gregarius. I thought it might also be useful to gather all my private feeds into another Gregarius instance for my exclusive perusal.

Kudos to LinkedIn whose “Network Updates” feeds is available through an URL with a path long enough to actually be used as a basic shared secret, which is adequate security for protecting such a low value information. This lends itself perfectly to the sort of private aggregation I want.

But no brownie points to Facebook whose behavior toward open communications never fails to disappoint. Last April, Facebook made its “Friend’s Status Updates” feed available in RSS format through the same sort of pseudo secret URL as LinkedIn. So far so good : a nice gesture of openness which made me happy when I pointed Firefox at my feed’s URL.

As I was compiling the list of feeds I was going to aggregate, I tested each of them from my web server’s Z shell to check their reachability. When I pointer ELinks at my “Friend’s Status Updates” feed URL, here is what I got :

You are using an incompatible web browser.
   Sorry, we're not cool enough to support your browser. Please keep it
   real with one of the following browsers:
     * Firefox
     * Opera
     * Safari
     * Flock

Baaad Facebook ! This is so incredibly lame : not only is it an unnecessary annoyance, but it is also completely ineffective since I’ll just have to insert a wget download in my hourly Gregarius update script and tell wget to pretend being Firefox. Gregarius will then happily download the local copy through my web server. I just tested and wget –user-agent=”Mozilla” works just fine.

Even easier : I’ll modify my local Gregarius copy so that util.php at line 539 reads “$client->agent = Mozilla;” instead of “$client->agent = MAGPIE_USER_AGENT;” so that Magpie (the RSS import library for Gregarius) tells Snoopy (the HTTP client for Magpie) to use whatever Facebook wants to hear to deliver the goods.

So Facebook :

  1. Gratuitously annoys its users
  2. Does not even do it competently

Now, isn’t it time to really open instead ?

Brain dump and Systems04 May 2008 at 15:23 by Jean-Marc Liotier

The openMosix Project has officially closed as of March 1st 2008. This brings nostalgia of the toy OpenMosix cluster I once had running for a few years, assembled using the ailing collection of dusty hardware heating my apartment and infrequently put to productive use for large batch jobs. Soon I found that a single less ancient machine could perform about as fast if not faster for less electricity, and batch jobs being what they are I could just as well let them run during my sleep. But in an age when I had more time than money (I now have neither…) and when compression jobs were measured in hours, OpenMosix was a fun and useful patch for which I foresaw a bright future.

A few years later the efficient scheduler in recent Linux releases lets me load my workstation to high values with barely any consequence for interactive tasks, so I don’t really feel like I’m starved for processing power. But I still spend too much time staring at progress bars when editing photos, so more available CPU could definitely speed up my workflow. This is why I look longingly at the servers in the corridor who spend most of their lives at fractional loads while the workstation is struggling. Manual load balancing by executing heavy tasks on remote hosts is a bit of a chore, so I go browsing for single-system image clustering news, wondering why easily pooling local system resources is not yet a standard feature of modern operating systems.

One of the major obstacles to the generalization of SSI clustering outside of dedicated systems is that software such as OpenMosix or Kerrighed require an homogeneous environment : you can’t just mix whatever hosts happen to live on your LAN. For most users, homogenizing their systems using one Linux kernel version, let alone one type of operating system is not an option.

But nowadays, virtualization systems such as Xen are common enough that they may represent a viable path to homogenization. So I envision using it to extend my workstation to the neighboring hosts. I would run the workstation as a normal “on the metal” host, but on each of the hosts I want to assist the workstation I would run a Xen guest domain running a bare bones operating system compatible with taking part in a single system image with the workstation. Adding capacity to the cluster would be as simple as copying the Xen guest domain image to an additional host and running it as nice as desired, with no impact on the host apart from the CPU load and allocated memory.

This approach looks sane to me on paper, but strangely I can’t find much about it on the web. Is there an hidden caveat ? Did I make an obviously wrong assumption ? Tell me if you have heard of other users extending their workstation with SSI using Xen guest domains on random local hosts. Meanwhile, since OpenMosix is now unsupported, I guess I’ll have to dive into Kerrighed