Defying Classification

by Malcolm Tredinnick

Topic: software/django

Tue 4 Sep 2007

Fix The Bug, Not The Symptom

Posted at 20:35 +1000

I'm a big believer that a large part of the art of successful debugging is attitude. If you adopt the attitude that you can fix the problem and you're not getting to let this piece of technology make you look feeble and unworthy, you'll usually win.

There's more to write about that another time. Today I want to write a bit more about the flip side of this: being a responsible debugger and making sure you are fixing the real problem, not merely making the symptoms go away.

(Read more...)

Topics: software/design, software/django

Sun 29 Jul 2007

OSCON, part II

Posted at 09:26 +1000

(This a follow-up to this item, which may not have been syndicated to all the same places, since it isn't in exactly the same categories.)

Selected moments from the last couple of days of OSCON:

  • The Python BOF on Wednesday night. Excellently moderated by David Goodger. Probably around 20 or so people there. Many being fairly experienced Python users. A general consensus that selling Python to the PHB level of management is still senselessly hard. It's almost an argument for certification. All involved in the hiring process seemed to agree that wouldn't change the way they hired, though. Teaching Python to good people is easy and Python's the type of language where you can get a good feeling about an existing developer's work in a number of ways. A piece of paper won't change that. Other topics including code organisation, other languages used, promoting certain packages as reference implementations were all interesting. Over two hours of good conversation (and beers).

  • The Django BOF on the following night was well attended, too. Around 18 people, ranging from a few who were just starting out to some who were using it in high profile site. Conversation mostly driven by the more experienced users. I came away with a list of about 15 things that we can look at that I need to write up as an email to django-dev over the next day or two. Hallway conversation after the hour-long BOF went for another 90 minutes with a different group of people.

  • A talk on 37signals' experiences with using Amazon's S3 for mass storage was interesting. Mostly it was a litany of woes about "what can go wrong will", but it provided some very constructive lessons learnt about the extra work you have to do and expectations if you're going to hitch your business implementation to something like S3.

  • r0ml is a very entertaining speaker and I enjoy hearing him talk. Always something to learn about presentation. However, his point and generally excellent arguments are sometimes obscured by his entertainment style and this is a shame. It took a lot of work to sort wheat from chaff in his Preventing Code presentation.

  • Greg Kroah-Hartman's talk on the state of the Linux kernel in 2007 will be useful as data for the future. He's done a lot of crunching of numbers with regards to number of contributors (including nice chart), number of lines of code, proportion of change in various subsystems, and so forth. The simple conclusion is that anybody trying to maintain a parallel branch of the kernel is looking impossibility in the face. Pushing things into the mainline is the only way to go, because it's just too frantic. And yet, the system mostly works. The kernel remains healthy and solid.

  • Having contact with other Django developers and users during the day was very motivating. I got a lot of coding done during downtime between talks and in the evening back at the hotel. Some big ticket items, too (since the little ticket stuff tends to take care of itself).

The last few days have been a bit of a blur, so there might be an OSCON, part III post once my brain settles down and organises things.

Mostly recovering today and doing very little. Off to New York City tomorrow to enjoy ... I don't know ... stuff. Weather. Central Park. Manhattan Restaurants. Things like that.

Topics: software/django, conferences/OSCon, travel

Tue 17 Jul 2007

Version Control Storage Sizes

Posted at 21:44 +1000

A slightly more technical post today. Apologies to my non-IT readers. Normal interest will resume tomorrow.

Without wishing to start any kind of "my version control system choice is better than yours" debate — because I really, truly, don't care — here are two interesting numbers:

35M     django_working
25M     django.git

The top one (django_working) is a normal subversion checkout, completely up to date (to r5722) and with all .pyc files removed. The second directory is the same thing, except that I also imported all the subversion trunk changes since Django was released to the public (so, from r1 up to r5722).

As the name suggests, the second repository is a git repository, created with git-svn so that I can write back changes to the main subversion repository as well. The initial import was around 140M, but I ran git-repack on it to compress it. There are trade-offs here, obviously; packs take a bit longer to access. By and large, though, I don't need access to all the history and checkins. When I do and I'm offline, this will be invaluable. The ability to use git-bisect on a local copy to find problems will come in handy, too, I suspect. I didn't really care too much how large the storage requirement was (although my laptop is getting a little full, so it might have been an issue there), but the small size was a little unexpected.

(Yes, I know subversion storage is fairly large in general. Yes, I know there are other distributed version control systems out there. Really, I know this. You don't have to email me to tell me. It's not that important.)

Topics: software/django, software/version control

Mon 16 Jul 2007

My Django Working List

Posted at 19:04 +1000

As part of cleaning up a bunch of stuff lately, I consolidated various TODO lists in an attempt to knock off a bunch of items. As an experiment in open development, I've put the Django version — things I am currently working on in Django development — online.

This may or may not turn out to be a good idea, since it's not an audience participation affair, It's my activity list and I'll be ignoring any requests to alter things on it. However, it may prove useful to people wondering what I'm working on at the moment or just wanting to sticky-beak. Despite a few pains using Google Docs (stop trying to hijack right-click, damn it!) and the general failure of web-apps-as-desktop-applications (too mouse driven, for a start), it's not too unbearable and the benefits of being able to share something and edit from multiple, widely separate machines is useful.

Having a consolidated list that I'm trying hard to keep up to date and aware that people might be looking at is turning out to be useful as far as focusing my efforts. I've been a lot less random in where I'm poking about, I suspect.

Topics: software/django

Fri 13 Jul 2007

Django Unicode Changes Post-mortem

Posted at 19:46 +1000

It's been a little over a week since I merged a large change into Django's trunk code to make it Unicode compatible. Prior to doing this, I had wondered how easy people were going to find working with the very slight changes this induced. Where were the hidden traps? How did various design decisions stand up in practice?

A little early to draw too many definitive conclusions, but here are a few observations from a week of general population usage, combined with feedback from the early adopters.

(Read more...)

Topics: software/django

Tue 19 Jun 2007

Australian Screen

Posted at 11:34 +1000

Congratulations to Thomas, Ingrid and the whole team over at Ether Multimedia on the launch of australianscreen. It's a directory of Australian screen history, complete with video clips. Lots more information, including some of the technical back story, over at Thomas' blog.

Aside from being a nice looking website and fun to browse around, it uses Django in the back. Always fun to see something local being built from stuff I've helped out with.

Topics: software/django, media

Sat 19 May 2007

A Cool Use For Flickr

Posted at 06:15 +1000

Suppose you were a startup company trying to attract people to work for you. You wanted to sell yourself as a "cool place to work". One approach, taken by Exoweb is to have a Flickr group devoted to their company. Probably kind of obvious in retrospect, but I'm easily impressed.

I found this whilst mindlessly browsing through Flickr today and realising I hadn't checked out the Django/Python cluster in a while. Always interesting to see what people are doing there.

(I'm not associated with Exoweb in any fashion; I've never paid any particular attention to them until 20 minutes ago. Merely noting their cluefulness in this particular instance.)

Topics: software/django, photography/flickr

Sat 12 May 2007

"This Should Be Easier..."

Posted at 00:55 +1000

The sort of code comment that is usually a sign that whoever wrote this code originally thought it would be easier than it turned out:

# If all that malarkey found an object domain, use it; otherwise fall back
# to whatever get_absolute_url() returned.

Topics: software/django

Fri 11 May 2007

Runtime Model Creation In Django (?!)

Posted at 19:07 +1000

One of the nice things I like about hacking on Django is that the design lends itself to changing things without having to modify the core code. The internal pieces are split up pretty sensibly into different classes and functions so that you can override and subclass just the bits you need to. It's something that orients my internal design compass a lot when I'm looking at code additions.

Consequently, it's nice to see other people taking advantage of this. Along these lines, Marty Alchin's recent documenting of how to create models at runtime deserves some publicity.

I don't know that this is a particularly robust idea in general, but it clearly has its uses. Marty needs to do it for some reason. I guess with a bit of work and some robust database schema migration code underneath, you could create a web-based model design tool, for example. It's certainly a nice example of using the available hooks and reading the existing code to see how to extend the process.

Topics: software/django

Fri 27 Apr 2007

Best Foreign Language Test Phrase Ever!

Posted at 18:57 +1000

I've been doing a lot of work lately that is ultimately of benefit to people who want to use a language other than English in their software output (and input). For this you need test data, preferably in a lot of languages. Until now, I've been using a little file with the equivalent of "the quick brown fox jumped over the lazy dog" in a number of languages.

Today I struck gold!

My new favourite test phrase is "my hovercraft is full of eels" and here is a page with the phrase in over 60 languages. Brilliant!

(For those who don't know the origin of the phrase, it's from a Monty Python sketch called The Hungarian Phrasebook.)

Topics: software/django