Simon Willison’s Weblog

Subscribe
Atom feed

Blogmarks

Filters: Sorted by date

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

# 14th May 2009, 3:56 pm / bridge, javascript, mozilla, python, pythonspidermonkey, spidermonkey

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.

# 13th May 2009, 8:20 pm / logos, meg-pickard, web20

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.

# 13th May 2009, 12:34 pm / cocaine, data, drugs, guardian, stats, timetric

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.

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

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

# 12th May 2009, 1:32 pm / crowdsourcing, geograph, mysociety, scenicornot

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.

# 12th May 2009, 1:19 pm / contextual, django, globals, python, settings

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.

# 12th May 2009, 11:23 am / ask-metafilter, books, education, phil-gyford

[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.

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

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.

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

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.

# 8th May 2009, 11:24 am / multiprocess, nose, python, testing, xunit

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.

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

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.

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

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.

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

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.

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

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.

# 4th May 2009, 6:12 pm / django, django-people, git, github, natalie-downe, open-source, projects, python

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.”

# 1st May 2009, 4:26 pm / greg-wilson, medicine, quacktreatments, science

Why I don’t love JavaScript’s Module Pattern. Jonathan Snook points out that the module pattern (where private functionality is hidden in a closure and only public methods are revealed to outside scopes) makes code a lot harder to debug. I use the module pattern for pretty much everything, not because I want to keep stuff private but more to avoid any chance of leaking out in to the global namespace. If I need to debug a value I temporarily assign it as a property on the global window object.

# 30th April 2009, 7:59 pm / closures, debugging, javascript, jonathan-snook, modulepattern

Coupling asynchronous scripts. More from Steve Souders, this time discussing methods to cause externally loaded scripts to execute in the correct order, obeying dependencies. Surprisingly there’s no mention of YUI loader or the Dojo packaging system.

# 30th April 2009, 7:57 pm / dojo, javascript, loading, steve-souders, yui

Loading Scripts Without Blocking. Steve Souders is publishing extracts from his new book, “Even Faster Web Sites”. Here’s a systematic study of different JavaScript loading methods, along with a decision tree for picking the most appropriate one for your application.

# 30th April 2009, 7:56 pm / blocking, javascript, loading, performance, steve-souders

django-piston. Promising looking Django mini-framework for creating RESTful APIs, from the bitbucket team. Ticks all of Jacob’s boxes, even including built-in pluggable authentication support with HTTP Basic, Digest and OAuth out of the box.

# 30th April 2009, 7:55 pm / apis, authentication, bitbucket, digest, django, jespernoehr, oauth, piston, python, rest, restful

REST worst practices. Jacob Kaplan-Moss’ thoughts on the characteristics of a well designed Django REST API library, from November 2008.

# 30th April 2009, 7:53 pm / django, jacob-kaplan-moss, python, rest

Building a Better JavaScript Profiler with WebKit. Clever hack from Francisco Tolmasky which solves the problem of JavaScript profilers showing ? as the name of any anonymous functions. He patched the WebKit profiler to look for a displayName attribute on a function and show that as the function name instead.

# 29th April 2009, 11:57 pm / francisco-tolmasky, javascript, profiling, webkit

With YQL Execute, the Internet becomes your database. This is nuts (in a good way). Yahoo!’s intriguing universal SQL-style XML/JSONP web service interface now supports JavaScript as a kind of stored procedure language, meaning you can use JavaScript and E4X to screen-scrape web pages, then query the results with YQL.

# 29th April 2009, 10:50 pm / apis, e4x, javascript, json, jsonp, sql, xml, yahoo, yql

whine flu, railsmalefail 2009. Danny quotes the smartest take on the CouchDB/pr0n controversy: “It’s about presenting women as ’the other,’ not ’us.’ It would have been just as offensive if all the women shown were domineering mothers in aprons, shaking their fingers and threatening with rolling pins.”

# 29th April 2009, 11:39 am / couchdb, danny-obrien, rails, sexism

moot wins, Time Inc. loses. The Time.com poll hack was more sophisticated than I first thought... Time implemented reCAPTCHA half way through the voting period, but the 4chan community fought back with a custom interface that crowdsourced the job of voting and let individuals submit up to 30 votes a minute.

# 29th April 2009, 11:13 am / 4chan, captchas, moot, onlinepolls, recaptcha, security, timedotcom, voting

Ubuntu brings advanced Screen features to the masses. Ubuntu 9.04’s screen-profiles package adds a taskbar to screen and emulates the gnome panel. You can even add a widget showing the cost of your current EC2 session.

# 28th April 2009, 9:52 pm / ec2, linux, screen, ubuntu

python-sqlparse (via) Python library for re-identing SQL statements. This could make debugging Django’s generated SQL a whole lot easier. You can try the library out using an App Engine hosted application (complete with an API).

# 28th April 2009, 8:25 pm / django, google-app-engine, python, sql, sqlparse

A new leaf. George Oates is now heading up the Open Library project at the Internet Archive. Sounds like a perfect match.

# 28th April 2009, 12:55 am / george-oates, internet-archive, openlibrary

Google container data center tour (on YouTube). 45,000 servers in 45 shipping containers, along with some serious looking plumbing.

# 26th April 2009, 10:14 pm / datacenters, google, video, youtube

Years

Tags