Gentoo gcc upgrade...again?

I just upgraded my mythtv backend's gcc from 3.4.6 to 4.1.2. It's still compiling all of world now and will be have been about 24 hours when it's all done. Then I did an emerge --sync and now there is a gcc 4.3! Arghh.

Vancouver Needs Real Street Food

Travel to many cities in the world and you will find street food all over the place. Delicious street food. Walk in Vancouver and there is almost no street food. I can only think of 2 hot dog vendors on West 4th or West Broadway west of Granville St. The one near Future Shop just west of Burrard and the one at the corner of Graville and Broadway in front of the Chapters. You can walk a long time downtown before stumbling across any street food, and it's mostly just hot dogs or Crepes.

Django Applications at Work

Today someone at my work just released a simple Django app, the second one now running at my company. Here are the two Django apps running so far:

Drupal Audio Handling is a Mess

The state of Drupal audio files support in Drupal is a mess right now. The audio module, which is great by the way, has not been fully updated to 6.x. This effort has probably been hampered somewhat by the fact that "audio nodes" is not the way that most drupalers want to treat audio going forward.

Don't Rewrite Working Black-box Code

At work I am modifying an existing tool to work from the command line instead of a GUI. Currently everything is a bit coupled to the GUI. On Friday, the next problem I encounted was a global variable in Common.py that was not initialized.

""" Common.py """
def initHSCM():
    global hSCManager
    ...
    hSCManager = win32serviceOpenSCManager(None, None, win32con.SERVICE_ALL_ACCESS)
    ...
 
...
def startService(service):
    """ function that uses hSCManager """
    # These functions don't work when hSCManager is set to None
 
def stopService(service):

Ticket to Ride

[img_assist|nid=333|title=Ticket to Ride: Europe|desc=|link=none|align=left|width=256|height=192]
I recently purchased Ticket to Ride: Europe, an excellent board game by Days of Wonder. I've played it four times with 4 players, and twice with 2 players and I'm still not tired of it. The best part about this game is how simple it is to play and that games don't take very long to play either.

Weight Gain During Pregnancy Progress Tracker Spreadsheet

When woman get pregnant they are supposed to gain weight. Not gaining enough weight can cause problems just as gaining too much weight can cause problems. But when you are 4 months pregnant or when you are 7 months pregnant it is hard to know how much you should weigh at that point in your pregnancy. I made a spreadsheet to help my wife know at any point of her pregnancy whether she is underweight or overweight relative to the end target.

Using XML for Code Documentation is Just Plain Wrong

I was just looking at some C# code at work today and it had XML Documentation (like javadoc or python docstrings, only with XML). Who was the idiot that came up with that idea? It's the most insane thing I've ever seen. Let's look at the predecessors to C#'s XML documentation:

Drupal Module Updater

This script will automatically update a drupal module if your drupal source code is stored in a Subversion respository. It first removes all files except for the .svn directories, then extracts the tarball for the new version of the module. Then it runs an svn status command to see which files are new, which files have been removed in the new version, and which files have changed. The difference between this and svn_load_dirs is that renames aren't handled (well svn_load_dirs doesn't really handle them very well either).

Batch JPEG Photo Renamer

I used this script all the time before Picasa finally added this functionality. This script renames a whole bunch of photos, in a directory for example, appending numbers to the end of a base filename according to the EXIF dates stored inside the JPEGs. For example, a directory full of files that looks like this:

IMG_0123.jpg
IMG_0124.jpg
IMG_0127.jpg
IMG_0128.jpg
...
IMG_0248.jpg
IMG_0250.jpg

could be renamed to this:

Camping Photos_001.jpg
Camping Photos_002.jpg
Camping Photos_003.jpg
Camping Photos_004.jpg
...
Camping Photos_112.jpg

Low Disk Space Warning Script

Have you ever experienced a full disk on a server or a desktop? Not fun. This script would normally be run as a cron job and would notify you by email if any drive's free disk space has passed below a certain threshold. The code could be better; I wrote this one a long time ago when I was a bit of a n00b and I was in a rush as well. I might make take a look at it again and see if I can make some improvements.

mp3 Sample Clip Creator With Fade-In/Out

This script will create mp3 sample clips. I created it to automatically create sample mp3 clips for a friend of mine's (Will Stroet) website. You can tweak the length of the clip and the fadeout. Unfortunately it can only create samples that start at the beginning, however, it could be easily modified to start anywhere. It depends on the quelcom library, lame, and mpg123.

Why I Chose Python Over C#

I was recently tasked with writing a sipmle UI and the choice of what language/framework to use quickly boiled down to two choices: C# or Python. I eventually chose Python and here's why:

How to disable ccmexec.exe

ccmexec.exe was using a lot of CPU and I/O. Disabling the "SMS Agent Host" service gets rid of it.

How To Stop Chrome Thrashing to Disk

Google Chrome will thrash to disk a lot to disk, at least in version 0.2.149.27, build 1583 (the first publically available beta) in Windows XP. It is so bad that my entire computer locks up a bit and becomes unresponsive. Disabling phishing and malware protection seems to stop the thrashing: