I’m a fan of PagerDuty. I have used it for a while now and it’s great. I use the webapp, but I love the mobile app because I can quickly acknowledge tickets that I’m looking into, and I can quickly look to see if I missed anything. However the one thing I’m missing… are desktop notifications. Here’s the way it usually goes down for me:
Get ready for work, and head to the (beautiful) office.
Read more...
Ever had a situation where you want to send a file to a friend at work or something, and sending it over email makes you feel all dirty? One way to solve the problem is to copy the file into /var/www/foo or something and send a link… we’ve all done it. But there’s a better way :)
Python can be used for web programming, and the language has builtin code for reference implementations of stuff.
Read more...
Chula comes with a guid generator class who’s implementation is a bit naive. Considering Python already has (probably much better) functionality builtin, I figured I’d see how fast they are.
Here’s the way I tested them:
# Python imports from random import randrange from uuid import uuid1, uuid4 import time # Chula imports from chula.guid import guid count = 10000 def timeit(fcn): def wrapper(): start = time.time() fcn() print('%s %fs' % (fcn.
Read more...
Recently I was in the process of moving my site to a much better hosting situation (more on that later). During the move I decided to upgrade from PostgreSQL-8.0 to PostgreSQL-8.3 as I was pretty far behind and I prefer to stay current. This sort of upgrade isn’t a big deal, and I’ve done it many times. So I did my usual process:
Install the desired version of PostgreSQL (in this case 8.
Read more...
When it comes to performance one of the most important considerations is caching of content. There are all sorts of approaches to the caching. Some protect the database from duplicate queries while others protect your application from having to perform an expensive algorithm over and over. Today I am going to talk about the most aggressive form of content caching when it comes to the web - full page caching.
Read more...
Recently a friend of mine pointed out that I had an error on one of my pages. It took me almost 45 minutes to figure out what was happening. I wasn’t able to reproduce the defect in my development environment. The version of Python installed was exactly the same. I tried executing the problematic piece of code on the production server and it did not reproduce the problem. All of my unit tests passed… I was at a loss as to the source of the problem.
Read more...
I’ve been working long and hard now for the past three months writing a brand new version of this website. It’s written from scratch, and uses all sorts of neat technologies. There were a few different reasons why I took the time to rewrite everything. The most important reason probably was that my codebase was getting really crazy and difficult to maintain. It’s much cleaner now, and far easier to extend and maintain.
Read more...
Today I set out to get my own software running. This included dependencies like:
Apache Mod_python Postgresql Tsearch2 Psycopg2 elementtree Simplejson Matplotlib Apple I wasn’t difficult to install and configure things, though it obviously felt different than it does on Gentoo. Honestly things seemed less organized, though that’s likely because I know Gentoo so much better.
I have not been successful in getting mail-notification to work. Poking around it seems the imap ssl support is disabled, and people recommend installing from source.
Read more...
Last night I added rss v2 and Atom support to my blog. Both feeds seem to validate properly, though defects will probably surface until I get more familiar with how blogging actually works. I also rolled Apple v0.2.5 mainly to include a fix in the calendar. The calendar was using a by-reference copy of self.page.get and thus it was changing the object itself. Using copy took care of that (I had been pulling my hair out trying to determine why self.
Read more...
Yesterday I rolled a new Apple release and moved some site changes to my prod server. After doing this mod_python went nuts throwing assorted exceptions about the recursion limit being exceeded. After some troubleshooting it seems that the python-json module bundled with Apple was returning an empty string when json.read() was called (regardless of whether the string in question was valid JSON or not). Next I need to determine why my code became so angry when session wasn’t completely available.
Read more...