Published June 30, 2006
For the second time, Mark Pilgrim has written up a list of his “essential” software (for reference, here’s the first time). It being Friday, the day when bloggers around the world veer off and post things of very little relevance to important world issues, I feel compelled to do the same.
I work with two operating systems on a regular basis: Mac OS X and Ubuntu GNU/Linux. Obviously there are going to be some disjoints between the sets of applications I use ...
Published June 28, 2006
New users of Django, even people who have lots of experience writing database-driven applications, often run into a seemingly simple problem: how do you set up a model with “optional” fields that don’t always have to be filled in? Django’s validation system assumes by default that all fields are required, so obviously you have to tell it which fields it’s OK to leave blank.
But therein lies the problem: there are two different ways you can “leave it blank”.
For the most part, assuming ...
Published June 25, 2006
You were upset when you heard about the DRM “lock-in” of Apple’s iTunes Music Store, so you burned all those locked-up files to CDs, then ripped them back in Windows Media Player. As WMA. You can’t play them on your iPod anymore, but at least you can play them on all the other portable music players you own.
You blog on MySpace. But you keep links on your MySpace page to your old LiveJournal and your old Xanga blog, so people can still read all your ...
Published June 19, 2006
I was at the store last night and remembered that I needed shampoo, so I wandered over and took a moment to look at what they had. I’ve always been fascinated by one brand in particular: Clairol’s “Herbal Essences“, which was the first shampoo I ever saw in a transparent bottle; the color of each type of shampoo (there was one for each type of hair, one for each of several common conditions like dry hair, limp hair, and so on) was tailored to match a logo which ...
Published June 18, 2006
As a result of various things I’ve been reading up on recently, I’ve been exposed to far too many Python vs. Ruby flamewars. As someone who’s used both languages (though I’ve got much more experience with Python, and a Python-based framework is now how I make my living), I think they both solve similar problems in slightly different syntactical ways, and are pretty much equivalent on functionality.
But the debates, when they happen, always seem to come down to a few tired old arguments that just ...
Published June 16, 2006
I’ve been a Linux user for about six years now; I started out with Red Hat while I was in college, and then a little over a year ago I jumped ship to Ubuntu because smart people kept talking about how nice it was.
Overall, my experiences with Ubuntu have lived up to that; Ubuntu does an amazing job of being both a great development platform and a good desktop operating system. That’s no mean feat. So naturally I was looking forward to upgrading to the recently-released version ...
Published June 14, 2006
Last time around we looked at how to write an effective template tag, with the focus on writing a flexible template tag that would make it easy to pull in various types of recent content in any page; I use a tag similar to the one in that entry to pull out the recent entries, links and comments in the footer of every page on this site.
For situations where you want to get content out of your database, a template tag is typically the best way to go, but ...
Published June 13, 2006
In a comment he left yesterday, Jonathan Snook posed an excellent challenge: document the chain of how Django processes a request, from start to finish, with plenty of detail on the various things being called internally and links to the appropriate documentation.
Simon Willison once wrote such a document, but it was a fairly high-level view and a fair number of things have changed since then, so I’m going to take a stab at it myself, and hopefully the result will be comprehensible.
Note: this is a first draft ...
Published June 10, 2006
I know, I know, I said I was done with the series. But there’s one more thing I’ve been feeling like I should have mentioned: when frameworks aren’t the right choice for a project.

Remember that image? It shows the types of projects for which I think frameworks are a good choice, the 80% or so of web projects which can all be handled by a database-driven application and gradual scaling of the hardware. Which, logically, indicates that other types of projects — basically ...
Published June 8, 2006
Anil Dash has written up some complaints about installing the GIMP on Windows.
Special care should be used while reading that, because he does go through several very valid points:
Published June 7, 2006
Django‘s template tags are a great way to handle things that don’t always make sense being in a view. If you want to have, say, a list of recently-added content which appears in a sidebar or footer on every page of a site, it’d be crazy to manually change every view to fetch that content and add it to the template context; a template tag is definitely the way to go.
For example, in the footer of every page on this site, I pull out the five ...
Published June 6, 2006
One of Django‘s great strengths is its built-in user and authentication system; the bundled application django.contrib.auth includes models for users, user groups and permissions and views for logging users in and out and changing and resetting their passwords. This is enough to cover the needs of a huge number of sites and, after the admin, the auth system is probably the most popular bundled application Django ships (or maybe the other way around, since the admin requires the auth system to be installed).
Because of the auth ...
Published June 5, 2006
So, I thought I’d explained why templating languages are pretty useful things. Markup is, after all, just about the fastest and simplest way to, well, mark up content for presentation and, when coupled with a small amount of logic, is by far the best way to present the output of a dynamic database-driven web application. I kind of hoped that I wouldn’t have to write more on the topic, because there are so many more interesting things to which I can devote my time.
Sadly, I was mistaken ...
Published June 4, 2006
In the previous entry in this series I took a look at some common criticisms programmers level against the new generation of web-development frameworks. Today I’ll be following up in somewhat the same vein, by expounding on something that might lead your friendly local database administrator to look somewhat askance at how these frameworks do things.
And let me say right now, before I ruffle anyone’s feathers, that when I talk about applications and databases below, I won’t be talking about any particular application or database. I ...
Published June 3, 2006
In the previous entries in this series I’ve been talking mostly about the benefits of the new web frameworks that have been popping up over the last year or so. And from a programmer’s perspective, there are certainly a number of benefits: