August 2008
Aug. 12, 2008
Django snippets: RequestFactory. I’ve been wanting this for ages; when I finally got around to writing it it turned out to only be a dozen or so lines of code. Makes it easy to create mock request objects in Django, which you can then use for testing view functions directly (bypassing the current test client mechanism which requires views to be assigned to a URLconf before they can be tested).
Fire Eagle has launched! No need for an invite any more, hooray!
Aug. 13, 2008
The statement that the password anti-pattern "teaches users to be phished" should be rephrased "has taught users to be phished"
Underscores are now word separators, proclaims Google. I missed this story last year—the change was announced by Matt Cutts at WordCamp 2007.
Keyczar (via) New open source cryptography toolkit from Google, designed to get algorithm selection, key rotation and versioning right so you don’t have to. Java and Python versions are available; the Python version depends on PyCrypto.
Around the world and back again. Flickr are using data from OpenStreetMap to provide street-level detail of Beijing for the Olympics.
Aug. 14, 2008
Free licenses upheld by US “IP” court. Free software and CC licenses which dictate conditions that, when violated, turn you in to a copyright infringer now have precedence in US law.
ECMAScript Harmony. John Resig explains the outcome of the recent “Oslo meeting” where proponents of ECMAScript 3.1 (incremental improvements to JS as it exists today) and 4 (massive, sweeping changes including many new programming constructs) harmonised their differences. The combined effort is closer to 3.1 than it is to 4, which I think is the right decision.
OAuth came out of my worry that if the Twitter API became popular, we'd be spreading passwords all around the web. OAuth took longer to finish than it took for the Twitter API to become popular, and as a result many Twitter users' passwords are scattered pretty carelessly around the web. This is a terrible situation, and one we as responsible web developers should work to prevent.
YUI 3.0 Preview Release 1. YUI sandboxing is a really good idea, which cleverly addresses both the need to run multiple versions of the library at once and the complaints about how verbose traditional YUI code can get.
This Week in Django. After 33 episodes Django’s usually-weekly podcast finally has its own website.
Aug. 15, 2008
If it's easy to make all your calls conform to the RESTful verb architecture, then that's good, I guess. But if not, then just use a POST as an RPC call, keep it as simple as possible and be done with it. And don't spend another minute worrying about being RESTful or not.
REST, I just don’t get it. Read the comments for some excellent practical reasons to care about REST, including cache management (PUT and DELETE can expire the cache entries for the corresponding GET), the ability to add or move parts of the server API without redeploying client libraries and the idempotency of GET / PUT / DELETE and HEAD (repeated POST operations may have side-effects).
minidetector. Neat piece of Django middleware that adds a “mobile = True” attribute to the request object if the request’s user-agent matches a list of strings of known low-power browsers in mobiles, PDAs or game consoles.
Aug. 16, 2008
Domain-Driven Design in an Evolving Architecture. How the team at guardian.co.uk used Domain-Driven Design in their recent two year rebuild. The core of DDD is having end users involved with domain modeling, which results in a shared domain language that should be understood by everyone involved.
Historic Airship Pictures: the Shenandoah, the Los Angeles, the Akron and the Macon as well as the Zeppelins and many more. The US Navy built some truly beautiful airships back in the 1930s.
АЭРОКРАТ КОНЦЕПТ (via) Another great Airship blog. I don’t speak Russian, but the photos and videos speak for themselves.
Aug. 17, 2008
I can't question that [the App Store] is probably the best mobile application distribution method yet created, but every time I use it, a little piece of my soul dies.
Explaining REST to Damien Katz. I didn’t know that it was Mark Baker back in 2002 who first pointed out that SOAP was flawed because it ignored the architecture of the Web as defined by Roy Fielding’s Ph.D thesis.
Aug. 18, 2008
Dare left something out (and it’s important). Dave Winer: “You should at least learn the lessons and add to REST what it needs to catch up with XML-RPC. Seriously. What’s missing in REST, btw, is a standard method of serializing structs, lists and scalar types.” That would be JSON.
Cyberstar. Adrian made the front cover of the Chicago Tribune magazine!
Aug. 20, 2008
UnicodeDictWriter—write unicode strings out to Excel compatible CSV files using Python. Stuart Langridge and I spent quite a while this morning battling with Excel. The magic combination for storing unicode text in a CSV file such that Excel correctly reads it is UTF-16, a byte order mark and tab delimiters rather than commas.
Facebook engineering notes on Scaling Out. Jason Sobel explains a couple of tricks Facebook use to deal with consistency between their California and Virginia data centres. The first is to hijack the MySQL replication stream to include information about memcached records to invalidate; the second is to use Layer 7 load balancers which inspect a “last modification time” cookie and send users to the masters in California if they have updated their profile in the past 20 seconds.
Aug. 21, 2008
SecondLife rolls out Mono-powered servers. Most of the work on this was done in Linden Lab’s Brighton UK office. If you’re interested in Mono and want to live in Brighton, they’re hiring!
querySelectorAll in Firefox 3.1. John Resig benchmarks the various JavaScript libraries’ support for querySelelectorAll, and finds an impressive 2-6x performance improvement over native DOM traversal. It’s worth clicking through to John’s experimental plugin for adding support to jQuery, which does a clever trick using __proto__ to convert the collection returned by querySelectorAll in to a jQuery object in browsers that support it.
Unfortunately, we're not cool enough to run on your OS yet. We really wish we had a version of Photosynth that worked cross platform, but for now it only runs on Windows.
Amazon Elastic Block Store (EBS). EC2 just got a whole lot more useful—you can now create “block level storage volumes” (think virtual hard drives) and mount them to an EC2 instance for real persistent storage—but because they’re virtual you can clone them, snapshot them and benefit from automatic replication.
Package Management Sudoku. “A package management system that can solve Sudoku based on package dependency rules is not something that I think would be useful or worth having”—like a red flag to a bull.
Persistent Django on Amazon EC2 and EBS—the easy way. Useful tutorial on getting Django up and running on EC2 with EBS for a persistent PostgreSQL database.
django-timezones. Models, form fields and a template filter for dealing with timezones in Django.