Author: farhan

Play Button iTunes Patch does not work on OS X Lion

2011-07-26 FA: Please see the latest post.

As you might have heard, Apple released OS Lion yesterday. I am not part of mac developer program so yesterday was the first time that I got to play around with Lion. One thing I noticed right away was that the upgrade broke my iTunes Play Button patch. I will look into fixing that as soon as I get some time.

Among other broken things were the VMWare Fusion bootcamp instance which I haven’t had the time to recreate. Plus Apple removed the four finger swipe app switch gesture, which I used quite a bit 😐 Time to find another utility to bring that functionality back.

Executing a lot of SQL queries with Django’s db API? Watch out for one thing.

I recently had the need to write an indexer that processes a lot of text files and creates a huge number of database rows (19 million+). This is a background script for an internal django website so I ended up using the standard django psycopg2 library, but tried to minimize the overhead by executing queries directly using the db cursor. Even after this consideration and special ‘del’ statements to clean things out after regular intervals, to my surprise, the process was still taking up a lot of memory. So, I tweeted about this experience. Daniele Varrazzo, one of the authors of psycopg2, tweeted back with more info.

Read full post...

Boot Camp Windows running slow in VMware Fusion?

VMware Fusion Logo

Lately my Boot Camp based Windows instance had slowed down to a crawl. Booting it would take a few minutes and everything after I had logged in was just as painstakingly slow. So, after a few minutes of searching I ended up on this suggestion. Guess what? That brought things back to life. Boot up time went back to the more expected quicker time and programs started responding.

So, delete the VMware Fusion folder in ~/Library/Application Support/ while VMware is not running, restart VMware, let it create Boot Camp related setup and boot windows. You are good to go!

Subtle details

I love it when I see programmers and designers going above and beyond and paying attention to the small details. One feature that recently caught my eye were the browser icons (or favicon) used by Google Calendar (and Gmail).

Gmail and Google Calendar conveying useful information through their favicon

Note how the blue Google Calendar icon actually has today’s date instead of some random number. Left of it is the Gmail icon showing the unread mail count. In order to get this functionality in Gmail you have enable the “Unread message icon by Manu C.”

Google folks, keep up the good work! 🙂

I was really hoping that Chrome wouldn’t do this.

The one thing that I hated about Firefox was that you had to restart it every so often because it would start taking up way too much memory after some time. Chrome initially didn’t have this issue, but lately I have noticed that it has started misbehaving as well. Take a look at the following screenshot of the Task Manager in Windows XP.

Chrome, behave!  Notice how Firefox 4 is pretty close even though I use it a lot less.

Wake-on-LAN for WebOS update

Personally I have moved on to Android based cell phone from WebOS/Palm Pre, but I am still trying to keep my Wake-on-LAN (WOL) for WebOS application up to date. Previously it was based on a Java service, which isn’t compatible with WebOS 2.0. So, I have recently rewritten the backend WOL service be a node.js based service that is compatible with WebOS 2.0. Unfortunately, I am facing a few issues with the new model that I have started working through on the Palm Developer forums. Chime in if you can! 🙂

I am hoping to publish this as a free app on the market once I get some of these kinks worked out. Also, source code for this app is now available on google code.

Cleaning up XML using VIM

Here is a quick function for cleaning up XML without any line breaks. This is a quick and dirty solution with some minor issues (e.g. turning <test></test> to <test>\n</test>), but the goal of this it not to be too accurate, but to quickly put a non-readable XML into a readable form for reference.

1
2
3
4
5
6
function! PrettifyXML()
	set ft=xml
	:%s/></>\r</g
	:0
	:norm =G
endfunction

Put this in your vimrc file and call it using :call PrettifyXML()

Look what I found!

Look what I found in Dollhouse. A Penguin!

I found a Penguin in Dollhouse :)

Error installing “Windows 7 service pack 1”, code 80200053

Microsoft recently released the Service Pack 1 for Windows 7. When installing this through Windows Update it would keep failing and give me “code 80200053.” After looking around for a bit I found a solution that fixed this.

  1. Go to the Start menu and type “services.msc” and press enter.
  2. Find “Windows Update” service, right click on it and click “Restart.”
  3. Go to the Start menu and type “Windows Update” and try installing the service pack.

Compiling what…?!!

Lol, I saw this earlier while compiling Samba4. It says “Compiling torture…” I wonder what it does 🙂

Compiling what!?!