Skip to main content

Pinax and Lego

I met up with James Tauber yesterday morning. We had lots to talk about, one subject being how you explain Pinax to developers. We had a lot of fun creating an analogy with Lego (best toy ever invented IMHO).

lego bricks
Photo source

Lego bricks and your imagination are all you need to build interesting toys. In our analogy, Django is Lego bricks: it gives you the building blocks you need to build interesting things on the web.

Yet rather than building from scratch each time you want to create a toy you can buy off-the-shelf Lego sets for the most common types: cars, trucks, space-ships, movie themed locations, towns and so on…

Pinax is a collection of Lego sets: it gives you a set of off-the-shelf components commonly used in web-development: a wiki, OpenID, Twitter clone and so on…

What's more, Lego sets are themed and interchangeable and if you really want to do something "out there" you can break them all down to the brick level and re-use only what you need. Pinax's applications are "themed" (social networking, CMS, messaging etc), interchangeable and, should you want to do something extremely bespoke, they're open-source so you can re-use only what you need.

Voila, now even my four year old son can understand what I'm up to! :-)

Open-mindedness and Argument

I just found this video about open-mindedness, evidence based argument and common mistakes made when "moving between" thoughts in a discussion:

I like its succinct presentation of what I was up to when I read for my philosophy degree: arguing a position and revising in the light of evidence.

I get a real buzz from this sort of thing, whether it be in a debate, writing an essay or when reading well written philosophy. I try to engage with an argument by poking holes in it – and I love how good authors / debaters will poke back.

Unfortunately, there is an abundance of spaghetti philosophy: like spaghetti code in software engineering it is badly presented, too complex, opaque and not quite fit for purpose.

This video is a great example of what good philosophy should be: well presented, no more complex than it needs to be, inviting scrutiny and encouraging the audience to engage and to think.

Django Microformats

I've just created a new Django application that makes it easier to integrate and use Microformats in your web-application. I'm hosting it on GitHub:

http://github.com/ntoll/microformats/tree/master

All you need to do is run the following command from within your own Django project:




git clone git://github.com/ntoll/microformats.git



... and remember to add it to the INSTALLED_APPS section of your settings.py file.

Microformats are a means of adding semantic information that is both human and machine readable to a web-site. In order to work with Microformats you need to use a toolkit such as Oomph or the Operator Add-on for Firefox (that supports more types of microformat).

The following YouTube video from the Oomph team pretty much explains the basics:

By using the Django microformats application you get the following:

  • Models relating to the geo, hCard, adr, hCalendar and XFN microformats.
  • Simplified forms for the geo, hCard, adr, org, email, tel and hCalendar microformats and fragments.
  • The bare minimum admin functionality.
  • Template filters for the geo, hCard, adr, hCalendar and XFN microformats.

To use the template filters you need to register the application and add:

{{ "{% load microformat_extras %}" }}

to the top of the template you're using.

For an example of this in use check out the end of the following test file:

microformats/unit_tests/test_templatetags.py

Running the unit tests (./manage.py test microformats) will result in an example file demonstrating the HTML markup produced by the template filters:

microformats/unit_tests/html_test/microformat_test.html

I've included the Oomph javascript library so you can play with the microformats if you open the file in your browser. If you're using Firefox try it with the Operator add-on. IE8 supports Microformats natively.

This is a first shot at integrating Microformats into Django. There are missing microformats and I'm pretty sure some of the models could be improved as could the template filters. Inevitably the code needs to be cleaned up too. I'll be using this library in a new web-application so expect this code to change as I find flaws and gremlins through using it "in anger".

Feedback would be most welcome.

YouTube and Anthropology

I spent an hour this evening watching the video below. I really enjoyed it because it explores the amazing potential that collaborative, networked and open medium offer.

However, what I find most exciting is that we've only just scratched the surface of what and how such "mechanisms" can change.

Oh yeah… two blog posts in the same day Nicholas! What is the world coming to..?

Northampton Symphony Orchestra Film Night

I've just found out that we had a photographer in the audience of the recent concert we did at the Derngate. Both Mary and I had a fantastic time and we're both looking forward to the next concert (although I'm not so busy in that one – only in the Dvorak symphony).

Here are some of my favourites from the set (click to see the full size picture):

It was pretty much a full house:

NSO

Alex in full flow:

Alexander

The "hit" squad:

Percussion

Unfortunately, the only shot with Mary in it shows the back of her head and her desk partner… :-(

Cello

Yours truly at full blast…

Tuba