Just do it: Vote!!!


We, Mauritians, will elect the people who will represent us in the Parliament for the next five years. I know politics might seem bizarre for young people as our politicians are so disconnect to (and somewhat clueless of) the kind of life the new generation has now. Heck, even I don’t relate to most of them, even though I’m 41…

But, and this is a major but, voting is a right and a duty. Our votes count.

Have a look at Elections Mauritius, a website Christina and I did a few days ago, to provide maximum information on constituencies, parties and candidates.

Just do it: Vote!!!

The five biggest problems in Mauritius


According to a survey done by L’Express and DCDM Research in October 2014, here the five biggest problems in Mauritius right now:

  1. Unemployment (58.2% of respondents)
  2. Poverty (42.7%)
  3. Lack of purchasing power (27.2%)
  4. Problem of law & order (19.3%)
  5. Bad education (15.0%)

It is obvious that these are interlinked. For example:

Bad education (5) can lead to Unemployment (1) which can lead to Poverty (2) which can lead to a Lack of purchasing power (3) which can ultimately lead to Problems of law & order (4).

As an educator, I tend to think that the root of all evil is our education system. It was never very good and now it’s abysmal. Young graduates fresh from university lack essential skills which companies need and, as a result, unemployment is rampant. Ultimately, this can lead to major poverty and law & order issues if the root cause (i.e. bad education) is not remedied.

Of course, there are other ways to look at this picture. For example:

Poverty (2) leads to Lack of purchasing power (3) which can lead to Problem of law & order (4) which obviously leads to Bad education (5) and, at the end, Unemployment (1).

Here the root cause is poverty and, to all casual observers, Mauritius is two countries in one now. The first “country” (Maurice, c’est un plaisir!) contains the high income earners driving their BMW in company of their trophy wife towards their residence in a guarded community. This is, at most, a few percent of the population. The second “country” (Maurice, c’est une galère!), is the country of modern slaves: people who are just numbers and are treated as such. They generally have low income and tend to spend their few rupees very unwisely because they lack general knowledge.

In my opinion, this divide is going to increase during the coming years. We need to find good solutions quickly.

I wonder if the current crop of politicians are equipped to do that? Are they even interested? Or are they too busy driving their BMW in company of their trophy wife towards their residence in a guarded community?

Creating an RPM file for XMind


I am a big fan of mind-mapping software and, for years, I’ve been using Freemind.

I’ve noticed that a lot of people are moving towards XMind which, for some peculiar reason, is only available as a Debian (.deb) package. This is a bit problematic as I run Fedora and CentOS which are both based on RPM (Redhat Package Manager). Here is how I managed to convert the .deb package into an .rpm which can then be easily installed with a yum localinstall:

(1) Download the Debian package

(2) Create the RPM

alien -r --scripts package.deb

This command (alien) converts the Debian package into an RPM and makes sure that any scripts (pre- and post- installation) will run when the RPM file is installed. See this for more info.

(3) The issue is that the RPM will fail to install as there is a conflict with three directories: /, /usr/bin and /usr/lib. The solution is to install rpmrebuild and use it as follows:

rpmrebuild -pe xmind.rpm

Remove all lines for /, /usr/bin and /usr/lib in the %files section and you should then get an RPM. See this for more info.

Have fun with XMind ;-)

Using jigdo to rebuild a Linux ISO image


A few years ago, Internet was very slow in Mauritius (and some will argue that this is still the case…) Downloading a Linux DVD (or, more precisely, an ISO image) took ages.

Now the Internet is way quicker but downloading a 4Gb ISO image still takes a long time.

A few years ago, a Debian guy invented Jigdo, a tool which I’ve been using for some time now to only download the few files I don’t have when a new Linux release is made and reconstruct the ISO locally. The steps to follow are documented in this post but are basically:

(1) Download the full ISO on a server where Internet is very quick (I do that on a VPS I have in the middle of the Silicon Valley where I routinely get 250Mbit/s). Let’s call the ISO image Centos-Linux-6.6.iso

(2) Use jigdo to create a .jigdo and a .template set of files. Before that it is important to mount the ISO on the distant server so that the individual files in the ISO can be accessed directly by jigdo. I generally do:

mkdir Centos-Linux-6.6

mount -t iso9660 -o loop Centos-Linux-6.6.iso Centos-Linux-6.6

jigdo-file mt -i Centos-Linux-6.6.iso -j Centos-Linux-6.6.jigdo -t Centos-Linux-6.6.template Centos-Linux-6.6/

(3) On completion, Centos-Linux-6.6.jigdo and Centos-Linux-6.6.template (which are generally small) need to be downloaded locally.

(4) The final step is to reconstruct the ISO locally. This is done by:

jigdo-lite Centos-Linux-6.6.jigdo

jigdo-lite will prompt for folder names with existing content. For example, when I used jigdo yesterday to reconstruct the latest Centos 6.6 ISO image, I already had a Centos 6.4 DVD and all the updates released since. I only had to point jigdo-lite to these existing folders and, voilà, in a few minutes I had the latest Centos 6.6 ISO image ready.

To be complete, jigdo-lite complained that one file was missing (python-paste-script-1.7.3-5.el6_3.noarch.rpm) which I had to download manually. It was just a small file so no big deal.

All in all, jigdo, even if the software is now in maintenance mode, is still a lifesaver for me. I hope it becomes one for you too.

Have fun ;-)

Pygame with Fedora and Python 3


I’m having some fun with pygame, a library to create games in Python.

The exact steps to follow to have pygame in Python 3 on Fedora Linux are detailed in the Python Fun blog. In essence:

  • yum install python3 python3-tools python3-devel
  • yum install SDL SDL-devel portmidi portmidi-devel ffmpeg ffmpeg-devel SDL_image-devel SDL_mixer-devel SDL_ttf-devel libjpeg-turbo-devel
  • cd /usr/lib64 && ln -s libportmidi.so libporttime.so

This takes care of all dependencies needed (minus smpeg which does not exist in recent Fedora Linux distributions). Then:

  • Get the pygame source code (e.g. hg clone https://bitbucket.org/pygame/pygame)
  • python3 config.py
  • python3 setup.py build
  • python3 setup.py install

That’s it! Test by running python3 and importing pygame.

Have fun creating games ;-)