Dell External Wi-Fi Switch

So the other day the WiFi stopped working on my Dell Inspiron 1720 laptop so after a little bit of troubleshooting and assumed the mini-PCI express wireless card was fried and ordered a new one from Dell's website. The new one didn't work either. Then I suddenly remembered that there was some sort of WiFi switch on the side of the laptop. I felt the switch and moved it moved it in the direction of "On" and it clicked! So it had been turned off! We move our laptop around a lot and somehow the switch had been switched to the off position accidentally.

Windows and 64-bit

Doing development, or more specifically deployment in a Windows 64-bit environment can be a frustrating experience. Let's start with a simple example from MSDN about the File System Redirector:

The %windir%\System32 directory is reserved for 64-bit applications . . . Whenever a 32-bit application attempts to access %windir%\System32, the access is redirected to a new directory, %windir%\SysWOW64

Concatenate/Combine PDF Files in Linux

I know there are lots of ways to do this. This is not a HOW-TO, but just sharing a script I made for doing this. It's a decent example of how to write a command-line utility in Python.

Since I write my cover letters and resumes in LaTeX I always need to concatenate the two together before sending it to an employer. This is very important so that the person on the other end prints out both and it makes their life easier by not having to worry about two files. For the longest time I just had a simple script that looked like this:

#!/bin/sh

Django Golf Handicap Tracker

Django Handicap Tracker ScreenshotDjango Handicap Tracker Screenshot
This is the first Django application I ever built. It was started in the 0.96 days and I have since ported it to 1.0. It mostly works and now supports multiple users using the django-registration and django.contrib.auth module. I haven't done much work on it though. Eventually I will put it online for all to use.

My Project Euler Solutions

EulerEuler
So far I've solved about 24 of the Project Euler problems. I'm not sure how long it took me, probably a few months working on them here and there. I would like to continue solving more of these when I get the chance. So far I have only implemented them in Python (and in one case, Cython) but I would love to implement them in a language like Haskell one day..or who knows maybe I'll try implementing a few of them in Go

Vancouver Sun Parking Tickets Website Screen Scraper


When the Vancouver Sun came out with their Vancouver parking tickets database I immediately had some burning questions, like, did the meter maids work on holidays? Do the work less in the evening than during the day? I found it difficult to answer these questions using their interface, so I decided to screen scrape all 1.6 million parking tickets in to my own MySQL database. This was a bit challenging as they made it difficult to screen scrape the data but eventually it could be done simply by first getting an AppKey, a hidden value inside the HTML source and then doing queries using that AppKey as a parameter. It took about a week to get all 1.6 million tickets downloaded. By using Django, it was easy to get them in to a database and view the results. Initially I just put all the data in to one table, then later I decided to normalize the data a bit which was interesting as I decided to do that in pure SQL which I hadn't done before. I did the scraping itself using a combination of BeautifulSoup, lxml, and mechanize.

vancouver-parking-tickets project at GitHub

MySQL SQL dump (42 MB)

Here's some data:

Vancouver Park Board Swimming Lessons Screen Scraper

I was waiting for the January 2010 swimming times to appear on the Vancouver Park Board website but I got tired of all the clicking and scrolling required to see when the lessons were available. The other problem was that once the lessons appeared for one pool, some of the other pools still hadn't posted their lesson schedule for January 2010. The times that came out for the first pool were not ideal so I wanted to wait and see what came out for the other pool, while making sure that the first pool didn't book up.

Django Recipes Application

Django Recipes ScreenshotDjango Recipes Screenshot
django-recipes at Google Code

My mom was writing a family cookbook using Microsoft Word and I thought this was a bad idea for several reasons. At first I thought about using LaTeX to separate the style from the content a bit, then I thought about using XML, then I settled on a database as being the most generic to store recipe data. I quickly decided on using Django to create this cookbook framework because Python is probably my strongest language and it makes creating custom websites really easy.

Ticketmaster fees


Just bought some tickets on Ticketmaster and couldn't believe all the little fees that they add on. Why can't they just bundle these charges in to the ticket price? The "order processing fee", although it is added on to the "order" not the ticket, could also be bundled in to their overall costs. Make it a fixed cost per ticket rather than a cost per order. The "order processing fee" was especially annoying because when I was asked to select how I wanted my tickets (standard mail, express mail, pick-up, etc...) I chose standard mail because it said "Free." What is the "convenience charge" anyways? Just put everything together in to one fee and tell what it is up front. Break-it down later if you want.

Open Windows Explorer (explorer.exe) in a different folder, not in Documents folder

I use 32-bit explorer in 64-bit Vista because of a few problems that use 32-bit explorer extensions and therefore don't work in the default 64-bit explorer. So I call the explorer.exe in the SysWOW64 directory (confusingly, the apps in the SysWOW64 directory are 32-bit apps).

%systemroot%\SysWOW64\explorer.exe /separate /n,/select,%HOME%

Accidently hosed a post last night

I accidentally hosed a post last night. I was trying to delete an attachment to a post but instead deleted the entire post. Luckily I have nightly backups, so restore was quick and easy. It was the first time in a LONG time that I've had to restore the database, but I am extremely relieved that my backup system is working perfectly. I also rsync the backups to my home computer they are stored in two different places.,

South is amazing


I just started using South and it is awesome. I tried django-evolution and dmigrations before but they just didn't cut it. I'm just working on a project by myself but I have it running on a slicehost server and I do development on my desktop computer or laptop computer and South has made doing data and schema migrations so much easier. I love being able to create migrations on my dev box and then try them out, make sure they worked, check-in the changed code and the migration files, sync the server's code and run ./manage.py migrate and I'm done. I used to do manual SQL operations on both databases, or just overwrite the older with the newer (if possible). I just did two quick model changes (first was adding a new field that I wanted to seed with the data from another field, and the other was just adding a new blank=True CharField) and I felt like it was an order of magnitude faster than before.

Some Reddit Comments/Post Titles I am Getting Sick of

  • "I see what you did there." - overused and now totally unoriginal.
  • "Best. Comment. Ever." or anything similar
  • "Win." Like this: "Old School Dancing + Daft Punk = Win" or "You win" or "X wins" or "epic win".
  • "Epic".
  • Using "sir" to address another commenter.
  • Stupid equations, like "Old School Dancing + Daft Punk = Win"
  • "FAIL." - annoying
  • "FTW." When it's funny/clever it's ok, otherwise it's getting annoying.
  • "Downvoted for vote up if you...' title." - just down vote it, don't tell us about it.

Diapers Naturally Diaper Service in Vancouver

Update: Diapers Naturally now has a website: http://www.diapersnaturally.ca!

Diapers Naturally diaper service information (PDF)

Diapers Naturally is a Vancouver-based diaper service that has absolutely no web presence. I found them in the Yellow Pages (the old-fashioned print one) and read an article about Diapers Naturally at mamatang.ca which I found by searching Google. The only other service I know of in Vancouver is Happy Nappy, which is considerably more expensive.

Commentful and cocomment.com Review

Since co.mments.com shut down I've had to find a new site to track comments to blog article that I have commented on. It turns out that the two alternatives both suck, for different reasons.