Monday, March 23, 2009

ALP to Protect You from Yourself

In an opinion piece for the Sydney Morning Herald, Helen Razer stated:

It is claimed the blacklist will prohibit access to child pornography - and no rational person would argue with that. Not even Evelyn Hall or Voltaire. And certainly not me.

Well. I'll give it a go and you can tell me after if I'm in my right mind or not.


Police receive a tip-off that members of a nefarious crime gang will be meeting in a particular building in the near future. Should the police:

A) Discreetly survey the building from a distance and attempt to identify those who enter.
B) Send uniformed officers in a marked police car to erect a barricade in front of the door and turn away anybody attempting to enter.

Much has been made of the technical reasons that the Rudd government's plans for mandatory net filtering are a bad idea. There are many and it is right to point them out. But even if there were no technical or security issues, would the filters be a good idea?

The primary argument put forward in favor of the filters seems to be keeping children safe. Nobody sensible would argue against keeping children safe but it's important to consider what we're keeping them safe from.

My biggest fear as a parent is not that my children will see something inappropriate on the Internet. It might happen and it might be upsetting but its not life-threatening.

What does disturb me greatly, however, is the possibility of a real-life encounter with a pedophile. This can be life-threatening or life-ruining.

I am very much in favour of identifying people who are a likely threat to children (eg viewers of child-pornography) and taking appropriate action against them. As you may have guessed, they are the nefarious crime gang in the analogy.

One concern I have with the proposed mandatory filters is that it is very much option B. The net filter is a very expensive barricade with flashing lights. Not even the dimmest criminal could miss it. So does our barricade prevent the crime from taking place? Absolutely not. This building has many entrances and the barricade only blocks the front entrance. Those intent on entering will still do so. Only now they know that the police are watching the front entrance.

So was option A possible? Is it possible to discreetly monitor those who access websites known to contain illegal material? Technically, the answer is yes. In fact, it's common practice to identify would be wrong-doers on the net by monitoring accesses to a particular address. Security experts actually set up computers to tempt intruders. They're known as honeypots. The illegal sites are pre-made honeypots. It's quite possible to monitor access to them discreetly and non-obtrusively.

So why is the government opting instead for a far more expensive and intrusive system? I can only think that it is because it has nothing to do with protecting children and everything to do with enforcing their own ideology on the rest of us.

You are all witnesses to the dawn of the era of the World Wide Web. Have you seen society tear itself apart? Where is the evidence that we need protection from all those naughty pictures and ideas. The answer, I believe, is in the imaginations of Stephen Conroy, Kevin Rudd and Steven Fielding. 


Saturday, March 14, 2009

Django on App Engine Gotchas

I've been trying to use Google App Engine (GAE) of late. As a Python newbie its a fairly steep learning gradient. App engine as it ships is fairly simple but missing many of the conveniences I've grown accustomed to from using other web frameworks so I thought I'd drop Django in to the mix.

Out of the box, Django is designed to work with relational databases. The GAE doesn't have a relational database, instead it has Google's clustered non-relational database BigTable. This changes a lot for Django. The models change, the forms which were based on the models change. The built-in management app which was based on the previously mentioned items has to change. So, there's a project to patch all of that and get it working again - google-app-engine-django

As I mentioned above, I'm new to Python and perhaps if I weren't many of the things I'll mention below would be no big deal. But here are the issues that I've found with using google-app-engine-django so far:

  • Check it out of subversion. I think that this project is still fairly new. At the time of writing, the latest release was r52. The latest subversion release fixed at least one bug for me that had cost several hours of my time so I highly recommend getting the latest version you can.

  • You need to install a late version of Django in the django folder under your project. I didn't feel that this was made clear in the install instructions and it wasn't until I found this that I started to make some progress.

  • Use
    python manage.py shell
    To play around and experiment with your models.

  • Set the USER_EMAIL environment variable to your email address. I noticed this when trying to instantiate a model that had a line:
    created_by = db.UserProperty(auto_current_user_add=True)

    It seems that the add_current_user_add=True requires that environment variable to be set. I haven't tried deploying the app yet but I suspect that it's not an issue when running on Google's servers because there really is a concept of a current user.

Those are the crux of what I've learned so far. Looks easy but there are lots of rocky outcrops on which to get snagged.