Simon Willison’s Weblog

Subscribe

May 2009

May 1, 2009

Right now, pypy compiled with JIT can run the whole CPython test suite without crashing, which means we're done with obvious bugs and the only ones waiting for us are really horrible.

Maciej Fijalkowski

# 3:04 pm / pypy, jit, python, jpython, unittests, bugs

Quack Remedies Spread Faster *Because* They Don’t Work. “... because (a) most people eventually get better on their own (and then blame it on the treatment), but (b) people adopt treatments based primarily on what they see other people doing, rather than by looking at scientific evidence. Basically, the longer you stay sick, the more time other people have to imitate you.”

# 4:26 pm / medicine, quacktreatments, science, gregwilson

May 4, 2009

djangopeople.net on GitHub. I’ve released the source code for Django People, the geographical community site developed last year by myself and Natalie Downe (it hasn’t otherwise been touched since April last year, so it needs porting to Django 1.1). If you want a new feature on the site, implement it and I’ll see about merging it in.

# 6:12 pm / github, git, django, django-people, open-source, projects, python

May 5, 2009

hash_ring 1.2. A Python library for consistent hashing with memcached, using MD5 and the same algorithm as libketama. Exposes an interface that is identical to regular memcache making this a drop-in replacement.

# 1:45 pm / libketama, amir-salihefendic, caching, consistenthashing, django, hashring, md5, memcached, python

May 7, 2009

ericflo’s django-tokyo-sessions. A Django sessions backend using Tokyo Cabinet, via Tokyo Tyrant and the PyTyrant library. A fast key/value store is a much better solution for sessions than a relational database.

# 7:30 am / django, sessions, keyvaluestores, tokyocabinet, tokyotyrant, pytyrant, databases, eric-florenzano

oauth-signpost. The Qype API uses OAuth to sign client requests with the developer’s API key, so it’s not surprising to see them release a Java OAuth signing library compatible with Google’s Android mobile platform.

# 7:33 am / android, oauth, java, qype, api-keys

mmalone’s django-caching. Mike Malone shares code used by Pownce to add QuerySet level caching to Django. It’s a smart implementation—a CachingQuerySet class inspects the arguments passed to get(), and if they’re just a straight forward exact PK lookup hits memcache for the object before hitting the database. Signals are used to invalidate the cache.

# 7:36 am / mike-malone, django, caching, pownce, querysets, signals

May 8, 2009

Nose 0.11 released. My favourite Python testing tool just got some really neat new features, including the ability to parallelize tests across multiple processes (hence CPUs) using the multiprocess module, Xunit XML output for integration with continuous integration tools and a --failed switch to re-run only the last batch of failed tests.

# 11:24 am / nose, testing, python, multiprocess, xunit, unittest

May 11, 2009

disturbyte’s zenqueue. Simple, tiny and fast Python message queue server built on top of coroutines and Eventlet, using JSON over TCP as the message format. I’m impressed with how potentially useful this looks considering the small amount of code. The author benchmarks it at 28 thousand messages/second.

# 1:27 pm / zenqueue, message-queues, python, eventlet, coroutines, json, zachary-voase, github

[whatwg] Annotating structured data that HTML has no semantics for. Hixie’s proposal for microdata, a simplified RDFa to be included in the HTML5 spec which allows self-contained communities to invent their own microformat-style spec and use it to add structured semantics to their markup. Whether or not you like the proposal itself the explanation is a fascinating read.

# 2:41 pm / microformats, microdata, markup, html5, ian-hickson, rdf, rdfa, semantics, whatwg

May 12, 2009

Ask MetaFilter’s best introductory books. Part of Phil Gyford’s ongoing quest to “learn about everything”, a list of the best introductory books to a wide range of topics collated from a thread on Ask MetaFilter.

# 11:23 am / ask-metafilter, phil-gyford, education, books

Contextual (via) I’ve been trying to figure out a sane way to replace Django’s settings.py global module with something that’s designed to be reconfigured at run-time. Contextual appears to be trying to solve exactly that problem.

# 1:19 pm / contextual, python, django, settings, globals

ScenicOrNot. MySociety are crowdsourcing opinions on how “scenic” different parts of the UK are, by rating representative photos from Geograph.

# 1:32 pm / mysociety, scenicornot, crowdsourcing, geograph

May 13, 2009

For the record, I'm a noted privacy freak and I don't pretend to speak for anyone else on this topic. I know that resistance is futile. I continue to believe that there is a great divide on sensitivity about privacy - you've either had your identity stolen or been stalked or had some great intrusion you couldn't fend off, or you haven't. I'm in the former camp and it colors the way I view and think about privacy online. It makes me indescribably sad to see how clearly I and others in my camp are losing this battle.

Marc Hedlund

# 8:41 am / privacy, marchedlund, identitytheft

South’s Design. Andrew Godwin explains why South resorts to parsing your models.py file in order to construct information about for creating automatic migrations.

# 12:30 pm / andrew-godwin, south, python, django, orm, parsing, models

Drug seizures: how pure is street cocaine? Neat story on the Guardian Datablog using graphs from Timetric to show that while the purity of cocaine seized by customs over the past five years has stayed constant, the purity of drugs seized by the police has been trending downwards.

# 12:34 pm / guardian, timetric, stats, drugs, data, cocaine

Game Web 2.Over? Meg Pickard took the 2005 Web 2.0 logo collage and updated it to show which companies have folded and which have been bought.

# 8:20 pm / web20, megpickard, logos

May 14, 2009

python-spidermonkey. A Python to JavaScript bridge using Mozilla Spidermonkey. Expose Python objects to JavaScript, or execute JavaScript from Python.

# 3:56 pm / spidermonkey, python, javascript, bridge, pythonspidermonkey, mozilla

Interview with Ian Hickson, editor of the HTML 5 specification. By Bruce Lawson of the Web Standards Project. Worth reading.

# 4:07 pm / bruce-lawson, ian-hickson, web-standards-project, html5, interview

May 18, 2009

New Features for EC2: Elastic Load Balancing, Auto Scaling, and Amazon CloudWatch. EC2 now fulfils the promise of “magic scaling in the cloud” out of the box—CloudWatch monitors performance of your EC2 instances without needing to install any monitoring software, Auto Scaling allows you to configure “scaling triggers” which start up new instances based on information from CloudWatch, and Elastic Load Balancing balances requests across all available instances.

# 10:07 am / cloudwatch, amazon, ec2, elasticloadbalancing, autoscaling, scaling, cloud-computing

python-daemon (via) A library for correctly creating Unix daemon processes in Python, implementing the proposed PEP 3143 API.

# 10:12 am / unix, daemon, python

The Little Manual of API Design (PDF). A concise, highly readable guide to designing APIs that are “Complete, Easy to learn and memorize, lead to readable code, hard to misuse, and easy to extend”, based on lessons learnt over many years of development of the Qt framework.

# 10:14 am / api-design, apis, qt, programming

resty. 58 lines of bash provides a better command-line interface to RESTful APIs, using curl under the hood. This should save me from running “man curl” several times a week.

# 1:07 pm / curl, rest, apis, resty, commandline, bash

May 19, 2009

djng—a Django powered microframework

djng is nearly two weeks old now, so it’s about time I wrote a bit about the project.

[... 1,501 words]

Django tip: Caching and two-phased template rendering. Neat trick for expensive pages which can be mostly cached with the exception of the “logged in as” bit—run them through the template system twice, caching the intermediary generated template.

# 1:34 am / django, template, python, caching, performance, adrian-holovaty

aws—simple access to Amazon EC2 and S3. The best command line client I’ve found for EC2 and S3. “aws put --progress my-bucket-name/large-file.tar.gz large-file.tar.gz” is particularly useful for uploading large files to S3. Written in Perl (with no dependencies), shelling out to curl to do the heavy lifting.

# 11:38 am / curl, perl, aws, amazon-web-services, ec2, s3, commandline, tools, tim-kay

Critical Mac OS X Java Vulnerabilities. There’s a five month old Java arbitrary code execution vulnerability which hasn’t yet been patched by Apple. Disable Java applets in your browser until it’s fixed, or random web pages could execute commands on your machine as your user account.

# 7:07 pm / osx, security, java, applets, browsers, apple

HOWTO Building a self-bundling Debian AMI. Not as terrifying as you would have thought. Also contains some neat hints as to how some of the more magical parts of EC2 work (like the way your SSH public key automatically ends up in /root/.ssh/authorized_keys).

# 7:49 pm / ec2, debian, ami, cloud-computing, amazon

EC2: Creating an Image. Here’s the easier way of creating your own AMI: start with a running instance in EC2, then customise it to fit your purposes and create a new bundle (and then AMI) using the ec2-bundle-vol command.

# 7:50 pm / ec2, ami, amazon, cloud-computing

May 20, 2009

Offline Processing on App Engine: a Look Ahead. A session at IO next week: “App Engine was designed to run request-driven web applications, although this will change in the coming year with the release of a number of offline computing components. In this session, we’ll explore the task queue/executor model of computation and some of the more interesting applications.”

# 12:40 pm / appengine, io, google, message-queues, offlineprocessing, workers

2009 » May

MTWTFSS
    123
45678910
11121314151617
18192021222324
25262728293031