Simon Willison’s Weblog

Subscribe

March 2008

March 11, 2008

In Response to “What Sucks About Erlang”. Yariv Sadan responds to Damien’s criticism.

# 5:46 am / erlang, damien-katz, yarivsadan

python4ply tutorial. python4ply is a parser for Python written in Python using the PLY toolkit, which compiles to Python bytecode using the built-in compiler module. The tutorial shows how to use it to add support for Perl-style 1_000_000 readable numbers.

# 5:49 am / python, python4ply, lexing, parsing, compilers

Hacking Contributed Models. Neat Django trick using monkeypatching to make some minor tweaks to built-in contributed models such as auth or flatpages.

# 5:51 am / django, contrib, monkeypatching, python

Clickpass. Peter Nixey’s new OpenID startup has finally launched—does a great job of making OpenID more approachable with a clean, well designed UI and a neat orange button.

# 4:47 pm / clickpass, peter-nixey, openid, startup, usability

March 16, 2008

dojox.gfx demos. Impressive demos of the Dojo 2D drawing APIs—these need to be linked from the dojo site, it took me quite a while to find them.

# 4:24 pm / dojo, dojox, gfx, javascript, drawing, 2d

March 17, 2008

A brief introduction to Opacity and RGBA. The CSS opacity property is inherited by an element’s children; opacity set using the new rgba() declaration in CSS 3 differs in that it is not inherited.

# 2 am / rgba, css3, opacity, css

Firebug + Dijit tips. News to me: Firebug has a magic $1 variable which corresponds to the currently selected node. Very handy.

# 2:08 am / firebug, javascript, debugging, dojo, dijit

Lessons from mySociety conversion tracking. Neat trick: show the user a “subscribe” form with their e-mail address pre-filled for them and there’s a much higher chance that they’ll click the button.

# 2:12 am / mysociety, email, conversions, marketing

Django on IronPython. Dino Viehland demonstrated Django running on IronPython and SQL Server at PyCon.

# 4:05 pm / sqlserver, python, ironpython, pycon, microsoft, dinoviehland

March 18, 2008

Consistent Hashing. Beautifully clear explanation of consistent hashing, a simple technique that allows you to add new caching servers to a cluster without re-hashing your keys and hence invalidating all of your caches.

# 1 am / caching, scaling, consistenthashing, hashing

Open Tech 2008—5th July in London. Awesome—I still have happy memories of the last Open Tech (back in 2005), very excited about this one. Once again, it’s only a fiver to get in.

# 1:03 am / opentech, conferences, events, opentech2008

March 19, 2008

Wikihistory (via) International Association of Time Travellers: Members’ Forum.

# 12:17 am / timetravel, funny, godwin

Standing in Line. Simon Wistow coins “CLAMP” for LAMP + Cache, and expresses the need for a dirt-simple, high performance open source queue system.

# 9:41 am / simon-wistow, queues, clamp, lamp, open-source

Integrating reCAPTCHA with Django. Looks pretty straight forward.

# 9:41 am / recaptcha, django, captcha, python

Queryset Implementation. Malcolm explains the work that has gone in to the queryset-refactor branch. Executive summary: Python’s ORM is probably a lot better at SQL than you are.

# 9:43 am / sql, orm, python, django, querysetrefactor, malcolmtredinnick

IronPython, MS SQL, and PEP 249. How Dino Viehland got Django’s ORM to talk to the .NET database layer.

# 9:46 am / dinoviehland, dotnet, microsoft, django, python, ironpython, mssql, pep249, sql

Simple Exception Response for AJAX debugging. Neat solution to the problem of Django error pages showing up as raw HTML in the Firebug Ajax log.

# 4:44 pm / ajax, firebug, django, python

March 20, 2008

Draconian failure on error is not the answer problems of Postel's law. Draconian error handling creates an unstable equilibrium in Game Theory terms - it only lasts until one player breaks the rule. One non-Draconian XML5 implementation in key client product and the Draconian XML ranks would break. Well-specified error recovery is the right way to implement the liberal part of Postel's law.

Henri Sivonen

# 2:43 pm / draconian, html5, postelslaw, xml, henrisivonen

Yahoo!’s Latest Performance Breakthroughs. 20 new performance tips to join the previously published 14. Flushing the buffer while the backend code is still working to cause the browser to start loading CSS earlier is interesting.

# 3:17 pm / http, performance, css, yahoo

March 21, 2008

Amazon.com: amazon oddities. Warning: reading the user reviews on these items has the potential to soak up hours.

# 2:54 am / funny, amazon

A Toy Chat Server with Eventlet and Mulib (via) Eventlet (the Python non-blocking IO library originally written for Second Life) is ideally suited to building Comet servers; Chuck Thier demonstrates a simple chat server in a small amount of code.

# 3:28 am / comet, eventlet, lindenlab, secondlife, chuckthier, python, mulib

Administrative Debris. Ryan Tomayko explains his exceptionally clean redesign, inspired by Edward Tufte’s critique of the iPhone.

# 3:29 am / ryan-tomayko, design, edwardtufte, iphone

mysql_cluster (via) My Russian isn’t all that good, but this looks like a neat way of getting Django to talk to a master/slave setup, written by Ivan Sagalaev. UPDATE: English docs are linked from the comments.

# 8:45 am / masterslave, ivansagalaev, django, mysqlcluster, orm, python, replication

Version 2.0 of mod_wsgi is now available. Includes features that should make Python (and Django) on shared hosting much easier: a non-root user can touch their WSGI script file to restart just their application’s daemon processes when they make changes and Python virtual environments are supported to allow different versions of packages without interference.

# 1:23 pm / modwsgi, python, django, wsgi, hosting, sharedhosting

March 22, 2008

Monkeypatching is Destroying Ruby (via) Deliberately provocative title, but makes a well considered case for restrained use of monkey patching in Ruby. Cultural norms around monkey patching seem to me to be one of the core differences between the Ruby and Python communities.

# 12:27 am / ruby, python, ian-bicking, monkeypatching

The Perl community has a long-standing love/hate-affair with making changes that impose "spooky action at a distance". They call it "black magic" and it is generally considered it a last resort. Black Magic that makes GLOBAL changes to things like inheritance is often characterised as being "Octarine" (see disk world novels), because it tends to work ok when there's only one person doing it, but start to mix a few together and KABOOM!

Adam Kennedy

# 12:28 am / monkeypatching, magic, adam-kennedy, blackmagic, perl, ruby

Idea: A new typography term (via) keming. noun. The result of improper kerning.

# 1:41 pm / keming, typography, funny

wikinear.com, OAuth and Fire Eagle

I’m pleased to announce wikinear.com. It’s a simple site that does just one thing: show you a list of the five Wikipedia pages that are geographically closest to your current location. It’s designed (or not-designed) to be used mainly from mobile phones.

[... 1,190 words]

views.py for wikinear.com (via) I’ve published the views.py file from wikinear.com as an example of simple Fire Eagle integration with a Django application.

# 7:23 pm / fireeagle, django, python, django-snippets, wikinear

PownceFS. Not a joke: it’s a Fuse filesystem (written in Python, using OAuth for authentication) which exposes a directory for each of your friends on Pownce containing the files that they have uploaded.

# 11:18 pm / pownce, python, oauth, fuse, powncefs, richardcrowley

2008 » March

MTWTFSS
     12
3456789
10111213141516
17181920212223
24252627282930
31