October 2007


PHP and Systems19 Oct 2007 at 10:12 by Jean-Marc Liotier

PHP :

  • Sparkline is a PHP library that produces Edward Tufte inspired “intense, simple, wordlike graphics”. I like the way sparklines spruce up text without interrupting its flow.
  • Libchart is a simple PHP charting library that reminds me of the core functionality of the Jpgraph. Simple to deploy and does the basics well.
  • Jpgraph can be used to create numerous types of graphs either on-line or written to a file. The range of functionality is very impressive and new features get added all the time. But basic use remains simple. Jpgraph is used by many Free software projects such as Mantis.
  • PEAR::Image_Graph was formerly known as GraPHPite. It supports a good choice of graph types, five types of data sources and many output formats.
  • Artichow is yet another small PHP charting library. Functionality is limited but it does look clean. The downside is that everything about it is in French… But that may be an upside if you are a French speaker !

Command-line and CGI :

  • Ploticus provides a C and Python API, and a Perl command line that can be called from CGI. It is a mature solution that is no longer on the cutting edge but still satisfy many users.

DHTML and Javascript :

  • Timeplot is a DHTML-based AJAXy widget for plotting time series and overlay time-based events over them (with the same data formats that Timeline supports). It has limited functionnality, but what it does looks very good and easy to integrate.
  • Plotkit is aimed at web applications that require plotting series of data in modern web browsers. It requires MochiKit and supports HTML Canvas and SVG, which makes it a cutting edge way to render graphics. It supports graphing from a dynamic table.
  • Plotr is a fork of Plotkit with no need for MochiKit. The result is an incredibly lightweight charting framework : only 12 KB !

Multiplatform :

Systems17 Oct 2007 at 11:49 by Jean-Marc Liotier

A new job generally mean a new computer. In most old big companies, a computer is still synonymous with having to suffer using Microsoft Windows. But despair not : a good selection of additional software will make Windows more functional and your workstation experience more bearable.

Here is a list of the ones I setup most of the time. It covers most of the indispensable everyday utilities :

Jxplorer LDAP client
Filezilla FTP client
Xchat IRC client
Notepad++ text editor
Psi Jabber client
Putty SSH client
WinSCP SCP client
Irfanview image viewer
PalmOne Palm Desktop
Virtual Dimension virtual desktop
Winmerge diff and merge utility
7zip archive manager
Mozilla Firefox Web browser
VMware player
Foxit PDF reader
Tortoise SVN client
Thunderbird mail client
Kompozer HTML editor
Unison file synchronization tool
AdAware system cleanser
Gimp image editor
Openoffice suite
GPG4Win
Tora Oracle SQL client

Of course that will not get you anywhere near as far as a half decent setup of Ubuntu or Debian, and once you will have hunted down, downloaded and installed each of those independant packages with no centralized package management you will have a much better understanding of what super cow powers are all about. But at least it is a start and you can quite comfortably survive with that kit.

As a bonus, here are the few useful Thunderbird that I use all the time :

Attachment Extractor
Headers Toggle
Rewrap Button
Remove Duplicate Messages
Enigmail

Africa and Music15 Oct 2007 at 20:07 by Jean-Marc Liotier

Sorting old papers I stumbled upon a note I had taken while underway in Zimbabwe. It is the lyrics of a Shona lullaby. My phonetic transcription was like this – Elisabeth posted a comment with a corrected transcript :

Shiri yakanaka unoendepi ?

Huya, huya, huya titambe

Ndiri kuenda kumakore

Kuti ndifanane nemakore

I have not found those lyrics anywhere else on the web, but I was told this song is a classic for many children. I don’t remember the exact meaning of the song – the closest thing I have to a translation is on the BBC Radio 3 site where a Zimbabwean mother explains :

‘Here’s your nice bed’ (you will be imagining there’s a bed flying up in sky) ‘Hey nice bed where are you going? Please, come to me, Come let’s play together.’ And the bed will say ‘Oh no, I’m going into the clouds I want to be as nice as the clouds.’

Now you better have a good answer ready for when your kids ask you why the bed goes flying into the clouds… Until then you an go to the BBC Radio 3 site to listen to the tune from a recording of that woman singing Shiri Yakanaka !

I sang that to my daughter when she was a baby a few years ago, and it worked like a charm…

Music and Systems13 Oct 2007 at 17:24 by Jean-Marc Liotier

This took me a ridiculous chunk of afternoon to solve, and the solution was surprising to me. So I guess a full report will be useful to spare other users the same process…

Symptoms :

  • You mount a share with music files over SMB or CIFS. With a file browser you can navigate the tree, and you can play the files perfectly.
  • You add local music files to your Amarok collection, they appear and Amarok is fully functional.
  • You add the mount point of the network share to your collection. You then update or rescan your collection.
  • At some point during the scan, a notification pops up with the message : “The Collection Scanner was unable to process these files“. Once you acknowledge the notification, the scan halts and no files appear to have been added to the collection. As a bonus, KNotify may crash with signal 11 (SIGSEGV).
  • On the Samba file server, a ridiculously high number of files is opened. So many that on the client if you try even a ‘ls’ anywhere on the mounted share you will get a complain about “too many files opened”. In normal operation, Amarok only opens one file at a time during a scan.
  • Desperate, you try exiting Amarok. It crashes hard on termination and brings down the whole X session along with him.
  • You are pretty pissed off.

In summary, both sides work perfectly fine individually, but trying to get them to work together fails and there are no useful pointers.

Failing to root out the bug and not finding anything obvious on the Web I headed to the Amarok forums. There I quickly found that about each and every thread mentioning Samba ended with a link to the Samba page of the Amarok wiki. I found the content to be basic and apparently completely unrelated with my problem, but reading between the lines I understood the key to the solution…

If you have read and write rights on a share, there are probably no problems any way you put it. But if you only have read rights on the share and mount it read and write, then Amarok is all confused ! That is what was happening to me.

A few days ago, before letting a novice user play music on my workstation , in order to protect the files from harm, I had quickly removed my username from the write list of the music share on the file server. And I had forgotten about that…

So I went back to faulty /etc/smb.conf and I added my username to the “write list” parameters. I reloaded the Samba configuration, launched Amarok, the collection was automatically rescanned and my world was back to harmony.

Let the music play !

Military and Politics11 Oct 2007 at 14:11 by Jean-Marc Liotier

The Economist has just concluded a series of detailed articles on terrorism and civil liberties (1, 2, 3). I have been particularly touched by how the editorial introduction to the series has made an essential point in a stunningly courageous way :

“[..] We accept that letting secret policemen spy on citizens, detain them without trial and use torture to extract information makes it easier to foil terrorist plots. To eschew such tools is to fight terrorism with one hand tied behind your back. But that—with one hand tied behind their back—is precisely how democracies ought to fight terrorism. [..]

Human rights are part of what it means to be civilised. Locking up suspected terrorists—and why not potential murderers, rapists and paedophiles, too?—before they commit crimes would probably make society safer. Dozens of plots may have been foiled and thousands of lives saved as a result of some of the unsavoury practices now being employed in the name of fighting terrorism. Dropping such practices in order to preserve freedom may cost many lives. So be it”.

Considering the care that the editors of The Economist usually take in exercising opinions, such bold stand against the way we currently fight against terrorism has taken me by surprise. And it expresses better than I so far managed to conceive the profound reason why, in the fight to uphold our values, letting the ends justify the means is counter-productive : you cannot fight in the name of your own values if you sell your own soul.

Different regimes have different constraints, choosing democracy comes with specific ones and acting within them is the price we must keep paying without reneging. If we don’t we are just loosing ourselves and there will only be pyrrhic victories.

Brain dump and Military and Politics10 Oct 2007 at 20:53 by Jean-Marc Liotier

The song “Guantanamera” is such an omnipresent timeless classic tune that the mere mention of it immediately recalls its irresistible groove in anyone. But Guantanamo is now a name draped in an infamy that may well become just as famous as the song. So since a couple of years, every time I think about that song I can’t help but associate the concepts.

Now I want you to associate them too ! Every time you hear that song I want you to think about all the losers imprisoned in Camp X-ray without cause. Think about how arbitrary arrest, indefinite detention without trial, extraordinary rendition and suspension of habeas corpus are actually sapping at the foundation of the very freedom that our democracies are supposed to uphold.

Yo soy un hombre sincero
De donde crece la palma
Y antes de morirme quiero
Echar mis versos del alma

Guantanamera, guajira Guantanamera (..)

I am a sincere man
From where the palm tree grows
And before dying I want
To let out the verses of my soul

Peasant girl from Guantanamo (..)

Mi verso es de un verde claro
Y de un carmín encendido
Mi verso es un ciervo herido
Que busca en el monte amparo

Guantanamera, guajira Guantanamera (..)

My verse is light green
And it is flaming red
My verse is a wounded stag
Who seeks refuge on the mountain

Peasant girl from Guantanamo (..)

Cultivo una rosa blanca
En julio como en enero
Para el amigo sincero
Que me da su mano franca

Guantanamera, guajira Guantanamera (..)

I grow a white rose
In July just as in January
For the honest friend
Who gives me his open hand

Peasant girl from Guantanamo (..)

Con los pobres de la tierra
Quiero yo mi suerte echar
El arroyo de la sierra
Me complace más que el mar

Guantanamera, guajira Guantanamera (..)

With the poor people of the earth
I want to cast my lot
The brook of the mountains
Gives me more pleasure than the sea

Peasant girl from Guantanamo (..)

When I started writing this post five minutes ago, I thought I was the only one to have thought of using that song as a symbol… But as usual in the global memetic ocean, like-minded individuals exposed to the same set of stimuli will produce the same response – so much for my delusion of being creative… Shortly after starting researching some context for this article I stumbled about the most unlikely like-minded individual : Richard Stallman the Free Software pionneer and undefatiguable advocate !

Richard Stallman even went a step further by writing new lyrics for the tune and recorded it with amateur Cuban musicians. So pass the mike to Sir Richard !

Me odiaba mi primo
Por celos a mi carrera.
Lo arrestaron y dijo
Que terrorista yo era.

Guantanamero, soy preso guantanamero. (..]

My cousin hated me;
He was jealous of my career.
They arrested him and he said
I was a terrorist.

Guantanaman, I’m a Guantanaman prisoner. (..)

Ha decidido el imperio
Tenerme por siempre preso
Y la cuestión es hacerlo
Con o sin falso proceso.

Guantanamero, soy preso guantanamero. (..]

The empire has decided
To keep me in prison forever.
The question is whether to do it
With or without a fake trial.

Guantanaman, I’m a Guantanaman prisoner. (..)

Cuando me hieren el cuerpo,
Dicen que no me torturan.
Causan heridas profundas
De esas que nunca se curan.

Guantanamero, soy preso guantanamero. (..]

When they injure my body
They say they are not torturing me.
They cause me grave wounds
Such as never heal.

Guantanaman, I’m a Guantanaman prisoner. (..)

No me permiten que duerma:
Mi fin no es un misterio.
Voy a salir cuando muera
O caiga el gran imperio.

Guantanamero, soy preso guantanamero. (..]

They don’t let me sleep:
My end is no mystery.
I will get out when I die
Or the great empire falls.

Guantanaman, I’m a Guantanaman prisoner. (..)

Brain dump and Knowledge management and Mobile computing and The Web10 Oct 2007 at 15:47 by Jean-Marc Liotier

Someone asked : what is the mobile Web ? Here is my take :

The mobile Web is not just about overcoming the connectivity, ergonomics and device constraints that make access more difficult than on the desktop that the Web originated on. Focusing on these issues is merely playing catch-up with the “normal” Web.

The value that the mobile Web brings is context sensitivity. The mobile Web is about being there, in contact with the physical world away from a desktop. So bring on location sensitive services, search by photo similarity using the on board camera, search by sound similarity using the on board microphone, augmented reality (for navigation, social life or technical help), QR code readers and barcode readers using the camera, RFID readers, permanent presence management including location and activity…

Shoehorning complex applications on a handheld device is hopeless. On the other hand, the handheld device is the one you being with you, so when time comes to interact with the environment anywhere there is just no other choice. Linking the physical world to the virtual one, that is the mobile Web.

When the physical world merges with the data, wonderful things happen !