Simon Willison’s Weblog

Subscribe
Atom feed

Blogmarks

Filters: Sorted by date

simplegeo’s python-oauth2. The Python OAuth library scene is frighteningly complicated at the moment. This seems to be the most actively maintained, and the readme includes working example code for talking to the Twitter API (including integration with Django auth).

# 18th July 2010, 5:22 pm / django, oauth, python, twitter, recovered, simplegeo, oauth2

Multi-node: Concurrent NodeJS HTTP Server. Kris Zyp’s library for spawning multiple Node child processes (one per core is suggested) for concurrent request handling, taking advantage of Node’s child_process module. This alleviates the need to run multiple Node instances behind an nginx load balancer in order to take advantage of multiple cores.

# 15th July 2010, 8:22 am / javascript, kriszyp, nginx, nodejs, recovered

DNode: Asynchronous Remote Method Invocation for Node.js and the Browser. Mind-bendingly clever. DNode lets you expose a JavaScript function so that it can be called from another machine using a simple JSON-based network protocol. That’s relatively straight-forward... but DNode is designed for asynchronous environments, and so also lets you pass callback functions which will be translated in to references and used to make remote method invocations back to your original client. And to top it off, there’s a browser client library so you can perform the same trick over a WebSocket between a browser and a server.

# 11th July 2010, 2:27 pm / async, javascript, json, nodejs, recovered, dnode, james-halliday

Diffable: only download the deltas. JavaScript library for detecting and serving diffs to JavaScript rather than downloading large scripts every time a few lines of code are changed. “Using Diffable has reduced page load times in Google Maps by more than 1200 milliseconds (~25%). Note that this benefit only affects users that have an older version of the script in cache. For Google Maps that’s 20-25% of users.”

# 11th July 2010, 12:19 pm / google-maps, javascript, performance, steve-souders, recovered, diffable

MapOSMatic. Clever service built on top of OpenStreetMap, which renders double sided city maps with a map and grid on one size and an A-Z street name index on the other. Runs on top of Mapnik, PostGIS and Cairo, with a few thousand additional lines of Python and Django.

# 11th July 2010, 12:15 pm / cairo, django, mapping, openstreetmap, postgis, postgresql, python, recovered, maposmatic

getlatlon.com commit dae961a... I’ve finally added an OpenStreetMap tab to getlatlon.com—here’s the diff, it turns out adding a custom OpenStreetMap layer to an existing Google Maps application only takes a few lines of boilerplate code.

# 10th July 2010, 12:22 pm / getlatlon, google-maps, javascript, openstreetmap, projects, recovered

How we deploy new features. GitHub are experimenting with using Redis for configuration management. I’ve been thinking about this recently too—managing feature flags feels like an ideal use-case for Redis, since it lets you read multiple values on every page access without adding a bunch of extra read traffic on your regular database.

# 8th July 2010, 10:04 am / github, redis, recovered, feature-flags

S.Korea ends Microsoft’s online shopping monopoly. The crazy rules mandating Active X based encryption for government and e-commerce sites have finally been dropped, after the Korea Communications Commission found them “unfit for a new Internet environment involving smartphones”.

# 5th July 2010, 8:21 am / activex, korea, microsoft, recovered

python/trunk/Lib/httplib.py in 1994 (via) Python’s original httplib implementation, checked in by Guido 16 years and 4 months ago. Not much younger than the Web itself.

# 4th July 2010, 11:25 pm / guido-van-rossum, http, python, recovered, httplib

Python 2.7 Release. Includes three of my favourite features from Python 3: odicts, set literals and set and dictionary comprehensions.

# 4th July 2010, 11:21 pm / dictionaries, odict, python, python3, sets, recovered

Escaping regular expression characters in JavaScript (updated). The JavaScript regular expression meta-character escaping code I posted back in 2006 has some serious flaws—I’ve just posted an update to the original post.

# 4th July 2010, 6:23 pm / escaping, javascript, regular-expressions, recovered

Repolygonizing Fonts (via) Part of Scribd’s fascinating series of posts explaining how their document conversion technology works.

# 30th June 2010, 1:04 pm / fonts, scribd, recovered

jQuery.queueFn. “Execute any jQuery method or arbitrary function in the animation queue”. I’m surprised this isn’t baked in to jQuery itself—the plugin is only a few lines of code.

# 30th June 2010, 12:59 pm / ben-alman, javascript, jquery, recovered

Conflict Minerals and Blood Tech. Capacitors are made from tantalum. Tantalum is extracted from coltan ore. 20% of the world’s supply of coltan is conflict metal from the Congo, and funds the world’s most vicious conflict.

# 30th June 2010, 12:57 pm / recovered, capacitors, coltan, conflictmetal, congo, tantalum

Unlocking the Huawei E5830 aka 3 Mifi. 3 will post you an unlocked replacement for your MiFi for £15, if you can figure out how to ask them to do it. Reports on the internet are that it can take several weeks and they sometimes forget to unlock the one you send them, so I went the self-unlocking route. These instructions (involving Windows running in VMWare Fusion, Firmware updates, PayPal, some very dodgy looking software and a PDF file half-written in Japan) ended up working a treat.

# 17th June 2010, 10:57 pm / mobile, vmware, recovered, 3g, mifi, unlocking

Mongrel2 is “Self-Hosting”. Zed Shaw’s Mongrel2 is shaping up to be a really interesting project. “A web server simply written in C that loves all languages equally”, the two most interesting new ideas are the ability to handle HTTP, Flash Sockets and WebSockets all on the same port (thanks to an extension to the Mongrel HTTP parser that can identify all three protocols) and the ability to hook Mongrel2 up to the backend servers using either TCP/IP or ZeroMQ. I’m guessing this means Mongrel2 could hold an HTTP request open, fire off some messages and wait for various backends to send messages back to construct the response, making async processing just as easy as a regular blocking request/response cycle.

# 17th June 2010, 8:11 pm / async, c, http, webserver, websockets, zed-shaw, zeromq, recovered, mongrel2

Slide, Inc.—open source. slide.com have open sourced a whole bunch of interesting Python libraries, most of them involving C extensions or greenlet non-blocking I/O. wirebin (fast binary serialization of native Python types) and meminfo (an extension for finding precise in-memory sizes of Python objects) look particularly interesting. No documentation yet—not even a readme.

# 17th June 2010, 8:05 pm / open-source, python, recovered, slide, slideinc

Falsehoods Programmers Believe About Names. People’s names are complicated. I’m not at all comfortable with the commonly used first name / last name distinction (as baked in to Django auth) since it doesn’t take cultural factors in to account.

# 17th June 2010, 7:44 pm / django, i18n, l10n, recovered, names

pdf.js. A JavaScript library for creating simple PDF files. Works (flakily) in your browser using a data:URI hack, but is also compatible with server-side JavaScript implementations such as Node.js.

# 17th June 2010, 7:39 pm / datauri, javascript, nodejs, pdf, recovered

TfL Live Traffic Cameras. Part of the new set of APIs released by the Greater London Authority—a list of 177 live traffic camera feeds from around London, all geocoded.

# 17th June 2010, 7:14 pm / apis, cameras, london, recovered, tfl, webcams

Great Literature Retitled To Boost Website Traffic (via) “7 Awesome Ways Barnyard Animals Are Like Communism”.

# 17th June 2010, 10:32 am / copy, funny, seo, recovered, awful, headlines

woedb. Aaron Straup Cope’s stylish new tool for browsing the GeoPlanet database.

# 9th June 2010, 11:42 pm / aaron-straup-cope, geoplanet, recovered, woedb

Today’s Guardian, by Phil Gyford. An alternative interface for reading today’s Guardian, built using the new Open Platform Content API and with extensive design notes from creator Phil Gyford.

# 9th June 2010, 11:21 pm / contentapi, design, guardian, newspapers, openplatform, phil-gyford, recovered

“Likejacking” Takes Off on Facebook. The Facebook Like button is vulnerable to Clickjacking, and is being widely exploited. Since Likes show up in your Facebook stream, it’s an easy attack to make viral. The button is implemented on third party sites as an iframe, which would seem to me to be exploitable by design (just make the iframe transparent in the parent document and trick the user in to clicking in the right place). I can’t think of any way they could support the embedded Like button without being vulnerable to clickjacking, since clickjacking prevention relies on not allowing your UI elements to be embedded in a hostile site while the Like button’s functionality depends on exactly that.

# 3rd June 2010, 10:01 am / clickjacking, facebook, iframes, phishing, security, recovered, likebutton, likejacking

On Django And Migrations. South author Andrew Godwin on the plans for migrations in Django. His excellent South migration library will be split in to two parts—one handling database abstraction, dependency resolution and history tracking and the other providing autodetection and the South user interface. The former will go in to Django proper, encouraging other migration libraries to share the same core abstractions.

# 2nd June 2010, 4:27 pm / andrew-godwin, django, migrations, orm, south, recovered

Parsing file uploads at 500 mb/s with node.js. Handling file uploads is a real sweet spot for Node.js, especially now it has a high performance Buffer API for dealing with binary chunks of data. Felix Geisendörfer has released a new library called “formidable” which makes receiving file uploads (including HTML5 multiple uploads) easy, and uses some clever algorithmic tricks to dramatically speed up the processing of multipart data.

# 2nd June 2010, 3:57 pm / binary, buffers, html5, javascript, nodejs, uploads, recovered, felixgeisendorfer, files

Appending the request URL to SQL statements in Django. A clever frame-walking monkey-patch which pulls the most recent HttpRequest object out of the Python stack and adds the current request.path to each SQL query as an SQL comment, so you can see it in debugging tools such as slow query logs and the PostgreSQL “select * from pg_stat_activity” query.

# 2nd June 2010, 9:09 am / chris-lamb, debugging, django, orm, postgresql, python, sql, recovered, monkeypatch

django-boss (via) Management commands are one of the few bits of Django that I still have to look up in the documentation whenever I write them. django-boss offers a smart alternative to regular management commands, based around decorators and taking the containing app as the first argument.

# 1st June 2010, 10:02 am / decorators, django, python, zachary-voase, recovered, djangoboss

tobeytailor’s gordon. Another Flash runtime in pure JavaScript project, released back in January. Not quite as advanced as Smokescreen yet (it doesn’t have an audio implementation) but already available as open source under an MIT license.

# 29th May 2010, 11:57 am / flash, javascript, open-source, recovered, gordon, mitlicense, tobeytailor

Years

Tags