Blog
During the course of the day I encounter lots of challenges, some of which take minutes to solve and others that take much longer. My goal for this section is to keep track of these challenges and their solutions. I will turn the longer ones into articles, while the shorter ones will stay as blog entries. You can expect topics to range from very specific programming challenges to broader topics like life.
Below is a list of the recent blog entries. You can also browse the blog by using the tags on the right side, or if you know what you are looking for then you can use the search box at the top right.
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...
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!
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).
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! 🙂
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.
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.
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.
|
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 in Dollhouse. A Penguin!
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.
- Go to the Start menu and type “services.msc” and press enter.
- Find “Windows Update” service, right click on it and click “Restart.”
- Go to the Start menu and type “Windows Update” and try installing the service pack.
Lol, I saw this earlier while compiling Samba4. It says “Compiling torture…” I wonder what it does 🙂
I finally got some time to move my site to the jQuery Javascript library from Prototype. Why? Because lately most of my projects have been using jquery so I have been using and learning it a lot more than Prototype, and I am starting to understand it very well. You might also notice the LavaLamp jQuery plugin that I am using for the navigation menu above. Initially my intention was to create that functionality myself, but later decided to just that library to save some time for other projects.