Archive for August, 2006

Didn’t do much this Bank Holiday. Cycled to Pluto and back…

Wednesday, August 30th, 2006

Seriously. We had the kids in tow, which limited our speed somewhat. But we still managed it in a couple of hours, giving us an average speed of over five times the speed of light…

Cycling the Solar System

No, I haven’t flipped. We spent some of our Bank Holiday Monday afternoon cycling from York to Riccall and back, along part of National Cycle Route 65. Located on a 6.4-mile segment of this route is a 575,872,239:1 scale model of the solar system. The model begins, of course, with the Sun, a sphere 2.4 metres in diameter, which you encounter within a few minutes of leaving York and crossing the racecourse. Mercury, Venus and a paired Earth and Moon follow in short order and then the distances between the planets begin to increase, until you eventually end up, 5,913 million kilometres later - or is it only 10.27 km? :) - gazing at a pair of tiny stainless steel spheres representing Pluto and Charon. Inevitably, you are reminded of that classic Hitchhiker’s quote:

“Space… is big. Really big. You just won’t believe how vastly hugely mindbogglingly big it is. I mean you may think it’s a long way down the road to the chemist, but that’s just peanuts to space.”

I can’t think of a better way of conveying just how empty the outermost reaches of the solar system are than moving yourself physically through a large scale model such as this one. And it’s an enjoyable, easy (i.e., flat) ride, to boot. Check out my Flickr photostream for a few images.

Why I like Django

Thursday, August 24th, 2006

I’ve recently been thinking about why I like Django, and why I’ve ended up spending time with it rather than with something else like TurboGears. It may be largely accidental, in that I came across Django before I’d heard of TurboGears. In fact, my prior experiences with CherryPy lead me to suspect that I’d have been pretty happy with TurboGears, had I discovered it sooner. But Django snared me first.

So why do I stick with Django for my experimentation with web frameworks? Here, in no particular order, is a list of the things it has that I particularly like:

  • A well-designed, easily-navigable, unfussy website, providing access to some excellent tutorials and other documentation
  • A simple, compact template language that forces business logic into the view code, where it belongs
  • A rich set of generic views that allow useful functionality to be delivered with a minimum of code
  • An attractive and highly capable administrative interface to the underlying database, generated for free from the data models

All pretty compelling, as far as I’m concerned. I wouldn’t rule out switching to another framework, but it would have to provide all of the above, and improve on some of it, to tempt me away from Django.

Is Django ‘the’ Python Web Framework?

Thursday, August 24th, 2006

Guido’s recent pronouncement recommending Django as ‘the’ Python Web Framework seems to have got some folk hot under the collar, and prompted a few criticisms of Django. I wonder whether Django’s image might suffer a little at the hands of people envious of the endorsement it appears to have received. I hope not.

Hopefully, people will realise that the comments of one individual, even one so illustrious as the BDFL, aren’t a serious threat to a project with the momentum that TurboGears has. But if Guido’s comments have the effect of dissuading Joe Programmer from writing Yet Another Python Web Framework, and encourage him to help make one of the existing successful frameworks even better, then they will have been well made.

Anticipated releases, past and present

Wednesday, August 23rd, 2006

This summer, I’ve been able to cross off Eclipse 3.2 and Django 0.95 from my “hotly anticipated releases” list. Actually, the latter wasn’t a big deal, given that I’ve been keeping my installation up to date using subversion - but I think formal releases have an important role to play in signalling to the community at large that a project is healthy.

The Eclipse Callisto release was a big deal, given that it included not just the basic SDK but also a host of other stuff like the Web Tools Platform and Data Tools Platform. I’ve been spending some time playing with a set-up that includes these features, plus the Apache Derby plug-in and Subversive subversion plug-in. I’m hoping that this particular set-up will prove to be a great environment for our students, particularly when it comes to project work in their final year.

Two things left on my “hotly anticipated” list are Python 2.5 (currently at rc1 status) and IronPython 1.0 (currently at rc2). I haven’t downloaded any of the earlier 2.5 releases, so I’m looking forward to playing with absolute imports, the ‘with’ statement and the new hashlib module from the standard library. IronPython I have toyed with before, albeit a very early version with many rough edges; it will be interesting to see how polished the final product has become.

I’m just an editor whore…

Sunday, August 20th, 2006

I was scanning Planet Python and found Juri Pakaste advising that “When everything else fails, try Emacs”. Like Juri, I’ve been pretty much seduced by Eclipse for much of my Java development, but for simple, throw-away Java code, or for my Python work, I generally use a regular programmer’s text editor. I have to admit, however, that I haven’t stuck faithfully to one favourite tool over the years.

During my PhD, a long, long time ago, I cut my teeth on MicroEmacs, graduating from there to the ‘real’ Emacs and then, for reasons now long forgotten, switching to Vim. Eventually, like Juri, I “fled back to the tender loving embrace of Emacs”. I was doing a lot of document preparation using LaTeX, and I think the lure of Emacs + AucTeX as a LaTeX development environment back then was just too great.

Just lately, though, the magic has gone from the relationship. I’ve begun to realise how important it is to me to have an editor that is easy on the eyes, given the amount of time one spends staring at it. And, frankly, Emacs fonts just don’t cut it. I guess I could have got myself some anti-aliased fonts by grabbing the very latest, Xft-enabled Emacs source from CVS; instead, I ended up giving Vim another try, and I’m happy with my decision. Vim looks great, I find I’m remembering the key presses for a surprising number of commands, and I’ve even discovered a neat plug-in for LaTeX development, called LaTeX-Suite. Goodbye Emacs, until the next time… :)

I wonder, am I just weird, or do others suffer from a similarly deplorable lack of loyalty to their text editor?

First post

Saturday, August 19th, 2006

Still getting to grips with WordPress.  There’s quite a lot to investigate, although it all seems relatively straightforward.  The WordPress Codex is a very useful resource.

This isn’t my first blog; I have some experience with the blogging functionality in Elgg, and first impressions are that WordPress is much nicer to use…