Recently in t3h g33kn3$$ Category

Toronto: Electoral Donations in Canada

Sometime in early 2009, I came up with the Canadian electoral financial contributions project. At the time, I thought it would be awesome to do something with the data that Elections Canada, an independent federal agency in charge of conducting elections and referendums in Canada, releases publicly about funders of political parties. The website contains different ways to access the information, whether it is political party or riding association annual returns or by candidate's expenses during an election.

I wrote a basic how-to, pointing out how obfuscated the browsing of the data was. You can technically download CSVs of the data, but Elections Canada's servers would time-out if you asked for the entire dataset at once.

Screenshot-Financial Reports: Candidate's Electoral Campaign Return - Mozilla Firefox
Try to do mashups with this

There were also some cleverly hidden public data that consists in the postal code of a single contributor. Using a Web browser, it was impossible to compile this data into a database. But using simple scripts with a command-line tool like curl, it was possible to know the location that a donor used to make its donation, including private residence. It might be of questionable good taste to reveal those on a map, but in an era of data mashups and visualisation, it makes perfect sense for what is after all public data.

Michael Sabia: Electoral Donations in Canada
Michael Sabia (Caisse de dépôt et placement du Québec President / CEO) gave money to the Liberals

At the time, I demonstrated my method with only 2008 data and let the project die for lack of interest and time. In the meanwhile, I moved to Hong Kong and started a new career over here, and have been working on data projects.

Now that elections are looming in Canada, and with an improved skill set, I've unearthed the project a week or so ago, and started really digging into it since yesterday. I already reached the stage of collecting all the 2007-2009 data from annual transaction return, and the postal codes of contributors. I am now geocoding the postal codes and will be thinking of ways to offer a better filter and search the data. Aside from mapping the data geographically, I think that it would be interesting to show trends in the data, of where the money went, etc. For the public, it would be interesting to offer a focus on where celebrities and important people put their money, just like the Huffington Post's Fundrace did in the US.

---

Update 2011-04-16: This is the raw data

Ants from the AC

| | Comments (0)

Ants from my AC

We have this weird problem with the air conditioner at the office. Whenever you turn on the AC, 30 seconds after the fan starts, big black ants start spewing out of the mouth. I think the outside pipe might be too close to the ground, the ants made a colony in the pipe, or they are collecting the dirt accumulated in the AC (which was recently cleaned, actually). But this afternoon, when we turned on the AC, instead of the 4-6 blown out, 25-30 actually came out. Let me just tell you it was quite a messy extermination...

Je viens de changer le plan de données illimité de mon téléphone pour me permettre de faire du tethering et ainsi m'alimenter en Internet chez nous. Du coup, on m'a donné le Access Point (APN) du broadband résidentiel qui s'appelle juste "Internet". Et ça me coûte que HK$50 (CA$6.50) de plus par mois, et un beau total de HK$300 (CA$40) par mois.

Donc, à part que je puisse maintenant faire du tethering avec mon cell (j'aurais pu aussi avant, mais ça aurait contrevenu à mon entente), le nouvel APN me donne constamment de plus grandes vitesses de transfert de données et me permet maintenant aussi de streamer de l'audio à travers le réseau mobile.

Google Nexus One

Armé de mon Nexus One (que je vais reviewer la semaine prochaine), je peux donc me promener dans la rue à Hong Kong et écouter les streams de Radio-Canada (et de CBC, de Bande à part, etc., par extension) comme si j'étais à Montréal! Le seul hic: c'est à travers le réseau 3G, alors ça va drainer de la batterie.

Screenshot-Icecast Streaming Media Server - Mozilla Firefox

En fouillant dans les fichiers Javascript de BAP, j'ai trouvé que le serveur des publishing points chez Abacast servait aussi une page index: http://in-1.atl.icy.abacast.com/. C'est aussi peut-être un alias/serveur géo-spécifique de http://icy1.abacast.com/ que j'ai trouvé dans les ASX de R-C.

CBC et Radio-Canada sont de leurs partenaires et la liste de la page mentionnée ci-dessus comprend donc pas mal tous les mount points de ses feeds audio, servis pour appareils mobiles, applications Web, etc.

Comme c'est public, on peut pointer à ces addresses directement sur son browser mobile, et si la connection est assez rapide (devrait être HSDPA, à 3Mo/s), on peut les écouter comme de la radio à travers les ondes. On va sur la page, on copie le lien M3U, et on enlève le ".m3u" de l'adresse (ou on ouvre le fichier m3u dans un éditeur de texte).

Des streams taggés "128" (comme ceux de BAP) sont en fait du 192kbps. Ça tire un peu beaucoup avec ma connection sur l'île chez moi, mais quand ça marche, ça sonne mieux que la radio FM. Y'a d'autres streams comme les radio musicales qui sont aussi à haut débit. Le talk radio est à 64.

Autre goody: la page nous montre le nombre d'auditeurs présentement connectés. (Bon, ça serait p-ê une bonne idée que qqu dise à Abacast d'arrêter de laisser cette page publique?)

Android Dev Phone 2 cover
Android Dev Phone 2 cover. The AD2 is also known as the Google Ion, a software remix of the HTC Magic. Was handed out to Google I/O 2009 attendees and made available to other developers in November 2009.

When Google's new "superphone" Nexus One was released yesterday, it was made available for online orders shipping to four places in the world: the US, the UK, Singapore and Hong Kong.

In Canada, I was paying CA$40/mo for high-speed (7mbps) Internet over fixed-line, on top of a mobile phone service (no data) that costs me CA$35/mo.

Hong Kong is a city where you can get pay-as-you-go SIM cards for your GSM phone with a company like China Mobile HK for just HK$100 (CA$13.50) and get charge HK$0.10 (just above one cent) per local minute, and HK$0.25 (about three Canadian cents) per minute for Overseas calls to places like Canada, the US and the UK. If you sign up for a monthly postpaid plan (need a HK ID, or pay a ~HK$3000 deposit), you can get ridiculously cheap plans. My family and friends here constantly tell me about plans going for HK$50-100/mo. (CA$6-15), giving them access to stuff like 1000 minutes, up to a practically unlimited amount of minutes to call to Canada.

But one of the reason -- I think -- making Hong Kong such an appealing market for Google to roll out its version of the future (in the cloud) is also the cheap price of mobile broadband.

Android Dev Phone 2 (aka Google Ion & HTC Magic)
Android Dev Phone 2 with a SIM card from Bell (Canada).

Back in Canada, all major phone companies offer mobile Internet, but always with some sort of limitation on the bandwidth. Bell released its new HSPA+ network in Fall 2009, with potential speeds up to 21mbps (that's 3 times as fast as the typical high-speed Internet by fixed phone line), but typical speeds going much lower, probably running at 3-7mbps (just speculating). The price? A regular 500Mb data plan for iPhone goes for CA$50. That's not a lot of data, if you consider that each video watched on YouTube can be 5-10Mb. Other Bell data plans range from CA$60-100 for bandwidths of 1-3Gb.

Now in Hong Kong, I am also a personal consumer (I don't get any phone, let alone phone plan from any company that would employ me), and recently switched from a prepaid plan with China Mobile HK (the lowest of the low in HK, but a v. good short term prepaid option) to a postpaid data plan with SmarTone-Vodafone, probably the company with the next to the best (CSL/Telstra) mobile network coverage and quality in Hong Kong. Now this plan sets me back HK$250 (all fees included) and gives me unlimited data (and an insane to Canadians, but expected by Hongkongers, amount of minutes) at typical speeds of around 2-3mbps.

Now, bear in mind that in this market, HK$50 monthly plans are the norm for the masses. But with a comparable cost of living to Canada (3/4 of Canada in daily expenses), this means that with tethering (using your phone as a modem for your computer) for an extra HK$50, for a total of HK$300 (or CA$40), people in Hong Kong can drop their fixed Internet line altogether, and like to paraphrase Google, merge their phone with the Web for ridiculous prices for North American wallets.

Unlimited high-speed data plans are sold by 3 or 4 companies in Hong Kong, with prices varying around HK$250/mo, the price at SmarTone-Vodafone with a 18-month contract. The selling point, at least for me, was that you can break your contract at any point for just a HK$500 (CA$66) fee.

Is that the sign that mobile phone contracts are starting to become a thing of the past? The plan is again very poorly advertised by SmarTone, because subsidized phones are still the way. This HK$250 monthly contract is only available if you bring your own unlocked smartphone, very common in Hong Kong... and now available directly from Google at US$530, or US$580 (HK$4500) when counting an AC adapter and international shipping to Hong Kong.

If your needs don't justify such expenses, Hong Kong is probably one of the easiest places in the world to find second-hand phones of reliable quality (this is not the jungle of Mainland China). One of my friends went to Mong Kok and bought a "used" HTC Tattoo (came out just in October 2009), HTC's budget-range smartphone that is running Android 1.6 for only HK$1000-something (around CA$200 if I remember correctly).

250/mo becomes 3000/yr (CA$400), for all your Internet needs. When I'm going to read these numbers in 5 years, I'm probably going to be as amazed as what a regular laptop or desktop computer used to cost 5 years ago...

Assuming that you have an Android emulator running, and listening at the default port (5554). First, you need a script called getGeo.sh that gets the GPGGA line from gpsd running at its usual port. gpspipe attaches to gpsd and we get the line we want, put it in a file:

#!/bin/bash
# get nmea from device

FOO="geo nmea `gpspipe -r -n 10 | grep "GPGGA" | tail -n 1`"
echo ${FOO}
echo ${FOO} > ${HOME}/geo.nmea

Then, second code calls telnet and sends it the contents of the file with the "geo nmea " line:

#!/bin/bash
# simulate sending gps info to android emulator

${HOME}/bin/getGeo.sh
exec telnet 127.0.0.1 5554 < ${HOME}/geo.nmea > /dev/null &> /dev/null

You could loop it to make refresh the positioning as you walk around with your GPS.

imgp0036

Linux rebooting on CO99 to HKG

It can be a little unsettling when you see rows of text scrolling down the screen in front of you when sitting in an airplane. That happened twice during my flight to Hong Kong yesterday, as the captain needed to reboot the server running the touch-screen system controlling on-board entertainment and flight status.

I'm not so surprised that they use Linux. It's pretty nice to see the text cascading across the screen -- I'm getting perhaps a strong sense of familiarity.

Flying off from Newark

Edit (2009-11-11): I completed the project a few days after describing it in this post. This link gives you an overview of what it does. Here is the web version (requires Google Earth plugin): http://earth.smurfmatic.net/canada2008/contributions/

***

Some time ago, I wrote a lot on this particular project without providing much specifics. This said project is the electoral contributions project.

The idea is pretty straightforward. Once a year, Elections Canada releases data on donations to political parties, whether it's from individuals or companies, directly to candidates or the party itself.

They have some database behind to power it, but none of it is open to the public. The only information available is under the form of webpages such as this one:

Screenshot-Financial Reports: Candidate's Electoral Campaign Return - Mozilla Firefox

Also, you can click on the name of a contributor and find basic info such as the address where he sent his contribution from, specifically on this popup:

Screenshot-Contributor Information - Mozilla Firefox

So, what if you got the data and tried to use the postal code to put every contribution on a map? It's been done in the States by the Huffington Post, the well-known web media outlet.

How to do it?

To get the 100-something pages containing the data, you write a shell script with wget on the address (check the post data with Firebug) and download all the pages. Then, do the same for the pop-ups (you find their script's URL by reading through their JavaScript code, all of which is ungarbled).

Then, parse the pages with a script. I wrote mine in PHP, because I didn't know better. I'll post it if there is interest for it. Then, the same script does the INSERTs to the PostgreSQL database. You can download this following database dump:

contrib40.sql

I chose the columns to be of a super permissive datatype, because the data in those webpages is surprisingly not very well normalized. You also find invalid postal codes and basically no practical way to identify two different donors with, say, the same name.

Then comes the interesting part that I've finished once but did not save anything useful, that is to visualize the contributions geographically with the postal code. I made a separate table called "postalcodes" which is a unique list of postal codes contained in contrib40, and the geographical point representing this postal code. I obtained the point coordinates using a script that called the Google HTTP geocoding service. It's for Postgis that I used PostgreSQL.

Now it's maybe the fun part, that is to fetch the data and make it into something useful, either using MapServer + Google Maps, or libkml (to generate a file for Google Earth).

Interesting, telling uses? Since we only have access to data up to the end of 2008, we could show the rise of the Liberals in the post-electoral months of November and December, when Stéphane Dion stepped down in favour of maybe-Michael Ignatieff. We can surely superimpose donation origin and actual voting patterns at the poll level.

If you have more visualization ideas, feel free to drop me a line: cedricsam@gmail.com. I'd like to hear your ideas, propositions. I think that this data ought to democratized, and using graphical methods like maps is one of the best methods nowadays.

Canada Federal Election Maps: 2008 By Polls

Here is a demo for colouring the polls by their 2008 election result:
http://smurfmatic.no-ip.org/~csam/maps/polls-2008.html

Only zoom levels 7 to 10 are coloured for now (it starts at 7). The colours represent the party that won any given poll territory, but in Canada, it's a first past the post system at the riding level (some ridings contain more than 100 polls).

It's running on my laptop, so the site might be down at any point, especially during the night. For the next step, I should be finding a way to add useful infos, like detailed results per poll/riding.

MapServer + PostGIS + Google Maps

Because to many people, Google Earth is not suitable for all 95% of the computer population out there, Google Maps (and other competing dynamic map platform) is still the way to go to display geographical data.

However, what if the data that you want to display is simply too heavy for the client side to display? For instance, you want to overlay polygons representing electoral districts (each 308 of them in Canada). But loading all of these in Google Maps is not practical for the average computer in 2009.

You might want to explore a server-side method to serving the data. This could be with MapServer, which in a nutshell serves image "tiles" (we make them to be 256x256 PNGs for Google Maps) to the client. For instance, the following image may be such a tile:

mapserver tile

Behind the scenes, MapServer goes to the data source and outputs by CGI the right image. The data source can be a Shapefile or other, but can also be a database, namely a PostgreSQL DB with Postgis. Read the MapServer FAQ to see how awesome it can be.

p2p

One of the latest and last projects I was involved in at CBC/Radio-Canada was with the integration of pCDN, a pilot project that consists in contents delivery through peer-to-peer, and implemented on Bande à part's (aka the French CBC Radio 3) summer podcast feed. Here is the website that was launched this week by Bande à part: http://bandeapart.fm/pcdn/.

pCDN was developed by the Network Systems Lab at Simon Fraser University in the Vancouver area, along with CBC/Radio-Canada's Strategy & Planning based in Montreal. Here is a published paper written for the company's technology review by the main people involved in the project.

Bernard has told me that peer-to-peer delivery systems were already common in the USA. I remember using a system developed at CNN during the night of Obama's win. pCDN is just for progressive downloads, as far as I know.

The idea of using "BitTorrent"-like delivery helps alleviate traffic between users and contents delivery servers by redistributing it between users. It's a win-win situation for both the users and the big contents providers. It's potentially an alternative to today's pervasive, but costly, mirroring services such as Akamai.

It remains to see if it actually speeds up downloading. From an observer's point of view, it will become most noticeable when server-to-peer becomes a bottleneck. From a geek-user's point-of-view, I can't wait for when/if we extend the service to other potentially downloadable contents (full-length shows anyone?).

pCDN podcast feed

I'm on Linux (Ubuntu Jaunty) and tried pCDN on this platform. pCDN's source code is in Java, thus it's cross-platform. I downloaded this package and tried the links on the pCDN-specific podcast feed. Extract the archive (it's going to be a hidden folder named .cbc-pcdn) and in your terminal or otherwise, execute "launch.sh". This starts pCDN on your local computer and makes it "ready" to receive requests to download (and upload back), as you would for any P2P program like uTorrent or Transmission.

After starting pCDN, make sure to upgrade to the latest version (right-click the icon for "Mise à jour").

You will notice that the links in the podcast feed are all in the form of "localhost:54321/__SOME_HASH__.extension". When you click on them, they call pCDN and it is checked through the system whether this file is available among other connected peers. If not, it will download from some central "seed" server. Tadaa!

(The feed itself is a must-listen... It's music selected by Pascal Asselin, a electronic music artist better known as Quebec City's Millimetrik.)

Erica Strange uses Linux!

| | Comments (0)

Being Erica - CBC Television

Being Erica - CBC Television

Being Erica - CBC Television

I confess - I'm watching a gal series. However, I am staying true to myself, and pointing out that the main character of Being Erica probably uses Linux! The mail client in this screenshot of last week's episode Everything She Wants, the 9th of the season, she is using Horde on Firefox for her mail, on what looks like a Linux system with a really really old "Crux" theme.

patitle.png

Audacity-logo-r_50pct.jpg

I've been looking for a way to record sounds (namely music) off websites like MySpace and Neocha, because the music that we play on our show has to be 1- indie, and 2- Chinese.

Needless to say that I couldn't play music from many of the bands that I hear on Neocha's NEXT music player, just because they happen to be obscure Chinese bands that may not have considered an international audience (some, however, have been touring the world). In fact, as far as I know, you can't download the songs even if you wanted to pay for it (don't even think about finding some of those bands on P2P networks).

I finally got to try out a solution that my friend Rob suggested. And that's the Audacity, a free open-source software for mixing and recording sounds/music. There's nothing so special about Audacity (except that it's free), but it's when you use Audacity with a sound source that's your computer's stereo mixer that it becomes interesting (see instructions).

I found out that my own computer, a Dell XPS m1210, has a sound card (a STAC92xx by Sigmatel) integrated to the motherboard (Intel). On Windows, the driver provided by Dell "C-Major Audio Driver" does _not_ let you mix stuff, and does not give you access to the output of your stereo system. I read somewhere that you could somehow replace this driver (its XP version only) by the same driver provided through LG.

Since my Windows is Vista, I rebooted into my Ubuntu (now 8.10 Intrepid Ibex) instead and looked at my options from there. Audio has always been a part of the Linux world that I neglected. I used mplayer before to save streamable videos (it's even more simple as in my entry, because you just use the "-dumpvideo" option). How about audio then?

I understand that ALSA is the mixer - your applications speak to ALSA and pass it to PulseAudio, which is the layer that redirects everything back to your sound card, aka The Hardware. Aside from recording, you can also use PulseAudio to make modifications to the output, redirect to different "sinks" (a wireless network-based sound system, anyone?).

There's a nice info page on the Ubuntu wiki. In fact, a section at the bottom ("Recording example...") was what I used to record my music. I also installed the PulseAudio Volume Control (pavucontrol), Volume Meter (pavumeter) and Device Chooser (padevchooser). The latter is a GUI that lets you choose and configure what applications output to PulseAudio and what devices on your computer (front speaker, headphones, or elsewhere?) are used to play sounds.

(PulseAudio is now the default sound server on Ubuntu, replacing Esound from previous releases.)

Following the instructions in the Ubuntu tutorial, I used padsp, a OSS wrapper, which starts an application connect to a PulseAudio server through a OSS audio device ("padsp starts the specified program and redirects its access to OSS compatible audio devices (/dev/dsp and auxiliary devices) to a PulseAudio sound server."). The command is:

padsp -d audacity

(with all the comfort of debug info...)

Then choose the OSS (/dev/dsp) device as you would on Windows with a non-restrictive sound card driver, and start recording using your system's sound output (ALSA something...). Make sure to mute the microphone, also through the PulseAudio device choose!

It's a powerful method, but may be illegal in some countries (not sure which - it's just the Ubuntu tutorial saying).

Why didn't I find out earlier?

| | Comments (0)

cameldraft200

A library to write KML files specifically developed by the folks at Google! Written in C++ but with bindings for Python, Java too (PHP in older versions only).

Akoha, quesséça?

| | Comments (1)

Akoha.com logo

On the very very lucky August 28th of 2008, I was invited to a pre-launch of Akoha, a project started out in Montreal which buzz I've felt in the past year or two, and which has equally left me wondering as to what it ate in the winter (mais oui, qu'est-ce que ça mange en hiver??).

Simon Law, a former Canonical (makers of Ubuntu Linux) employee, is one of the people working on Akoha. When prompted about Akoha, he wouldn't say more than a word about it, except that all his talk about karma and good deeds finally made sense at the pre-launch (how are you supposed to hide something you worked on, believed in, for more than a year?).

We were not supposed to talk about Akoha in the next month following it, as the confidentiality agreement stated. So it's been more than three months, and I almost forgot about Akoha altogether.

It turns out that Akoha is indeed a new kind of game, in which you start with a stack of paper-real "mission cards" of good deeds of all kinds, such as buying someone coffee, or giving someone a compact fluorescent light bulb. These help you accumulate "karma points" and allow to advance in the v3ry g33ky social ladder of levels (yes, as in Level 99 levels...).

However, the cool part is the potential in social information. Whereas Facebook, perhaps today's most successful social network, is backed by the ground-breaking idea of mapping real-life social relationships into the digital world, with the concepts of photo-tagging one's friends, as well as the consensus of using real names, the first great potential that I saw in Akoha was a real way of measuring (if not quantifying) bonds between human beings.

Also, cards that you give to the receiver of a good deed are to be redistributed by the latter. As you have guessed, this is almost like the experimental process at work to prove (or disprove) karma.

Of course, you can't help playing the Devil's advocate by saying : are people going to start giving cards out in exchange of accomplishing "social missions"? Where is the dough to make this a viable successful business?

For sure, I am curious to see what's next for Akoha (still in beta testing, not planning a wide release until much later next year), how they are going to harness the new trends of the web, which is giving a lot more importance to mobile devices, and how the cards that I've disseminated around the globe will go from one user to the other (if only the receivers of these cards would *use* them). Btw, who wants a card / account?

Now a few screenshots...

My home page (1 of 2)

Welcome to your Akoha home!

My home page (2 of 2)

Akoha - My home page

My Friends - List of contacts / friends

Akoha - My Friends

My Missions - a list of missions... a mission designer will eventually let you create some of your own to feed into the System

Akoha - My Missions

Play a Mission - play it and earn points when the other player reciprocate

Akoha - Play a Mission

In the world of tagging (attaching metadata to stuff on the web), very unlikely associations can happen due to exhaustion of particular acronyms.

Yesterday, I took the following picture, and posted it on Flickr:

The Conservative candidate, sandwiched by its party's foreign policy

I initially did not tag it with anything, but had in the title the word "Conservative", describing our riding candidates' poster being sandwiched between two signs of "Canada get out of Afghanistan". Later this morning, I get invited to the Conservative Party of Canada (International) (sic) group.

And then, I see Asian girls in various poses (SFW). I go around looking at the pictures, and end up realizing that they belong to... the Cebu Photography Club!

So, is someone in Cebu, a well-known resort island in the Philippines that caters to all East Asia, following the Canadian elections? Well, according to Flickr pictures of the Conservative Party of Canada (International) group owner, he is a probably of Filipino origin, living in or with ties in the Vancouver area (mentions Seattle, but is also getting stuff at Costco that is bilingual English/French)...

On the same run, I also found out that Stephen Harper, not just as Prime Minister, but as the Conservative candidate, may have a Flickr account. Someone accepting those Flickr automated (?) group requests is maybe not doing his job well (or maybe doing it too well).

Stephen Harper in Ajax, ON

Gadget to lookup geocodes

| | Comments (0)

I made a gadget for looking up geocodes, that can be used with Google Maps, Google Earth. (link)

Flickr with stats, finally

| | Comments (1)

Yesterday, Yahoo! finally decided to release a statistics page for Flickr pro users. If you want your stats for Flickr, you must go to http://www.flickr.com/photos/USERNAME/stats/ in order to activate them. It must be a very tough job, computationally-speaking, to keep track of all clicks for every single one of your thousands of photos - even YouTube keeps only a minimal trace of how users get to a video page... But seriously, as the ad says, I am thrilled, because I can now determine how people find my photos. :)

How about a dynamic embed?

| | Comments (0)

Enter the valid URL to an online media resource:

Mencoder really does miracles. After showing how to rip streams last week, now comes a script to rip the audio from a music video DVD:

#!/bin/bash
# Script to rip the audio of DVDs (useful for music videos!)

ACODEC=mp3
ABITRATE=128

if [ $# -ne 5 ]
then
    echo "Usage: ripaudiodvd.sh [AID] [TITLE] [START CHAPTER] [END] [SUBDIR]"
    exit 1
else
    OUTDIR=${HOME}/ripdvdaudio/${5}
    mkdir -p ${OUTDIR}
    for i in `seq ${3} ${4}`
    do
       TRACKNO=`printf %02d $i`
       mencoder -v dvd://${2} -aid ${1} -chapter ${i}-${i} \
       -o ${OUTDIR}/track${TRACKNO}.${ACODEC} -ovc copy -oac lavc \
       -lavcopts abitrate=${ABITRATE}:acodec=${ACODEC} -of rawaudio
    done
fi

Download it: ripdvdaudio.sh

The following script uses the mencoder command to read a live video feed and save it to a file for playback. It could probably be modified or used as it is for audio, but I did not try it. It was custom-made to read a stream in the asf format and encoded in WMV3 (Windows Media Video 9), but I assume that it could be parametrized to take and output other formats. The benefit of this script is that it does not require any transformation or recoding of the stream, as it just copies (or dumps) the contents of the stream to a file, and packages it in its native format, that's supported by FFmpeg's libavformat library.

#!/bin/bash
# Reads a live stream and copies its contents to a file

NOW=`date +%Y%m%d%H%M`;
DLDIR="~/"
EXTENSION="wmv"
FORMAT="asf"

if [ $# -ne 3 ]
then
    echo "Usage: savestream.sh [stream url] [duration] [identifier]"
    exit 1
else
    STREAM_URL=${1}     DURATION=${2}
    IDENTIFIER=${3}     mencoder -forceidx -oac copy -ovc copy -endpos ${DURATION} -vf harddup ${STREAM_URL} \     -of lavf -lavfopts format=${FORMAT} -o ${DLDIR}/${IDENTIFIER}${NOW}.${EXTENSION} fi exit 0

Download it: savestream.sh

Whatever you do with this script is your business. Please be careful about legal questions with respect to copyright when you save stream segments.

You need to have MPlayer/mencoder installed. It works best when you have the latest codecs installed, and this script should only work when you have FFmpeg installed too (although I think you could modify it to do without). You might also need the w32codecs binary codecs package.To get the latest versions of these packages, on Debian, try looking at Debian Multimedia, and for Ubuntu, check out Medibuntu. I did not test it thoroughly, so beware when you use the script, and be sure that you know what you are doing! The script works very well as a cron job.

Phew. It's solved now, and my tables have been made in utf8!

Basically, I got backups from the MySQL console, then went to the Movable Type back-end to get further backups (this time, not dependent on the database's encoding), and changed the table charset (from the MySQL console), and restored the MT blog data to a new blog. I'll need to do some clean-up and will be done with this op.

Blog encoding imploded (again)

| | Comments (0)

Blah blah and blah. Movable Type required that I upgrade my database schema to the new "4.0026" version, and caused something to go awry with my mt database character encodings. I am not too sure what the original encoding was, but I think it was latin1, even if unicode characters were present all over (I clearly do not understand the logic behind these things). After the blowup, all my "é" (French e acute) became "é", and the Chinese characters in my entries were transformed into gibberish.

After a fix that emerge out of magical incantations, at least the French accents work again, but I'll need to obtain a clean backup to figure out if it really did. The trick was to make my database latin1 again (I made it utf8, thinking that a consistent encoding environment would solve things), while keeping the tables in utf8. Chinese characters still don't appear at certain places, seemingly those after one or two other Chinese characters. Strange... Of course, I'll need to know more about how characters are managed. It seems like it's a seasonal thing to struggle with.

The metro to Laval is opening next Saturday, so I'll grab on to the occasion to launch this:

http://www.metroboulotresto.com/

For all transit system geeks who happen to be foodies (or foodies who happen to travel by metro), this is your ultimate destination for restaurant reviews! It's a reimplementation of xanawu's restaurant page (who will also be a main contributor of this site - once she gets back from HK, I suppose). We will be adding stations profiles eventually, but for now, please take a look and drop us a line if you have comments/suggestions/questions! (The site is also bilingual English/French, if you click on the sub-headers.)

There's now a Chinese-English dictionary on this site. It is basically a modification of the interface written in Perl for cedict, the Chinese-English dictionary project. I only take credit at following the instructions in this readme.

Google owns me

| | Comments (0)

I recently allowed Google to index my blog, and some things that I write about place me way up there. The topic of Montreal sushi buffets has me as a Top 10 hit since that post on Odaki last year. It's probably temporary, but my post last week on Dragon Boys also scores pretty high. Obscure HK and Quebec indie bands I write about also score high (and I suppose that scoring highly doesn't guarantee good traffic).

WebSearchStats_Aggregate_AGG_smurfmatic_net_20070114.csv

The posts I am the most fond of are the posts about food, Linux how-tos, and the trip to Asia in 2005. It probably makes sense that _good_ contents, the contents that you've researched and integrated, is what would score the highest, just because people trust you and link you in return... The downside is of course that I can't afford my 15Kb of Google fame (bandwidth has been averaging 100Mb for the past week, and I have 1Gb "for free").

Nobody Likes A Mad Asian

| | Comments (0)

Teh lol of the night goes to Mad TV. Repost of a post with links, thank you Shuang.

An erudite newspaper like the Economist also likes to have fun.

And via xw, discovered EastSouthWestNorth, an extraordinary website that takes articles from Chinese newspapers at large and translates them to English.

I think that when I have the money to buy (and time to play...), I'll be investing in a PS3, b/c of Final Fantasy. The Wii's graphics might actually play more than the gameplay, as the graphics were less than impressive in a live version I saw this weekend. And the Xbox 360 is just irrelevant.

DIY laptop sleeve (temporary)

| | Comments (0)

Making laptop sleeve - one

Making laptop sleeve -  two

Making laptop sleeve - three

I'm a crafty guy, so I've decided to make my own laptop cover. It's temporary, b/c this one is just made out of a random piece of flannel ($1.02, taxes included) from Fabricville. I'll see how it fares in the next few days. Already, the flannel gathers dust.

Did this one by hand, first sewing both sides, three times each, and then sowing a four-layered piece of fabric at the bottom. I made it to protect the laptop from dirt and scratch-potent objects in my usual sleeve bag (where I plan to carry my laptop in), but is not strong enough to be held by itself. What'd be nice is a piece of minimalistic cotton one would use for making table cloth (but thicker). Thick synthetic textiles or some padded fabric could be nice - but I could use a sewing machine, which my grandmother has.

Basically, on the course of three days, I reinstalled Ubuntu 4 or 5 times, because I broke my installation from manual installs and installs from third-parties... In the end, I did the following:

- Let Ubuntu handle the wireless network adapter. Formerly, the driver (ipw3945) was previously said to be missing from Ubuntu, but it is now in linux-restricted-modules (which isn't installed by default either).
- Install the nvidia display taken from the Nvidia website. Followed these instructions (while getting the build-essential package, as well as the linux-source). There's a bunch of things I can do with my graphics card, like TwinView. See README. Here is the xorg.conf file I used. (The version from packages doesn't seem to support Beryl)
- Install Beryl + Emerald from the Ubuntu Beryl Project repository (deb http://ubuntu.beryl-project.org/ edgy main-edgy). More details.

And then, I'd like a virtual machine, and a couple of network services, and also an easy way to access my network resources. Phew! Sleep now - something I haven't had for the past week... Oh yeah, and Windows games. :P

Re: Toys

| | Comments (0)

IMG_0501

Inventory

| | Comments (0)

Desktop 061112

Toys

| | Comments (0)

Will be getting my Dell XPS m1210 next week. I started my shopping by ruling out Dell, b/c it's got a reputation for cheap - so we'll see in a year time. The Toshiba U205 and Lenovo V100 were at the top of my list (being ultra-portables - am unwilling to break my back from carrying it across town every day) instead, but ended up being too expensive at equal performance. The previous laptop we had in the family, my brother's university time IBM ThinkPad a21m, which is close to 7 lbs (the Dell XPS m1210 is still 4.4 lbs, but), is really ultra-solid and lives up to the ThinkPad reputation. I'm looking forward to install Ubuntu with Xgl and Beryl/Compiz.

Coincidentally, Lian Wee is in Malaysia, and also getting himself a laptop. Seems like small is the norm over in Asia. If I check this manufacturer's list of products, more than half of their models are "ultra-portables" by NA standards. My 2kg laptop is such a monster. XD

Installed!

| | Comments (0)

I reinstalled the Linux partition in i386. That means, all the proprietary software that I want. :P But seriously. Finally, I got hardware acceleration to work all the time, but it wasn't b/c of the AMD64'ness of the previous installation, just the fact that the card used a different scheme (one has to disable AIGLX in the server options). I tried to install Beryl, a recent fork of Compiz, a modern window manager, but could on only one screen. From the information I gathered, Xgl, the Xwindow server - the layer on which Beryl/Compiz works -, does not support dual screens, and I can't use AIGLX on my graphics card (ATI 9550).

That's why I'm I a softie

| | Comments (0)

I'm downloading an i386 version of Ubuntu Edgy. My X has been dead for about two weeks, and I've run out of ideas to fix it. Teh Google says nothing about the log errors, and any sort of obliterating reinstall of the ATI driver (fglrx) doesn't seem to work. I conclude that I probably did something wrong when installing fglrx manually, like in, not with something like apt-get. And my reputation as a Linux dork is suffering. There's no reason not to use Linux Ubuntu, b/c everything works, most of the time.

X has been the biggest headache. I venture the guess that my hardware might not be well supported, but I also cross my fingers that it's only the AMD64.

In the meanwhile, I'm on a 800x600 resolution on a 19" monitor, flipping through this, which I w0rd to a lot. Anyways, got to reboot. More later.

I'm impressed, but maybe I'm easily impressed. In fact, I've been out of the loop as to new web products. The latest big thing I encountered was Flickr. Flickr and its extensive use of AJAX - just the in situ edition of photo titles/descriptions is woaw-inducing. Like, seriously, how could you *not* have thought of that before? It's not even so complicated to make work, but I suppose it would be a little harder to optimize it. The problem with this sort of application (at least the problem I bog myself with) is how do you handle large scale deployments, so to make best use of bandwidth and that sort of thing? I am indeed one of those people who would do anything to strip down the code as much as possible to try and save on bandwidth costs.

MySpace, I don't know (but I do), is the summum of bad taste, the nightmare of a standards-conscious web developer. And the worst of it is that it dates of 2005, and people will keep using it, b/c they don't know better - or they don't realize that there could be better. People like my brother, who's not dumb at all (<3), who's using a clone of LJ (GJ), b/c it does what he needs his journal to do: be able to save pics and share them with his friends. And he's likely to stay there, bicauze all of his friends are also on GJ. It's mind-boggling that the success of MySpace does not reside in the raw quality of the product, but rather on *who* uses the product. In fact, not so mind-boggling when you consider that celebrities, people associated with the brand, has always made the success of a product.

Winamp has unicode!

| | Comments (0)

The beta, at least. But before you rush for it, audioscrobbler *still* sends stuff in ascii only (and I actually thought WMP didn't, but it does).

winamp_unicode.gif

And the title / header part now shows blank charas (probably because of the use of skin fonts, whereas you can override them for the playlist).

(music playing: a Mandarin self-cover of 你有自己一套!)

Firefox Beta 2

| | Comments (0)

Metros from the world

| | Comments (0)

Got at b3co.com!
I rarely do this sort of thing, but metros, how can I resist? It's from Metros from the world. Seriously, there's something attractive about this activity. Of course, it's to say "oh I've been to this city!", but subways are the foreign daily life cool that, if you're in a certain category of tourist, will want to do. Idem for supermarkets and cinemas, and beaches.

Tacos reborn

| | Comments (0)

The Tacos/Titan pair lives, as Jax. (Which means, for the privileged, unbridled access to my not-so-frequently-anymore "media" collection... :D)

And Webpic.

(Unlike what most of us thought, "Jax" is not for the Mortal Kombat chara, but some old fantasy novel chara, says Rob... yeah right.)

Indeed. My webhosting provider is getting attacked with comment spam, so am forbidding mt-comments.cgi until further notice... My e-mail's on Gmail, smurfmatic.

EasyUbuntu

| | Comments (0)

To remind myself that next time I reboot my comp in Linux (on nights I'm lazy, I sell myself to the Devil), I need to try installing EasyUbuntu. It makes promises of solving my multimedia woes on AMD64. "Only stupid people install their Ubuntu in AMD64". It's a shame, but really, half the drivers on WinXP 64-bit work. Still too geeky to be early supporter, I guess?

Google Labs, on a roll

| | Comments (0)

First, there was Google Spreadsheets (with a shitty permormance when run on Ubuntu, and it's quite okay on Windows - I have no idea why, except maybe optimization, memory handling, different versions, and pure luck), and now there's the Google Firefox Sync Tool. With my multiple workstations, and partitions, that's the greatest thing since sliced bread.

Wah, teh database errors

| | Comments (0)

A couple of junk trackbacks clogged MT to a stop (such that I couldn't rebuild the site, or post new entries). Had to delete the table for trackbacks using the sql web-console, and now it's fine.

My kind of laptop

| | Comments (0)

Flash memory as main storage for a laptop! Samsung did it. "Perhaps the most significant, according to the company, is that the Q30-SSD will operate in complete silence, lacking the quiet chatter of the hard drive or even a processor fan", it says in the article. The computing power is only so-so, and the price tag expectedly still prohibitive...

Retro fugly websites

| | Comments (0)

I guess that HTML and how people can screw up less with it has come a long way. This (1999 - not me on pic, but close :D - edit: from the times when alternately colored visited links were in) was one of the first website I made myself that was of "production" grade. Then probably came the schtroumpf chronicles archives site (circa 2000). I mean, wtf is the difficulty level today? Then, eventually there was the BUGS website, which was originally designed by a designer friend and then butchered by yours truly on bulky and un-simplistic software like Dreamweaver. I tend to code by hand, but moreover, I tend to hate things that require the point-and-click, since I knowlingly go for anything that is hardcore ("I drink motor oil in the morning"). Truthfully, it'd be cool to know how to make Flash animations, but since I was told you can code Flash animation *by hand*, then why the hell not do so?

So, more recently, I discovered PHP and liked modularizing my code with include tags, like for the CTF website (currently unavailable, becoz we got totally Russian-hacked/pwned two weeks ago, w/o a backup system whatsoever - thank Gott it happened right after exams!). Building on my knowledge of include tags, I did the Cool McGill web design... although the design isn't much of a feat, rather just the structure that I injected, which the previous site didn't have.

It's called the Interweb

| | Comments (0)

Was a Digg story, but ultimately "digged" out from the CBC online archives.

That thing is hilarious. Newsgroups. E-mail. Emoticons. _O_

My introduction to the Internet came during an end-of-school pool party a schoolmate was throwing during spring 1995. He was a total geek straight out of WarGames; his father was with the RCMP - and at some point, he showed off his computer, attached to some box with lights flashing on it. And so that was the Internet. Absolutely thrilling.

I'm reading this special report on Google in the Economist (which has an associated story on the concept of "Web 2.0", that buzzword coined in the seminal O'Reilly article). Things do look quite exciting around the corner. AJAX has been a buzzword of web programming for about a year or two (if you don't know what it is - it's used in Gmail and Flickr, basically so that small web requests are done w/o reloading a page) and it's on my top list of things to learn this month (along with the Google Maps API, Ruby on Rails and ActionScript), and it's just one of those new technologies that facilitate user interaction, thus encouraging user participation to the web.

Welcome to the wireless era

| | Comments (5)

Yessir, I'm now wireless! Earlier was under the sun outside Redpath library; currently scrambling to find a power jack. 38%, 13 mins left. :/

The Dapper Drake beta

| | Comments (0)

Just upgraded to Ubuntu 6.06 beta. It's easier to install than Windows (didn't fully reinstall, b/c upgrading from the Badger release). The previous Ubuntu release still required you to go through a text dialog mode, but this time, they seem serious to have you boot directly into a graphical mode.

So the gang at Canonical delayed the release of Dapper Drake from April to somewhere in June to make the distro more user-friendly. So far, so good. I'm indeed happy about my glossier windows, although I'm still wondering if anything fancy like MacOS' dock (which has been more than two or three years old, and nothing of that sort was seen on either Windows or Linux) will ever arise - considering that eye candy means lifestyle improvement, and which is what I think pushes the need for computer upgrades (just look at Windows Vista).

To be satisfied completely, it will take Adobe to release a version of Flash that works on 64-bit OSes. I don't really need 3-D desktops (as much as people working on command-line environments didn't think they need a *mouse*), and surely, I've seen some beta-ish apps for Linux that do that and which I don't want to touch with a 10-meter pole for the sake of my system's stability.

Ubuntu Linux is a really cool idea, and free installation CDs shipped to anyone, anywhere around the world should be the alternative to Windows (or pirating Windows - if MS really becomes tight about this, like some sort of online registration system, people may flock to free alternatives).

It's better than Slashdot

| | Comments (0)

Digg.

At first, I thought it was an inconsequential Slashdot article (in fact, I omitted to read it on the first pass), so didn't comment on it, even if it underlined one of the stupidest case of technical incompetence to ever come out from a multinational corporation. But the news gathered strength (took a week?) and made it to the BBC tech section.

Basically, the engineers at D-Link, probably second or third brand name for routers and switches, in my mind-as-reference, hard-coded the server names of the main time servers in the world in order to perform whatever task (synchronize device's time, surely). It was probable that most owners of time servers did not care, or even saw the difference (b/c most are run by public institutions - Canada's NRC, for instance). But Denmark's was run by an individual, who made a deal with a local ISP to borrow bandwidth, etc, for free, and made to serve time to a select number (~2000, in article) of orgns only. That is, before those routers from D-Link came on the Internet and flowded the Denmark-based time server with requests; with the expected issues of "who's going to pay for that" with the ISP and the individual who volunteered to provide time.

The bad was probably to query non-D-Link servers for time. To the naive (me), it would've made very simple sense if the company set up some sort of middle-man server to get time from whatever official source, and then have its routers/switches query it. The ugly was surely to hard-code the list of time servers to query. And so, on top of the initial problem, you have the problem of having a problem that is not easily fixed (forcing a firmware upgrade on every single user of a faulty D-Link device).

Visions of a Google future

| | Comments (0)

Two nights ago, when I was taking a leak, I thought that, hey, one day they'll standardize toilet flushing data and have RSS, or more generally some XML files to be served from the device's own network server.

Let April begin...

| | Comments (0)

The Day I broke LJ (and GJ)

| | Comments (0)

"To your left, you may see how the LJ feed's html tags are decomposing as the incoherent gt and lt signs are applied; and now, if you turn to your right, this LJ clone isn't faring much better, thinking that the last few words were in fact attribute of themselves in some giant multi-attributes square-braketed tag."

Getting rush of adrenaline from work is extraordinary. Not sure if it's an aperçu of the proverbial work-hard-party-hard(er), or what, but seriously, having to crash my way through to the finish line is simply almost like living a Habs comeback from a 3-1 deficit in first-round series. Gosh, I even squeezed in 15 minutes at the pool!

Green-glow pigs

| | Comments (0)

Sure, I can sort of see the scientific benefit of it, but green-glowing pigs is simply the most hilarious four-legged idea (and reality) I've heard in a while. :D

2005 Year-End Google Zeitgeist!

| | Comments (0)

ATI graphics card on Ubuntu

| | Comments (0)

Not everything will work perfectly smoothly on my Ubuntu Linux install. There are a lot of problems solved (like streaming music, video, to a certain extent - it would give you what you want most of the time, but also crash the whole browser, if embedded, or be extremely choppy for non-embedded, like for some non-streaming formats), some of them that will never get solved until a company decides there's a strong-enough [demand/customer rage] (like for Flash, or Java plugin), and some in the esoteric annoyances.

In the latter category, I think it is the way my ATI graphics card driver is working - or not working - that wins the palm. It would load correctly sometimes at load time, and it will equally not load at all, throw an error, at other times. An issue with the driver, thus the kernel. When the ATI driver doesn't load (it's a proprietary non-free driver made by ATI), then an alternate generic driver (mesa) is loaded instead, with poorer performance (b/c it is generic?). I don't know what it is, and I'm quite pessimistic at what I can find on Google (or "resourceless", b/c I don't know what to ask Google), so I've resorted to bearing with it (besides, not having my graphics card work properly is really just an annoyance, b/c it just means the cool screensavers aren't as smooth, and, well, I can't play "games"?).

I did notice that if I reboot my system, then it would probably work at the next reboot. I also suspect that it might have to do with my dual-boot, or more precisely, whether the last operating system booting was WindowsXP or Linux, which is a far-fetched explanation, but certainly worth trying when there doesn't seem to be any other obvious variable at boot time.

Will test that out...

I think I try to unbore myself by listening to the radio - loving the music and shows on Radio-Canada/CBC so much. And now I discover that podcasts can be useful to non-iPodders, with software like Juice (I was told one can subscribe to podcasts by Winamp?). Well, anyways, nothing new under the sun - it's sure kind of intriguing as to why while the technology was there for such a long time (RSS, compressed audio files, widely available broadband Internet access), it would take such a long time to add things up, and for the concept of "podcasts" to be widely accepted as mainstreamish (of course: the iPod as the trendsetter).

RSS support will be built-in into the next version of Windows, Vista. While one might hate Microsoft for its all-mighty presence, it is for the mainstream computer user population the only thing that exists. Like, Firefox might have implemented tabs since its debut, but the "people" will only know about them (and learn to cherish them) whenever IE7 comes out... At least, it was announced this week, the MS IE7 team is deciding to use the icon for RSS popularized by firefox.

In the meanwhile, Radio 3 and Bandeapart.fm have awesome podcasts (the first being CBC's Canadian indie music semi-radiocast / full-satellitecast and the latter, its French Canadian equivalent), for low periods like 12 to 6 AM on Fridays...

"You have discovered Javascript!"

| | Comments (0)

("and you may now build killer webapps to destroy your opponents!")

[music: some electro song with a Hubert Reeves interview (about humans destroying the planet, no less) sampled in the bg??]

(Bande à Part, which is really the French equivalent of CBC Radio 3, is the best indie muse playing on the radio 12 to 4 (AM, that is). Besides being a show on regular radio wave radio show past midnight, it's also a complete radio station at normal hours on Sirius (with podcasts - which are in other words, for non-iPod-havers like me, legally free phat-ass music files!).)

Raging searchbots

| | Comments (0)

Check out the webstat for the month, almost past the midway point for my bandwidth allocation, before they start charging me 10 euros for the next gig! >_> And look at the current top hit, just b/c I spoke of the new PQ leader, Google takes it further and implies what the top Habs prospect might be (so, we'll ask my brother's girlfriend's friend to ask it directly next time she sees him *g*). I'm going to tell Google to leave me alone, bah. All the trouble with having your self-domain; don't know why people are still doing it, with free services so readily available for free - same with that bandwidth, storage-space-scarce e-mail services...

Is for the Xbox 360 to screw up (like it seems to do in Japan). The other observation would be the insufficient production to fit the demand. In any case, the P3 is by far superior hardware. The war, although, is going to be won by the game lineup. If I were to buy into the next generation of game console (b/c we didn't on the current/previous one), I think it'd be the one that will be making the next in line in the FF series.

(This entry sounds so self-obvious; why am I even writing it down?)

Woaw, it's awesome! You can read the sun logo in all four orientations and it will always give you "sun"! I've never noticed that!

sun.gif

Just as you fought for several hours (if not the whole day) an error that ends with "Service exit with a return value of 1", you think, gee, maybe if I changed the permissions of the directory (and so you do), and it returns a "Service exit with a return value of 122". _O_ (I am talking to myself)

Edit (a few mins later): Holy fuck, the return value of 122 was just b/c the daemon was already running - after I just set the Java install dir from 644 (read-write for all) to the correct 755 (world-executable) and restarted Tomcat again to see. After I restarted it once again, the server worked just as it did before! I can't believe I spent the night up (to learn all that had to be learnt on Tomcat, daemons and the intricacies of Java installation) just b/c of a stupid permissions mixup!! >:O I have my lesson: never underestimate permissions.

Fearless mice

| | Comments (0)

As seen on Slashdot (and read the 2nd entry of the thread).

Cannot work

| | Comments (0)

InputStream, OutputStream. InputStream, OutputStream. In principle, you think, why don't people just manipulate files as files in applications. I upload a file, therefore I deal with a file, which I can therefore insert on the server's filesystem. But NO, the file you get is in fact an abstract mass of bytes with headers, and which needs to be invoked as an InputStream to be usable by a program, and if you need to save it somewhere, you then need to convert it to an OutputStream, which will then be taken and saved where a file can be created... (and nicely enough, some frameworks from a file uploaded will even give you the bytecode to be directly used in an output stream) Why isn't computing like in Tron, or worse, like in Swordfish? T_T

(I always liked 'Eugenie' as a daughter's name - b/c it reminds me of Imperatrice Eugenie, Napoleon III's wife, and on whom everyone seemed to have a crush on (including the sovereign of Egypt). It's ancient enough to be a hit for people of my generation to name their kids after. Like 'Rose' or 'Ada'. Or 'Rosaire' for a boy's name? Hmm. In fact, I'd like Chinese names best. Give me a moment to think about this...)

teh painful

| | Comments (0)

It was a painful evening trying to recover Sabs' HD. It wouldn't have been a complicated thing if my g33kn3$$ did not fog me from the law of the best solution being the most simple solution. In fact, we did the following: boot a perfectly working Linux computer with a Live CD, after removing the principal HD, and plugging in hers (with two partitions, one VFAT, the other larger one, WinXP-native NTFS). Transfer the files she needs to another Linux computer on the network. Transfer them again on a Windows 2000 machine, upon realizing that the 2nd Linux one didn't have a viable CD writing program. All this b/c Linux, as lovely as it sounds to my ears, refuses to work properly, and b/c I didn't think of, damn, just plug the HD as a slave drive in a working Win computer!

I can assure you that just two years ago, on my first Linux install, it really really sucked. The installers sucked, the packages sucked, *everything* sucked! I think that with Ubuntu, you are really starting to get a Linux distribution that can hold the road for desktop users. I can work from the command-line, but it's really all much more enjoyment if your favourite basic apps like a proper CD-burning utility was to work according to plan! Why the eff am even using WMaker as my windows manager??

These are moments when you don't care about raw power and go for the bearness of a Mac (it has nothing of a tiger or panther, imho - and windows is a duck).

Posting from da Ubuntu box (bis)

| | Comments (0)

I got the ATI driver to work with 3D acceleration. That means games and cool Linux-only kickass screensavers. Yes...

Advice of the day! If you are ever faced with a crashed system, do no panic! Burn yourself a Linux LiveCD, which is Linux on a CD and boot from it, instead of from the hard disk. This will allow you to access your system, w/o making any changes to it (everything runs on the RAM, so you never actually modify your existing system). The most well-known Linux-on-a-CD is probably Knoppix, but many other "flavours" exist, such as Ubuntu, the live version.

In the future, one can imagine people storing their whole computer data (operating system included) on a portable memory device (USB key) and just carry it around to boot on any terminal they find on their way. Now *that's* portability. People already make live Linux for USB keys, but when the tweaking will have been done, I'll be an adopter.

Sunday Night Medley

| | Comments (0)

1- First, hi to the few people who may've added me to their blogroll in the past week or month. I used to have the habit of sticking up a few blogs on the sidebar too, but the turnover's been so great that I gave up I'm really a lazy person. Maybe some time again soon. I think it's nice to have at least a few infos about the owner of the blog. Project for the Holidays: embellish the contents of this blog. It's like getting a new haircut, buying new shiny clothes. (I syndicate my blog on Livejournal - this too I will add to the sidebar, eventually)

2- After pondering about Windows/Mac/Linux the other night, I decided to submit the question to the g33k list. Besides what I anticipated to be the next great things to come to the world of home computing, I also asked, well, if Apple is switching to Intel chips, would it mean the same Intel chips used by Windows computers (ie x86/AMD64)? The expectation was that, yes, this is probable, while possibly Intel could still develop a different architecture to fit in the new Macs. If yes, I wondered, wouldn't I just be able to build myself a computer with cheap parts and run a MacOS X deemed superior to Windows, thus save from giving extra bucks that I would have to fork out on an Apple-manufactured machine? Then Rob points out, maybe not, b/c of Trusted Platform Module. In other words, while potentially running on the same sort of chips as any Windows computer runs on, I still wouldn't be able to, b/c of some sophisticated mechanism that locks me out during the installation/running process. This is very evil. In some sense, Apple is even more "evil" than Microsoft, b/c it doesn't just control the software, but also the hardware! (which is not news, and not threatening/considered evil, while Apple's still the underdog)

3- Genies en Herbe trivia compete today. 4 wins, 2 losses (we did not win last year - but then we merged my duo with Felix, with Nicolas', acquaintance from way-back-then cegep, but most importantly top-scorer in combined GeH leagues for several years I believe). My average score has plumetted, as a result of Nic's contribution to the team. But it is to point out we never won before (20 something losses, one tie game last year).

4- My grandparents are leaving for HK next Saturday (and will be coming back right when the snow starts melting). I don't know how to say this. I've taken conscience in the past years about my mortality and realize how little time there is to see/talk with those we love, and even to live our own life the fullest? There are many periods of relaxation, but too many of them to my own taste. Since the August to September two-month hiatus after coming back, I've been thinking that what I would really long for is work hard, party hard - along those lines. Surely have freedom as an inspiration. Work, is what you give to society. And money, is a way for society to say, gee, thanks for being useful! I am drugged up from the lack of sleep of yesterday night from the irregular sleeping times, and having to wake at 9PM for item #3. I like to speak with old people - and I enjoy speaking with family members, b/c I know they won't be there forever. I often wonder why I am not extending this to friends, or even strangers. Setting social barriers to not be overwhelmed?

5- One former co-worker invited a few of us (myself, other former co-workers I know, have seen around - who aren't so "former", b/c I work in the same old moldy building, just on different floors) over to her flat for a home-cooking night. Maggie is Shanghainese, and so cooked a few local dishes, like "Shanghainese salad" (potatoes, ham bits, green peas, carrots, with mayo sauce - which actually reminds me of a salad I was served at another home-cooking happening they had at Uri's Japanese teacher's home when I went over to that fishing town where he teaches English - maybe it's just b/c we don't make cold dishes with mayo/peas/carrots/potatoes), fish pieces sauteed with Chinese 'shrooms/fungi, or one more Sichuanese-style stir-fried chili chicken with cashews. We then sipped some oolong, plus the jasmine and "one-leaf" tea.

6- Canada's going to election! And we'll get yet another Liberal minority! This country is in an impasse. It will probably never go for the Conservatives, still painted as red necks from the West by the media (I need to read more about their platform). In any case, due to Canada's political system, my vote will not count as my riding has been Red Liberal, like, forever. The Conservatives will never carry a majority, simply b/c they are the incarnate devil in Quebec (while the Libs can at least expect to get a few ridings in Qc, mostly in the Montreal area and other urban zones). The Bloc has Quebec, the Liberals, Ontario, and the Conservatives, the West; and fill in the blanks with Orange NDP.

7- My father loves Jewel In the Palace, but even my mother, his inseparable dramas-watching partner, finds it totally cheesy.

Oh, so it was genetic...

| | Comments (0)

Posting from da Ubuntu box

| | Comments (0)

computer.background.20051111.jpg

(The picture is of an old appartment block in North Point, Hong Kong Island, where my uncle's mother lives. A beautiful sunny afternoon - the pic turned out better than I thought it would, with all the sunlight, daily lives of the inhabitants hanging by their windows...)

There are quite a few non-trivial things still not working, but I'm finally satisfied with yet another Linux installation on my computer, the second of the Ubuntu distro (since the last one crashed on me a few weeks before Asia - to the dismay of other Ubuntu-lovers). Simply, Ubuntu is such a Desktop-based user-oriented distribution that it shouldn't crash, and everything you love on a Windows machine should be available on it, less the fanciness of a Mac (which I would probably get, if I were to buy myself a laptop, but as for desktops, a Mac is out of question, b/c of its lack of raw power, and design is not such an issue (in the portability sense) as it would be for a desktop laptop (a terrible lapsus making the whole sentence nonsensical - but my brain does not compute)).

Speaking of Macs, they successfully ran MacOSX on a Toshiba laptop, but I don't think they're news. Speculating, I would want to be optimistic and think that Apple is going head-on against Windows, on Intel/AMD chips, the i386/AMD64 architectures, which everyone has. It's probably daydreaming, when we consider that the sale of hardware has been the milk cow of Apple for several years. MacOSX on i386 is probably a leak (and I didn't read the recent reports to really know). I am putting my money on another clever marketing trick Steve Jobs pulls out of his ass on regular basis.

Some hopefuls: the iPod with wireless access, so that you can listen to web-streamed radio stations; a Flash memory based laptop, if I understand well that flash memory consumes less energy and is much much lighter than good ol' spindle HDs.

I run Linux now, mostly for work, b/c I was pissed at Cygwin/X not providing easy X-forwarding. Linux is cool b/c of X-forwarding, and not anything else (except the fact that it's free). The big desktop support for Linux is flaky on the latest ATI driver, so I have to rely on an older driver that doesn't accelerate my graphics (so when the really cool Linux-only 3D screensaver collection shows up, it's as if I *didn't* have hardware acceleration...). And b/c I choose to use the full "power" of my 64-bit chip (which really isn't required for the feeble desktop work I do), I don't get Flash, Acrobat or Java runtime to work properly. These are big annoyances people talk about in forums. You software companies can eat my shorts with those penetration rates you boast. :D

Like being slashdotted

| | Comments (0)

I got linked by something this morning, and it produced an avalanche of hits to this site. I've yet to figure out how that happened, since this site rarely gets Google hits on anything interesting... My guess, must be blogging from Flock. >_>

Blogging from Flock

| | Comments (0)

(Testing, testing?)

I guess I'll know if it's working when I press the Publish button... This Flock is another one of those cool new web age applications everyone must try. I think it attempts to make the web more interactive. One's usual web browser allows you to "read" the web, but Flock aims to provide all sorts of "write" features, starting with an integrated blogging tool (integrates with most popular weblog software - LJ, Blogger, MT). The rest of the cool features. (Oh yeah, the blogging tool integrates one's Flickr feed...)

I love myself, so have syndicated this blog over both Livejournal and one of its clones, Greatestjournal.

But anyways, I've read from the Livejournal flist, that you HTML takes heart characters! & + hearts + ; = ♥ (if you are dim-witted, see source code for entire explanation).

I win!

| | Comments (0)

My current work's to convert some program from a language (PHP) to another (Java). I hit a bump however the other day (Thursday) when I needed to re-generate the code for the mapping between relational database tables to Java objects, after updating the config files to fit (my mood) the new requirements. But it didn't work smoothly b/c of my user environment and stuff. It had to do with my classpath. So what do I do? Edit the classpath? The solution eventually appeared when I scraped the whole classpath!

Moral of the story: trust your instincts. When you think your desk is a mess, makes you uncomfortable, then maybe it's time to make clean [slate] (in this case, ant clean *g*).

Programming makes so much sense. It's like building a machine out of words, grammar, in place of nuts and bolts. There is beauty in elegant (or less elegant) programming style. Ever heard of obfuscated code-writing contests?

Hurricanes and shit

| | Comments (0)

Wah, it appears that the 2005 Atlantic Hurricane season will have exhausted the list of available names (and there's still officially a month and 10 days to go - 'til November 30th, that is). So, we're likely to see Hurricane Alpha, Beta, Gamma, etc... (we're not going to reach Omega this year, phew!) And in the meanwhile, Wilma (where's Fred?) is passing in between Cuba and Yucatan, and heading straight for Florida, or for the very least, US territory. So, who's not going to ratify Kyoto, now? *g*

Science rules!

| | Comments (0)

Indeed it does.

[music: NiNa - Old Delhi]

(When you don't think so much about, you figure that NiNa is such a delight. How to combine Japanese cute and American kitsch in a better way than putting their respecitve performers together in the same band?)

Everyone! Get OpenOffice!

| | Comments (0)

Google and Sun double-team Microsoft.

It's twofold. I've been feeling bad about pirating MS Office or anything for that matter (everything on this computer is free, besides what runs it :P). And I am a MS-Hater. So... The new OpenOffice 2 will be out in a matter of weeks, if not days, as it's at its "release candidate" stage. I'm not sure if it's superior or inferior to MS Office, but so far it has done perfectly what I wanted it to do (produce a ~100 pages book-like document) with a minimal amount of adaptation (more from writing in text-only to formatted text). It's free, and much prettier than OpenOffice 1.1. It's the shizzah. Go download! GO!

After exhausting jpop, indiepop, québécois pop, frenchpop, I've reverted to teary sappy Cantopop?! (I need new music)

[music: Fiona Sit - A boy like you]

So Dr Evil did have it his way...

| | Comments (0)

Relatively funny shit

| | Comments (0)

Yup, I messed around with templates, OpenID auth, and inadvertedly destroyed my styles. So now showing off the MT 3.2 default stylesheet... Which isn't that bad after all, but I suppose if I went out there, I'll realize I'm not the only person using MT-3.2. :P

Moving on... So I was trying a few plugins for 3.2, including one that allows authentication using OpenID, and Livejournal IDs. But unfortunately, yours truly is not very methodical in figuring out the use of MT tags, therefore I'll leave this for another night. It's not like troops of people are, like, dying to comment on my blog using their Livejournal IDs.

In other news, I activated some "tagging" plugin, which I guess, should help me classify the mess that is my blog?

About this Archive

This page is a archive of recent entries in the t3h g33kn3$$ category.

Society is the previous category.

Technology is the next category.

Find recent content on the main index or look in the archives to find all content.