Monday, January 26, 2009

A political question unanwered

Here's is one project I plan not to continue. I simply lost the motivation to do it. The reason I blog about it is that I wish someone will read this and will finally make it work.

But first a disclaimer: This is a really good and bad idea at the same time. It create a political minefield and possibly something controversial.

It's about the electoral map.

It all started back in November. There was talks in the media that the Quebec electoral map wasn't 100% correct. Some district were too populated and the map had to be re-drawn... The process was started but was too slow for it to be done for the upcoming election. It got me intrigued. I'm pretty sure the way the electoral map is drawn influence a lot the outcome of the election. But how? I wanted to find out.

I wasn't the first time this sort of questioning crossed my mind. Back in 2005, while I was still a student in my final year of Computer Engineering degree, I had a course on algorithms and graph theory. The kind of course were you learn that some problems are unsolvable, unless you have infinite time to solve them. I remember asking the teacher this very question: "Can't we use graphs to map were the votes are and tell if the electoral map is unjust?". He answered that it was possible, but no one would be willing to do this sort of stuff because it's too political.

And so, when the medias started talking about the electoral map, I remembered that talk I had with the teacher. I had an idea at the time of how one would analyze the various information sources to determine how well the electoral map is divided. Here's how I wanted to do it:

You make point of interests, containing all the votes in a giving sector. It could be a municipality of any other sort of subdivision. The more there is, the better. For example, in Quebec city, one could create a Point-of-interest at for voting spot, containing all the various boxes that were in that spot. Each spot has a weight based on the number of registered voters and is linked to the rest of the electoral district to form a single district. Once you have this map, you create "potential links", links from each P-O-I to various neighbors in other district (for example, the 3 closest neighbors not in the district). The create the various potential maps, you turn on and off each link until you have a legal, but different map.

OF course, there is a couple of problems with this approach.First, to do all this you need:
  • Coordinates for each voting poll
  • Number of voters for each voting poll
  • Results for each poll
  • District for each voting poll

Almost all this information is public, except for one: the exact location of each voting poll.The only information giving for each box is the municipality where the voting poll was. So all the maping information for the voting poll in Montreal, only says : "Location: Montreal". Hard to place the voting voting polls with so little information.

The second problem is the complexity of the entire process. My initial list had 1848 potentials P-O-I on the map. If you limits the links to the 5 closest neighbors, you still get somewhere between 3000 and 9000 links... Which means calculating between 2^3000 and 2^9000 possibilities... Which could take a very, very long time. (2^3000 is over 10^600, or 1 with 600 zeros)

After a couple of days of trying to find ways to optimize the algorithm, I simply gave up. There is not enough information to create a meaningful map, since the location information in large urban area is not very detailed and leads only to a partial answer...

It was a great idea, but I can't go further.

I guess my time is better spent elsewhere...

Monday, January 19, 2009

Hellsing (anime) is a perfect match for E Nomine

The music by E Nomine seem to be a perfect match for any sort of Hellsing AMV.

I found several, but I think this one is far better than the rest (I HAD to share this):

Monday, January 12, 2009

The Cost of SMS in Canada

Below is a copy of an E-mail I sent to Mr Jesse Brown who host the CBC podcast Search Engine:
http://www.cbc.ca/searchengine/

The topic was SMS pricing. (Show for 2009-01-12) I checked to see how much we were really paying for SMS compared to talking... my math says 500times... at minimum..

Can you check and tell me if I'm right?


All of the Telephone based information is based on the Creative Common Licensed book "Asterisk, The future of telephony", available at http://oreilly.com/catalog/9780596510480/ , just click the Online book for the entire PDF


Traditional telephone is 8bit sampling 8000 times per seconds, making traditional telephone 64kilobits per seconds. (or 8 kilobytes per second)Codecs might bring this down to anything between 8kbps and 15.2kbps.

One minute of talk can be anything between 480000bytes (at 64kbps) and 60000bytes (at 8kbps). This is, of course, low quality voice talk because a comparable MP3 file of the same length would be around 1024kilobytes (1MB). Let's just use the lower end for comparison.

To get a rough idea of pricing, let's take a talk plan that gives a 400 minutes for 40$. At that price, the cost of talking for 1 minute of talk (if you use all your available minutes) is 40$ / 400 minutes = 0.1$/m

So with 0.1$/m and 60000bytes/m talk costs around:
0.1/60000 = 0.000001667$/byte
or
0.000001667$/byte * (1024*1024) = 1.747626667$ per Megabytes at the low end.

SMS is, by comparison,very small. 140 Characters in 8bit mode or 160 characters in 7 bits encoding, making the content of the message only 140bytes. The overhead of such message makes the entire message under 200bytes, but let's use 200 bytes for comparison.

At 0.15$ per SMS, it cost:
0.15/200 = 0.00075
or
0.00075$/byte * (1024*1024) = 786.43$ per megabytes...

so it's around 500 times more expensive to send SMS at the base price, then to talk on my phone.

An equivalent price for SMS to be billed like talk would be:
0.000001667$/byte * 200 bytes/SMS = 0.00033$/SMS
or
0.33$ per 1000 messages...

Quite a difference, don't you think?

Friday, January 09, 2009

The Last Question, a short story

This is an old but fascinating short story written by Isaac Asimov:

The Last Question

Wednesday, December 10, 2008

Installing Ubuntu server via USB key

I had to install Ubuntu server edition on my home server and for some reason, the normal procedure I used didn't work. For a wide variety of linux liveCD there is a free Windows and Linux utility called Unetbootin that converts a liveCD to a bootable USB key:
http://unetbootin.sourceforge.net/

In the case of Ubuntu Server edition, the installer could not find the CD content. The path to the repositories seemed to differ from what the installer was looking for.

I found an second method after searching a bit. It involves downloading the installer by hand, and copying the iso file directly to the USB key. The files are available here:
http://archive.ubuntu.com/ubuntu/dists/intrepid/main/installer-i386/current/images/hd-media/
(Get the kernel, vmlinuz, and the compressed image, initrd.gz)

Using Unetbootin, make a Custom USB key, selecting vmlinuz as the kernel and
initrd.gz as initrd.

Once the USB key is created, simply copy the iso file to the root of the USB key.

Reboot. The installer should see the iso and mount it.

References:

Thursday, December 04, 2008

My favorites Tolkien Quotes

Many that live deserve death. And some die that deserve life. Can you give it to them? Then be not too eager to deal out death in the name of justice, fearing for your own safety. Even the wise cannot see all ends.
Gandalf, The Lord Of the Rings, Book Four, Chapter One

Á lelya séressë! Lá equen: áva nainuvalyë; an lá ilyë níreli nar úmiéo.
(Go in peace! I will not say: do not weep; for not all tears are an evil)
Gandalf, The Lord Of the Rings

"If more of us valued food and cheer and song above hoarded gold, it would be a merrier world."
Thorin Oakenshield on his deathbed

"War must be, while we defend our lives against a destroyer who would devour all; but I do not love the bright sword for its sharpness, nor the arrow for its swiftness, nor the warrior for his glory. I love only that which they defend..."
Faramir, "The Two Towers"

‘I wish it need not have have happened in my time,’ said Frodo.
‘So do I,’ said Gandalf, ‘and so do all who live to see such times. But that is not for them to decide. All we have to decide is what to do with the time that is given to us.’
Fellowship of the Ring, Second chapter,"The Shadow of the Past"

"Toss me... but dont tell the elf."
Gimli, Two Towers

Tuesday, November 25, 2008

Like Tolkien

I'm starting to feel like Tolkien. I read the Lord of the Rings and I watched the extended edition of the Movie trilogy (which, much to my chagrin didn't include Tom Bombadil). But I was much interested in the back story: How was the story made? Who was the producer? Who made the visual for the elves and dwarves and what did he, or them, based their decisions on? but most importantly, who was Tolkien?

I remember a distinct passage in the documentary that says that Tolkien did not write the Lord of the Rings the same way every other book is written: instead of keeping certain passages and re-writing other, he re-wrote the story several times. Each time, he started from scratch and wrote a little bit more until he wasn't satisfied with how the story was heading, and started over. And so, bit by bit, like waves hitting higher and higher with the coming of the tide, he eventually got the entire story written down.

Even tough it is more anecdotal than anything else, I think this is something to be learned there: Great things takes time, patience and a lot of hard work. Perfection is not achievable unless you are willing to put a lot of efforts into something.

And part of that effort sometimes includes swallowing up your pride, rolling up your selves and starting over.

I did just that.

I've giving myself a week to come up with something. I decided that since I don't really know where I'm going in life, I might as well try something, anything, that sound like a promising solution.

Right now, I'm going for a LPI level certification. If this doesn't help me, I'll try the CCNA and if that doesn't help me, I'll get the Ubuntu LPI certification and the RHCE certs. I have little to lose (except maybe money) and everything to gain.

Tuesday, November 18, 2008

Certifications

So I'm looking into changing my life a bit. In 2006, I was fresh out of university and seeing I didn't have experience, I looked at doing certifications. Since I have nothing better to do than study, I've decided to looked again at that possibility. I narrowed my choices to 6:
  1. Cisco CCNA
  2. LPI
  3. RHCE
  4. Linux+
  5. GCUX (SANS)
  6. Brocade SAN Manager
I don't intent on getting Microsoft certifications, and so these are the closest to what I studied and do in the last years. ( All these certification can be done by simply taking the exam at either a Pearson/Vue center or a Prometric center. )

Exam Costs:

  1. Cisco CCNA: 125$ x2 = 250$
  2. LPI 5 x 155$ = 775$ (3 certifications: LPI-1, LPI-2, LPI-3)
  3. RHCE 799$
  4. Linux+ 239$
  5. GCUX (SANS) 899$
  6. Brocade SAN Manager 150$
Since I already have the study material for LPI and CCNA, I think I'll start with those...

Monday, November 17, 2008

A clear vision

I'll start by saying that I became obsessed with books. I cannot go into a book store and not come out with something. In the last 3 months, I bought at least 10 books...

3 books in particular changed my perspective on life. These are:
After reading these books, something became self-evident. And it is most visible in Frank Odea's book. All these people have (or had) a clear motivation that drove them to succeed. For Randy, it was his childhood dreams. For Frank, it was initially the idea that he would die alone and on the street if he didn't do anything. For David Allen... well it is self-evident: getting stuff done.

They all had this clear vision of where they were going.

And that is my problem: I don't.

I have no idea of where I'm going in life. No idea of what I wanna do. No clear childhood dreams to look up to (I already completed mine: it was graduating). No visions. No fears driving me. No motivation. No nothing.

But I'm not depressed. I am simply faced, again, with paralyzing choice : too many choices available and not enough information to make a good decision. I'm simply afraid to make the wrong decision and so I spend a lot of time trying to think about the best solution... to a problem that I don't really understand...

I've decided to change all that. I've giving myself a week to come up with a solution. Some direction to give to my life. I don't know how I'll do it, but I have to. So much is at stake.

I'll kept posting. Try to see what happen. It will be lots of soul searching...

Depression Diary

The Big Money (a blog owned by Slate) has posted a couple of exerts from a diary written by someone in the 1930s. Interesting read.

Depression Diary | The Big Money
Depression Diary, Part 2 | The Big Money
Depression Diary, Part 3 | The Big Money