Defying Classification

by Malcolm Tredinnick

Topic: software/django

Thu 17 Aug 2006

Dinner meetup in New York?

Posted at 12:31 +1000

I'm going to be in New York City on August 31 and September 1. Are there any Django users (or other random readers of this blog) who would like to meet up for dinner on one of those nights? Drop me an email if you're interested and I'll try to pick a popular evening.

I'll be staying in Manhattan somewhere, so if people also have suggestions for a good place to meet, let's hear them.

Topics: software/django

Wed 9 Aug 2006

Focus

Posted at 20:26 +1000 (edited 10 Aug 2006, 10:18)

I've been spending a fair amount of time over the past couple of weeks thinking about features and guidelines and things that might work and things that shouldn't. Whilst wandering the web on Monday night, I came across an link I had made to an article on the Creating Passionate Users site. In particular, this graphic:

A graph of user happiness versus features

(Image used under Creative Commons license, from here )

This strikes a chord with me. It also helped me pull together what I had been thinking about. It did not help me write it down coherently, but let's see how this goes. Let's go for a (long, rambling) wander from the world of commercial software services to the world of open source project development. With references to writing from people with far more clues than me.

[Aside, or advance warning, at least: I'm not quite sure who the audience for this post really is, but if you find yourself thinking "why aren't they listening to me?" when trying to contribute to software development (whether as a developer, a writer, a bug triager, whatever), it may provide some food for thought. At a minimum, it should clarify some of my prejudices.]

(Read more...)

Topics: software/django, software/GNOME

Thu 3 Aug 2006

Patch Management

Posted at 20:44 +1000 (edited 7 Aug 2006, 11:14)

One of the talks I went to at OSCON was about using mq: patch queue management on top of mercurial, a la quilt.

I had used quilt a couple of times in the past when juggling multiple patches in GNOME, but had gotten out of the habit. Inspired by this talk, I checked out stgit, since I tend to use cogito as my personal version control system of choice these days for various reasons. Patch queues + version control is still a nice combination.

Since getting back home, I've been learning to use stgit to manage my myriad of Django "works in progress" and it's working quite well. This wasn't a hard learning curve: it took all of 15 minutes to read the tutorial and start playing, but it takes a day or two to get used to the commands and tricks and traps. Patch management control systems like this work well for the scenario where I am developing something on top of an already active tree. I update the subversion copy regularly, check the changes into git/cogito, pull them into the branch I am working on with stgit and refresh (the stgit term) my patch. The result is that my working patch is always sitting "on top" of the current subversion code, so I can easily generate a diff and always know it applies cleanly.

Applying a whole bunch of patches from Russell Keith-Magee tonight to another branch went reasonably smoothly, too. Although it did seem to swallow one of the patches without making the changes and another one didn't apply cleanly, although patch had no similar problems. So stgit still needs watching, but I think it will speed up my workflow a little bit.

On Sunday, I had eight or nine different Django working directories (I suspect one was more of a train wreck than a working copy). Today I have four: two are old snapshot versions that I need for working on code for clients, one is a pristine copy of subversion and one is a multi-branched beast with all my patches in it (plus Russell's testing code). It's a little weird using two different version control systems, at once. But I've been juggling that already using cogito and svn previously. Shrinking any new work down to "just a patch" on top of the existing code is the real gain I'm seeing here. It make tracking the changes easier, directory listings shorter and switching between working copies (which one gets used when I run "django-admin.py"?) easier.

Topics: software/django, software/version control

Mon 31 Jul 2006

OSCON 2006 summary

Posted at 19:32 +1000 (edited 25 Oct 2006, 21:17)

Arrived home this morning from the trip to OSCON. A little bit wasted today, although I managed to stay awake for most of the day, so should be back to somewhat normal by tomorrow.

What a terrific conference! As I mentioned earlier, I had never attended OSCON before and I was interested to see what it would be like. I can only say that I do not really begrudge the money it cost or the time involved. A very professionally organised event that still catered nicely to the very technical audience who attended (a group of people who can, at times, be extremely and needlessly hard to please). Little things like putting on a continental breakfast each morning from 07:00 and having boxed lunches available for everybody, through to having rooms available until 09:30 or so in the evening, meant that there was always something to do. You can never attend a conference like this and hope to see everything. Instead, you pick a few "must sees" and then fill in the remaining time with whatever grabs your interest.

A brief experience summary that cannot convey how it really felt, but these might act as pushes for me to write further about some things in the future:

  • Meeting the Django maintainers Adrian and Jacob, was a highlight. The chance to sit down with these two and debate a few things and work out future plans over a couple of meals made me a bit more comfortable about what I could to help Django in the near future. Email is not always the best place to have wild debates or discuss processes. You have to be able to see their eyes when making a point, sometimes.
  • Tim Bray's Atom publishing talk was interesting enough. My big take away was that there were no surprises in what he said. I think this means I understand the bulk of the spec, so the code I am writing is not going to completely suck. Interested to hear that Tim is writing a tester for publishing servers.
  • In Jacob Kaplan-Moss's Django talk, close to half the audience of 60 or 70 people had not used Django before, so we are clearly getting the word out beyond the hard-core developers. Maybe a third of the audience had deployed apps using Django, or were in the late stages of development. Only one audience member had contributed code, though -- not sure how to evaluate that one.
  • The Django BOF convinced me that the message about Django being useful in many realms, not just blogging, not just newspapers is not being lost. Having people from Google and Disney sitting in the room mentioning that they are using it is kind of cool. Unfortunately, we probably needed another hour of time, since our room booking ended part way through a round of "pie in the sky" feature requests that was interesting food for thought.
  • Hearing about the various LiveJournal-inspired performance tools, such as memcached, perlbal and MogileFS, from their creators was interesting. Very few successful software developers do not have strong opinions about why "other solutions suck". These guys are no different, but, as usual, they have turned those opinions into working alternatives, which helps us all.
  • The Oregon Brewers Festival was a great way to spend Friday afternoon after the conference had ended.
  • As usual, technical conferences act as a "chicken soup for the soul" when it comes to getting inspiration to work on software. Whilst a fairly clueless thread was refusing to die on a developers' mailing list, I could ignore the email community for a few hours and talk to real people who have and were achieving real things with their own work and on top of the contributions of others. Real people trump email addresses as inspiration any day, in my book.
  • Powell's Books is brilliant. I spent hours in there on Friday evening and Saturday (both their main store and the technical store).

I didn't take as many photos as I should have, but a small set of acceptable ones is available.

Topics: software/django, conferences/OSCon

Thu 20 Jul 2006

Travel: OSCON 2006

Posted at 16:43 +1000 (edited 25 Oct 2006, 21:17)

Jacob's post reminded me to mention that I'm joining the masses heading off to OSCON next week in Portland. Looking forward to catching up with some old friends and meeting some people who I only currently know through mailing lists. (That I live in the same city as celebrity speaker Jeff and see him less than once a year is pathetic. Maybe Portland will be our 2006 visit.)

I haven't attended this conference before, mostly because if I'm going to travel all the way to North America, OLS is around the same time and a lot cheaper. This year, it's time to splash out and fill in one of the missing conferences on my list of "conferences to attend before I die". So, flights, hotel, registration all booked. Laptop bits and pieces located. Need to remember to charge the camera battery and I'm set (I travel enough that I can just put my hand on the plastic baggie with the right currency in it, the right power plug converters, the travel bag, etc; a bit sad, really).

Topics: software/django, conferences/OSCon, travel

Mon 3 Jul 2006

Django Tips: Forms With Multiple Inline Objects

Posted at 23:38 +1000 (edited 16 Sep 2006, 12:57)

The form creation and handling code in Django seems to strike a nice balance between "making the easy things easy and the hard things possible", as the saying goes. However, there are some areas of it that are not perfectly documented yet and sometimes you have to rummage through the source code for a few minutes to work how to achieve something that, in retrospect, is simple.

One example: how to create a form for editing multiple inline objects on a single page?

The admin interface manages this fairly nicely for relatively small numbers of objects. Surely it should be possible to do the same in our own, customised forms. It is indeed possible and not too difficult, either...

(Read more...)

Topics: software/django/tips, software/django/tutorials

Thu 29 Jun 2006

Django Tips: Extending Generic Views

Posted at 01:16 +1000 (edited 16 Sep 2006, 12:57)

James Bennett has started what I hope might be a series of Django tips today. Should become required reading for Django users, I suspect. So let's help the guy out a bit here. With any luck, we won't duplicate each other's work.

One thing that keeps coming up again and again on #django on IRC, the mailing list and in the Django bug tracker are requests for some small customisation to generic views to accommodate some particular use-case. In almost every case — I would say, in every case, but I am sure there are exceptions that I haven't seen yet — these cases can be handled with only a few lines of code and then passing off the bulk of the work to the generic views.

(Read more...)

Topics: software/django/tips, software/django/tutorials

Mon 26 Jun 2006

An Update and Some Software

Posted at 11:44 +1000

Turns out these blog entries don't write themselves. And I've been busy — mostly on a few small work projects; hence the slight pause in proceedings. I have been keeping a "things I want to write about" list and it is growing alarmingly. Most of the items are currently Django related, so I'm going to try to spread them out so as not to completely bore people who are not interested in Python frameworks.

In lieu of releasing any real software over the weekend (I fixed some bugs, though. Does that count?), I added a README file to my weblogging software, the code that runs this blog, and put up the tarball. You can download the current version (version 1.4, rolled out today) or save a link to the latest version. The latter link will be updated whenever I release a new tarball. I will try to remember to put a new version in there whenever I update the website.

My hope is that this will either serve as a help or a warning to others.

Topics: meta/blog, software/django

Wed 14 Jun 2006

Custom SQL In Django

Posted at 18:52 +1000 (edited 21 Jul 2006, 11:22)

For people wanting to write custom SQL queries for use in Django and are wondering how to make them "fit in" somehow with the rest of your code, a short tutorial follows. Requires a little bit of familiarity with Django to be useful, I suspect.

Also, if you are interested in learning more about some of the more advanced corners of Django, there are a few other people writing instructional pieces at the moment. In general, have a look at the Django aggregator for recent updates, but, in particular, I would like to draw attention to Ian Holsman's recent writeups of content types and signals as they are used in Django. Similarly, James Bennett's excellent series of posts about various useful topics are well worth your time.

And that will certainly be enough link pimping for today.

(Read more...)

Topics: software/django/tutorials

Tue 13 Jun 2006

SQL Puzzle: A Solution

Posted at 11:02 +1000

I previously offered up an SQL puzzle as food for thought. In this post, I want to discuss a couple of solutions.

(Read more...)

Topics: software/databases, software/django