Archive for January, 2009

My First Poetry Slam

Monday, January 19th, 2009

Relax, I was only a spectator.

Last night I went to an album launch and poetry slam called 3, 2, 1 THROW! organized by the THROW Slam Poetry Collective in Montreal. I didn’t really know what to expect from a poetry slam. It was at a pub/bar/restaurant called Casa Del Popolo north of Mount-Royal on St. Laurent.

I rarely go to anything by myself, but I went to the slam alone. I recognized one person from the Facebook invite; she had been the one that told me about the event at a party a couple of weeks back. I sat at the bar with a beer and chatted up strangers as they came up for beer or water. I found the people there to be very friendly and outgoing.

Before the slam started, a band called Instant Release from Ottawa was playing. I chatted up the bassist at the bar between sets. I didn’t hear too much of them at the beginning, but when they came on for their second set, everyone was really digging their music.

Then the slam. Two rounds of poets singing/talking/doing whatever to their poetry on stage to a silent audience (besides the occasional laughter for the funnier poems). Volunteers from the audience were judges. Through a small series of events, I ended up being a judge for the second round!

If you haven’t been to a slam, you should go. Even if you don’t think you like poetry, or if you’re still not sure what a slam is.. just go. It was definitely the highlight of my weekend.

Poster for the album release and poetry slam.

Poster for the album release and poetry slam.

Check out their Facebook group for upcoming events.

Installing the Canon EOS Utility using the Updater Tool on Mac OS X

Saturday, January 17th, 2009

It was a late Friday evening. I was at home with my new Canon Rebel XSi, and I was trying pictures of myself. I heard that the EOS Utility that comes with the camera allows to control the camera from your computer through the USB interface. You can only download updates from the Canon website, which require you to have the original media available or an older version of the software installed. I left my original media at work, but I really wanted to use this tool tonight.

After some poking around in the package, I found that inside the package’s update.plist file, there is a node called NeedAppsArray. It has a list of application names as well as signatures. The first item in the list of application names is EOS Viewer Utility which has the signature of CEUX.

With this information, I took a random application in my Applications folder and modified its info.plist file so that the bundle name and OS type creator code matched the values I mentioned above.

After this change, the installer ran without problems. You can get at these plist files by right-clicking on the application and clicking Show Package Contents.

Butter Chicken Recipe 1.0

Sunday, January 11th, 2009

I’m trying to learn how to cook meals beyond quesadillas, wraps, burgers, nachos, etc. I want to be able to make an awesome sweet butter chicken. I can make a spicy/mild one without too much difficulty using this recipe.

Today I made a pretty good sweet butter chicken. One of the spices I put in was a little too strong, but it was pretty good. Next time I’ll reduce the amount of the spices from ~ 1 teaspoon to 1/2 teaspoon, and use some tomatoes. 

2.0 Modifications, which I have tried and make the butter chicken even more awesome. I didn’t reduce the spices to 1/2 teaspoon, but instead used lightly less than 1 teaspoon for each of the spices.

  • No ginger.
  • No package of spices. I just use my own spices and the curry pastes.
  • Add some sliced tomatoes. I add the tomatoes during the 5 minute cooking of chicken after adding the brown sugar. Maybe a couple of minutes after the brown sugar. I’m not really sure when the best time is, but it turned out fine this way.


  • 300g boneless chicken, cut up into small pieces.
  • 1/2 teaspoon grated ginger.
  • Small clove of garlic, crushed.
  • 1 teaspoon coriander.
  • 1 teaspoon cumin.
  • 1 teaspoon turmeric.
  • 1 teaspoon chili powder.
  • Pinch of cinnamon.
  • 1 tablespoon brown sugar.
  • Some heavy cream (I used Thick Cooking Cream)
  • 1/2 onion, chopped.
  • Some cooking oil.
  • Curry paste. I used almost one tablespoon of Vindaloo and another tablespoon of tomato & paprika. The ones I have are “Patak’s Original”. You can probably find these curry pastes at Metro Plus or Extra Foods.
  • 1/4 package “Indian Butter Chicken Spice Paste”. Again, you can pick this up from Metro Plus or Extra Foods. 


I used medium-high heat for frying the onions and cooking the chicken. I then put on a very low heat after adding the cream and curry paste.

  • Put some oil in a pan, and fry up the chopped onion until it gets brown. I usually add the garlic with the onion.
  • Once brown, add the chicken pieces.
  • Add the spices and brown sugar.
  • Mix around and cook for about 5 minutes.
  • Add some heavy cream. I didn’t measure, I just added as much as I wanted to have a good amount of sauce. 
  • Add the curry pastes and the spice paste.
  • Mix well.
  • Turn stove to a low heat, and cook for about 10 minutes. 
You can serve it with rice and/or nan or roti. I prefer roti.
Butter Chicken


Las Vegas Trip

Sunday, January 11th, 2009

I organized a road trip to Las Vegas for a friend’s bachelor party. There were 8 of us in total. We’re all into technology, so we made the road trip a little more interesting for ourselves. We decided to map our location (as well as some other interesting bits of information) using Google Maps.

Our friends and family were able to track our status real-time by visiting a web page. This page had several pieces of information:

  • large map detailing where we were and the path that we have taken so far
  • smaller map, zoomed in, showing our exact location
  • image taken from the USB camera, refreshed periodically
  • comment set by us whenever we had something to say
  • Flash chat application

This was the page: Unfortunately it isn’t too interesting now because nothing is happening, but you should get the idea.

The awesome details:



  • Bluetooth GPS
  • Macbook Pro
  • Logitech USB camera
  • Power inverter (to keep the laptop charged


  • wacaw – command line tool that allows us to take pictures using the USB camera
  • gpsd – interface with the bluetooth GPS device (installing through Darwin Ports)
  • home-brew Python script
  • Some very basic HTML and Javascript

Getting the Hardware and Software Setup


It took us awhile to find software that would work with a USB camera. We needed a command line tool (or library) that would take pictures using the USB camera. You’d think this would be easy to find, or even built-in to OS X. Once we found this software, the installation was pretty straightforward. Just a download and copy of the binary (wacaw) to wherever you want. The command we ended up using to take pictures was:

$: wacaw –width=640 –height=240 somefile

If that produces an image that works, the camera part is setup.


We had to install Darwin Ports on the MacBook. After installing darwin ports, installing gpsd was pretty easy. There is a server/daemon component and a client component. The daemon (gpsd!) obtains information from the GPS device and exposes that information to you.

To get it running with our device, I think we used the command:

gpsd /dev/tty.BT-GPS-33334B-BT-GPSCOM-1

You can test that gpsd is running properly by connecting to port 2947 (the default for gpsd) via telnet, and issuing a gpsd command. ‘o’ will give you a bunch of information.

The Code

We wrote several scripts for this project. All of them very simple. Our primary objective was to not lose any information. One way to lose data would be to grab GPS information, then try to upload that information somewhere all in same script. What happens if network is down or the transfer takes too long? You could be recording more GPS data during the transfer.

GPS Recorder

In an infinite loop, record GPS information every second to a file. This was our “raw GPS” data file. Other scripts were able to grab data from the raw file, but this scripts only job was to write data to that file. Actually, we wrote information to two different files. One file was completely raw information retrieved from gpsd using the ‘o’ command. The other file contained data that was easier to parse. The reason we did this was because we weren’t sure what other useful information was available int the gpsd output, so it was probably a safe plan to record it all in case we wanted to go back and look at it later. This second file had entries that looked like:

{timestamp:1209966962.66, lat:37.421302, lon:-122.083705, speed: 1.559, altitude:1.40}

Wow, that looks like a JSON object, doesn’t it?

GPS Pusher

The pusher’s job was to read the file, and send the JSON-like objects to our web server. I think we sent 1 in every 10 lines. We abstracted the pushing of data by creating our own datastore module, which I’ll talk about a little later. The points we sent to the server were used to create the trail on the map as well as update our current location.

Picture Taker

Pretty much like the GPS recorder, except this script took pictures in an infinite loop. It used the wacaw command to take pictures.

Picture Uploader

The uploader would look for new pictures in a particular directory, upload 1 in every 30 pictures to our web server, and move all the pictures to a new directory. Again, this was in an infinite loop. If we have new pictures, send every 30th picture to the server, move all pictures to a new directory for later use. We didn’t use the datastore for uploading of pictures. Instead, we used ftp via ftplib.

Comment Setter

Simple script that used the datastore to upload a comment:

echo “We are on the road!” | ./


The javascript periodically reads the file containing GPS coordinates and updates the map appropriately.

I can post the code we used if people are interested. Just leave a comment.