I spent much of the week plugging away at Django, learning new things, making progress, but also hitting some huge frustrations.
I lost a couple of days to figuring out a single problem which, in the end I had to assume was either a bug in Django or something I was doing wrong that I don’t understand and can’t see a way round. I created a minimal test case, I posted to the django-users mailing list, and I reopened a ticket on Django which seemed, at least, closely related. But no solution yet. Enormously frustrating, a huge expenditure of time on one tiny thing that should be very easy, and it nearly put me off the whole thing.
(Where “whole thing” is, variously, this rewriting-my-site project, learning Django, writing any code, or ever seeing a website again as long as I live, depending on the level of frustration at any one moment.)
But the next couple of days were good, and I inched along, enjoying having the time to spend on a personal project where I can work out the best way to do something.
One of the benefits of frameworks like Django or Ruby On Rails is the apparent speed with which you can knock up a working site with a few lines of code. Which is great, and makes for impressive screencasts, but in reality it’s a great example of that “80% of the work is in the final 20% of the functionality” idea.
For example, Django has these Generic Views which save you a few lines of code when you’re making common sorts of web pages. I was making the equivalent of this page listing weblog posts from a single month, and there’s a Generic View for exactly that. I wanted to add next/previous links, to later and earlier months, and the Generic View in question provides these for free, with no extra work. Excellent! Except they’re pretty dumb and don’t know whether there were any posts published in those later or earlier months, or whether we’ve reached the earliest useful month. So it provides links to pages that contain nothing.
It’s a great tool for a quickly knocked-up demonstration project, but it’s not ideal for a production site, where you don’t want the user clicking through empty pages unnecessarily. Little details, 20% of the functionality, 80% of the time. Being picky about these little details is one of the things I enjoy most about designing and making websites though, making things work properly, making the user’s journey smooth.
This personal work will have to pause, or slow down drastically, for a while though, as on Monday I start a project for a new client, which should be interesting, difficult, exciting, and other good words.