Monthly Archives: September, 2005

Another nice quote from Paul Graham

“As a rule of thumb, the more qualifiers there are before the name of a
country, the more corrupt the rulers. A country called The Socialist
People’s Democratic Republic of X is probably the last place in the
world you’d want to live.” – Paul Graham

(Thanks to James Miller for that one)

Django and Rails

No conference which discusses the Web can consider itself cutting-edge these days unless at least a couple of the speakers make reference to Ruby on Rails. For those who haven’t come across it, Ruby is a very dynamic programming language which has been around for a long time, but because it originated in Japan, it’s taken a while to gain popularity in non-Japanese-speaking parts of the world. Rails is a framework which takes advantage of the dynamic nature of the language to map SQL databases neatly onto Ruby objects. It has scripts which create a lot of standard stub code for you, and so in general it makes it very easy to create web applications based around a SQL database back-end, which an awful lot of web apps are, nowadays.

I wrote briefly about Ruby on Rails three months ago, and since then I’ve been sipping at the kool-aid – watched the intro videos, bought a Ruby book, and played a bit with the software – but I never quite got a taste for it. Ruby is so named because it was meant to be a better PERL, and it certainly is that, but I think there’s a few too many Perl-isms still lingering in the background. Ruby enthusiasts claim that it’s a ‘pure’ object-oriented language, more like Smalltalk than most of its competitors, because everything is an object, so you can do things like calling a method on an integer:

5.upto(10) { |i| print i }

but somehow this just doesn’t feel very natural to me. You can do some lovely things in Ruby, but I don’t think a language can lay much claim to purity when it still has things like the global $_ variable from PERL.

And so I’ve been very pleased to discover Django, which is a very similar framework that slightly pre-dates Ruby on Rails, and which is based on Python rather than Ruby. Python has been one of my favourite languages for a long time – I first used it in 1991 – and to my mind it’s rather nicer than Ruby for most things. It’s much more widely known, and all the benchmarks I’ve seen also show Python as rather faster than Ruby, and Django as higher-performance than Rails.

Django works the opposite way to Rails; you create particular kinds of objects in Python and run a script which produces the SQL tables which store them for you. In practice this doesn’t make a huge difference. The Rails approach can be more flexible, but with Django’s you get all your canonical source code in the same language. They both have their merits. But the default framework that Django produces is much more useful than anything you get for free with Rails; it provides quite a nice ‘admin’ interface which you can start using immediately for entering data without grimacing too much about the user interface.

My wife Rose needed to store some data in several related tables and access them from home and from the University. In one day I was able to take her data, which was mostly in tables in Word documents and get it via Excel, text files, and some Python scripts into a MySQL database. Django provided the web front end and by the end of the day she was entering her data via her browser into a set of inter-related tables with various conditions attached. I was working in the next room and from time to time I’d come in and say – “Look – there’s a search box now!”.

Remember that this was my first attempt at using the platform. Now, of course, I’ll be tinkering with it for ages, but the ability to get something up and running and useful so quickly is a great tribute to Django’s design. I also have a feeling, though I haven’t tested this yet, that much of Django might be more useful than Rails for any web apps which are not based on a SQL database.

Anyway – highly recommended.

The Art of Computer Programming?

binary ring

Thanks to Martin for pointing me at these amazing computer-generated pictures by Jared Tarbell.

As well as being beautiful, most of them come in Java applet form, so you can watch them being generated on your own machine, and they’re also accompanied by source code.

tree garden

Lake Geneva

Yesterday evening.

2005_09_23-17_18_16

Swiss trains not only run on time, they also have clean enough windows that you can take photos through them!

I was visiting my old friends Pierre & Linda, who live in a little village high up in the hills. Here’s a view from Pierre’s commute in to work:

2005_09_22-07_29_36

Pierre works in Martigny at IDIAP which doesn’t look quite like your typical research lab:

2005_09_22-15_38_12

More photos of the area here.

OpenDocument

In a little over a year from now, all official documents in the State of Massachusetts are to be in the standard OpenDocument format, supported by the latest versions of OpenOffice, KOffice, IBM Workplace, Abiword, and others.

This is great, and I’m hoping it will be the first of many such announcements. A couple of years ago I wrote a piece for the IEE Review called “If You Love Your Data, Set It Free” (PDF) about the dangers of not using open standards for your data, and just a couple of months ago I applauded Microsoft for using open XML-based formats as the default for the next version of Office, though it turns out that these are not quite as ‘open’ as we might have hoped.

But in “Why OpenDocument Won (and Microsoft Office Open XML Didn’t)“, David A Wheeler makes some important points that should be interesting reading for anyone able to choose their own document formats, and required reading for anyone choosing them on behalf of others. Some excerpts:

In many ways this decision was fairly obvious. OpenDocument appears, at this point, to be the way to go, with no realistic alternative, for any government….

Massachusetts’ Kriss emphasized that Massachusetts is not moving to open standards for economic reasons, but to protect the right of the public to open and free access to public documents, permanently. “What we’ve backed away from at this point is the use of a proprietar standard and we want standards that are published and free of legal encumbrances, and we don’t want two standards.”…

Not everyone is made of money. Governments have to interact with people who have little money, and governments are often strapped themselves. For OpenDocument, this is a no-brainer. Some OpenDocument implementations are available at no cost (particularly OpenOffice.org and KDE KOffice) and have a licensing structure that allows that to continue that way indefinitely. And these are good programs, not poor quality demos…

There’s no doubt that this will cost money. Any transition — even a minor transition to a new version of the same product — costs money. But these are one-time costs, whereas staying where they are will cause more data loss, and by telling everyone now where they are going they can get everyone moving in the same direction (with more lead time, the risks and costs go down)…

The old Microsoft Office format is unspecified and will cause continuing data loss, and it fails to take advantage of XML technology. Even Microsoft is abandoning it. Microsoft’s XML format will prevent instead of help interoperability; it simply fails to meet typical government requirements, since its restrictive license prevents real competition and it failed to enter the standardization process (as requested by Europe and others).

Where governments go, those who work with or for governments often have to follow. But it’s for their own good.

NeoLight

If you’re on a Mac, running Tiger, using OpenOffice or – my recommendation – NeoOffice, then you probably want to install NeoLight to make your documents searchable with Spotlight.

Privacy Enhanced Computer Display


This Privacy-Enhanced Computer Display is a nice idea from Mitsubishi. It’s 4 years old, and it’s not clear it ever progressed beyond being an idea.

Thanks to Tom for the link. Oh, and talking of Tom, I found this post pretty memorable reading.

Paper comes to life

One of the projects I’m currently working on is Exbiblio. For some time now, the web site has been somewhat vague about what it is we’re actually doing, though it described our general area – making paper more interactive. But over the next few weeks, we plan to release rather more information, and it’s started with the publishing of a whitepaper called ‘The Paper Renaissance’, which you can find at the bottom of this page.

Watch this space…

Curved Space

I know Einstein had a stab at this, but I’m starting to make my own deductions about the non-linearity of space-time. It turns out that walking distance, for example, is dependent on the nature of the environment in which you’re walking.

Strap a rucksack and some walking boots on me, and point me at the open road, and I’ll happily walk fifteen miles. Put me in an art museum, on the other hand, and, though I’ll enjoy the experience almost as much, I’ll want to sit down after a few rooms. Thus we can deduce that Museum Miles are longer than Hiking Miles.

On Saturday I was at IBC – the huge International Broadcasting Convention – at the RAI convention centre in Amsterdam. It was interesting, but I came away absolutely exhausted. Which reminded me of a fact I’d long forgotten: that Trade Show Miles are the longest of all.

Chateau Naughton

Another lovely photo on John’s blog.

1.5 Billion Customers

Apparently there are now 1.5 Billion people using GSM. Wow.

SocialMac

At Foo Camp I wrote about the fact that Mac users seemed to be account for about 50% of the attendees.

I counted here at Our Social World and it’s about 25-30%. The difference is probably partly due to a slightly less techie audience, and partly due to not being on the West Coast, but it’s still well up on the overall Apple market share.

© Copyright Quentin Stafford-Fraser