Link Archive
Django 1.0 Released
Django 1.0 has been officially released!
There's a huge list of changes from 0.96, which are covered in the Django 1.0 Release Notes. There's also a fantastic guide to porting your code from 0.96 to 1.0 which will be useful for those not keeping up with trunk.
The release announcement was made today by James Bennett in the Django-Users google group.
Congratulations to everybody who has been involved in the long road to 1.0. This gives us a fantastic base to work from for a stable and prosperous future.
http://docs.djangoproject.com/en/dev/releases/1.0/GenericForeignKeys with Less Queries
Horst Gutmann from Austria has published this fantastic blog post that gives a great performance boost to Django's generic relationships. In a situation where you have an 'Item' table that has a generic relationship to three sub-tables (eg BlogPost, Photo, Link) when you display details from the sub-tables in a for loop there will be n+1 queries - one query for every item shown.
Horst's trick is to first fetch the content-type ID's in one query, then use one query for each subtable - so 4 queries for the above example, regardless of the number of separate Link or BlogPost items you actually have.
This should do a marvellous job for most tumblog style websites, although I imagine if you had a massive number of items the memory usage would probably spike quite high and you'd be better off having duplicate database queries.
http://zerokspot.com/weblog/2008/08/13/genericforeignkeys-with-less-queries/Olympic Medals at the Athens Olympics by Population
Watching a few Olympic events over the weekend I was thinking "I wonder where Australia would be on the winners table at the Olympics if they counted medals by population" - and this morning, via Kottke, I've found a great chart showing just that.
What's cool for me is that Australia are the only top-10 medal winner who are still in the top-10 by population... in fact, we moved up two places. Aussie Aussie Aussie, Oi Oi Oi!
http://www.moreintelligentlife.com/story/an-olympic-gameEasily packaging and distributing Django apps with setuptools and easy_install
This fantastic blog posts shows how easy it is to list your Django applications in Pypi, a Python package registry. The major advantage to this is that future users of your software can just type easy_install mycoolpackage and have your software installed rather than having to download with SVN, move files to the PYTHONPATH, find out why it hasn't worked, etc.
Flash-based Guitar Tuner
I don't play guitar very well, and only pick up my guitar every few months to have a quick fool around with. Every time I touch it it's out of tune, and I spend longer chasing down a good tuning reference point than I do actually playing.
This looks promising... now to teach myself how to do something other than tune the thing and play scales.
http://www.howtotuneaguitar.org/Julien Phalip: Site-wide, user-configurable date formats for display AND entry
Julien Phalip has put together a fantastic article on how he tackled the problem of different users wanting different date formats.
Using his simple code samples, you could give the user many different choices for date format - yyyy-mm-dd, dd-mm-yy, mm-dd-yyyy, or others. The best part is that these formats are then picked up not only for displaying dates to users, but for any date entry that user has to do on your site.
http://www.julienphalip.com/blog/2008/07/30/simple-site-wide-user-date-format-validation-syste/Pushup: Encourage your users to keep their browser up to date
This looks like a neat piece of JavaScript that will check the browser your visitor is using, and provide a discrete popup message if there is a newer version available.
It isn't a hard push into installing something other than Internet Explorer, but it will alert them if they're using a browser older than IE7, FireFox 2, Safari 3 or Opera 9.25. This is a beautiful way of encouraging users to use recent versions of their browser, which makes life easier for them (better security) and you (more reliable JavaScript implementation).
http://www.pushuptheweb.com/Big business ignoring online enquiries
According to a survey done of 460 Australian organisations with over a hundred employees, 59% don't reply within 1 week.
Granted, this survey has been done by a company who specialise in responding to your companies incoming email so it's likely to be a little biased - but my personal experiences certainly reflect their findings.
There is nothing worse than e-mailing a company (either directly or via their website) and not receiving a response. Being an internet-minded person I expect a response within a day or two, which I don't think is overly unreasonable - if they do not wish to respond to e-mails, they should not list an e-mail address on their website.
This is an area that small business seems to excel at - when there's only one or two people at the helm they pride themselves on answering customer queries in a quick and useful manner. Unfortunately the same can't be said for larger companies.
http://www.news.com.au/technology/story/0,25642,24097558-5014239,00.htmldjango-assets - Media Asset management for Django
This looks like a very useful application for managing Javascript & CSS files in Django projects. It can combine and compress JS & CSS files either manually (via command line) or automatically (when a user hits your site and one of the files has been changed).
A few sites I'm working on currently include multiple JS files to do their job, this should let me minimise that.
It's just a pity the source code is only available via bzr - since just about every other Django application uses svn it's often nice to keep the status quo. It also removes the ability for other application authors to refer to it via svn:externals. Oh well.
http://code.google.com/p/django-assets/Django 1.0 Alpha Released
Django, my web development framework of choice, has reached Alpha 1.0. There's a bunch of Backwards Incompatible Changes to the API which will require changes to your projects, but the codebase should be pretty stable from here to 1.0.
The biggest changes to this from the last official release are 'Unicode everywhere', a new and more powerful admin module powered by newforms, an updated database ORM that's more efficient, and automatic escaping in templates to help reduce the risk of cross-site scripting attacks.
1.0 should be released with a party at DjangoConf 2008 on September 2nd - I look forward to it (Although I won't be at DjangoConf, unfortunately).
Great work to everybody involved!
http://www.djangoproject.com/weblog/2008/jul/21/10-alpha/Pattern Tap: Interface Collection for Design Inspiration
A collection of interface design solutions from all over the web, where users can mark patterns they like, and learn from other's design solutions.
Not only is this a beautiful site, but the screenshots they've provided are going to provide some great inspiration for future projects.
http://patterntap.com/My DebugBar / CompanionJS
CompanionJS is a javascript debugger for Internet Explorer, somewhat similar to FireBug for Firefox. Looks like it'll be a useful tool for finding & fixing JS bugs in IE prior to deploying projects, as like most web developers IE isn't exactly my browser of choice.
http://www.my-debugbar.com/wiki/CompanionJS/HomePageYahoo! Address Book API is Available
Yahoo! have released an API to allow applications to access users address books without asking for a username and password. These API's are slowly becoming more and more available from various data providers, and it's a great way of breaking the scarily traditional "Enter your username and password so we can fetch your contacts" process.
Now all we need is a Python interface to it :)
http://developer.yahoo.com/addressbook/Google Code begins hosting AJAX Libraries
Google are using their CDN to host a number of Javascript libraries (including jQuery, prototype, and others). This means that a browser should only have to download the code once, rather than once for each site they visit that uses it.
You can link directly to the .js files, or use a Google API call to always load the latest version of a library.
http://code.google.com/apis/ajaxlibs/Google Code: Google Contacts Data API
The Contacts Data API allows client applications to view and update a user's contacts. Contacts are stored in the user's Google Account; most Google services have access to the contact list.
Your client application can use the Contacts Data API to create new contacts, edit or delete existing contacts, and query for contacts that match particular criteria.
http://code.google.com/apis/contacts/developers_guide_protocol.htmlMore...
Want to see more? Check out the yearly archives (above left).