Simon Willison’s Weblog

Subscribe

September 2007

Sept. 1, 2007

The use of double underscores creates a separate namespace for names that are part of the Python language definition, so that programmers are free to create variables, attributes, and methods that start with letters, without fear of silently colliding with names that have a language-defined purpose.

Ka-Ping Yee

# 1:30 am / ka-ping-yee, python

What’s New in Python 3.0. They’re definitely taking advantage of the break in backwards compatibility—lots of niggling inconsistencies are finally being cleaned up.

# 1:41 am / python, python3

Wikipedia trust colouring (with demo) (via) “The text background of Wikipedia articles is colored according to a value of trust, computed from the reputation of the authors who contributed the text, as well as those who edited the text.”

# 1:42 am / kevingamble, wikipedia, ucsc, trust

All that specialist equipment, ‘barista’ training, and trouble spent over making a good cup of coffee – then when you ask for a cup of tea, you get a tea bag dumped in a mug, and over-boiled water from an urn poured over it.

Jon Hicks

# 8:33 am / jon-hicks, tea

Sept. 2, 2007

Django vs feedparser on dates. Some useful tips in the comments. I find Python’s timezone stuff endlessly frustrating: I know it can do what I want, but it always takes me a ridiculously long time to figure out the necessary incantations.

# 10:17 am / python, datetime, django, feedparser, timezones

Sept. 3, 2007

Sam Ruby: 2to3. Sam’s report on an attempt to port the Universal Feed Parser to Python 3.0. The 2to3 tool does most of the work, but it seems the unicode changes can be pretty tricky.

# 1:38 am / unicode, python3, python, sam-ruby, 2to3, feedparser

It Is Estimated That NBC Could Not Have Screwed This iTunes Thing Up Any Worse. NBC’s request that Apple “stiffen anti-piracy provisions” is down-right scary.

# 1:42 am / apple, osx, microsoft, nbc, john-gruber

calendar.timegm() (via) An “unrelated but handy function” that converts a time.gmtime() in to a corresponding Unix timestamp. I’ve been hand-rolling this one for years; never thought to look in calendar.

# 1:54 am / python, sam-ruby, calendar, timezones, datetime, unixtimestamp, time

Obviously, it’s not Obvious. “It was obvious to us that FeedBurner was a very powerful concept around which an ecosystem could flourish. It wasn’t obvious to most other people until they actually saw several examples of people using FeedBurner in powerful ways.”

# 2:09 am / feedburner, obvious, entrepeneurship, dick-costolo

If it wasn't for the Enlightenment, you wouldn't be reading this right now. You'd be standing in a smock throwing turnips at a witch.

Charlie Brooker

# 2:11 am / charlie-brooker, enlightenment

Freebase. Out of closed beta, although you still need an invite code to contribute. I hope they drop the JavaScript requirement for viewing content on the site.

# 2:35 am / javascript, freebase, inaccessible

Freebase developer documentation. The JSON API and particularly the query language are fascinating.

# 2:38 am / json, api, freebase

CouchDB: Thinking beyond the RDBMS. CouchDB is a fascinating project—an Erlang powered non-relational database with a JSON API that lets you define “views” (really computed tables) based on JavaScript functions that execute using map/reduce. Damien Katz, the main developer currently works for MySQL and used to work on Lotus Notes.

# 9:48 am / couchdb, erlang, databases, json, javascript, damien-katz, lotusnotes, mysql, mapreduce

How much is that standard in the window, the one with the lovely tale? “The real loser in this could be ISO’s reputation itself.” Simon Wardley summarises the embarrassing shenanigans surrounding ISO’s rubber stamping of Microsoft’s OOXML.

# 4:49 pm / office, microsoft, standards, ooxml, simon-wardley, iso

Amazon EC2 Basics For Python Programmers. Detailed introduction and tutorial from James Gardner.

# 6:20 pm / james-gardner, python, amazon, ec2, tutorial

Imaginary numbers. “We would like to back up our survey with an equation from an expert to work out which celebrity has the sexiest walk, with theory behind it”—Ben Goldacre provides inside information on how PR firms invent science to back up their campaigns.

# 6:22 pm / ben-goldacre, pr, science, badscience

Sept. 4, 2007

Ideas rot if you don't do something with them. I used to try to hoard them, but they rotted. Now I just blog them or tell people about them. Sometimes they still rot, but sometimes someone finds them useful in one way or another.

Edd Dumbill

# 12:21 am / edddumbill, corydoctorow, ideas, blogging

CouchDb: Some Context. CouchDb developer Jan Lehnardt wrote up detailed notes on slides from a presentation he gave back in June, explaining most of what’s interesting about CouchDb (although without the new JavaScript function query language).

# 2:31 am / javascript, couchdb, jan-lehnardt, nonrelational, slides

Primary & Secondary Actions in Web Forms. Fascinating results from an eye tracking study on the placement of “Submit” and “Cancel” buttons—one layout was a whole six seconds slower than the others. Luke Wroblewski’s “Web Form Design Best Practices” book looks like it will be excellent.

# 2:52 am / forms, formdesign, design, usability, eyetracking, lukewroblewski, lukew

Django on Jython: What I’ve done until now. It’s not quite there yet (the new Jython is Python 2.2 with a few 2.3 features; Django requires 2.3 at least) but it’s looking pretty promising.

# 2:53 am / django, python, jython, java

Opera 9.5 (Kestrel). The latest Opera alpha includes a bunch of CSS3 features (including an almost full implementation of CSS3 Selectors) as well as the ability to use SVG for scalable background images.

# 10:49 am / svg, opera, opera95, css3, selectors, annevankesteren, browsers, releases

I've actually been using the latest version of JAWS recently, as part of my work on HTML5. From a usability point of view it is possibly the worst software I have ever used. I'm still horrified at how bad the accessibility situation is. All this time I've been hearing people worried about whether or not Web pages have longdesc attributes specified or whatnot, when in fact the biggest problems facing blind users are so much more fundamental as to make image-related issues seem almost trivial in comparison.

Ian Hickson

# 12:27 pm / accessibility, usability, jaws, screenreaders, hixie, ian-hickson

Sept. 6, 2007

HTTPOnly cookie support in Firefox. Five years after the bug was filed, HTTPOnly cookie support has gone in to the Mozilla 1.8 branch. This is a defence in depth feature that has been in IE for years—it lets you set cookies that aren’t available to JavaScript, and hence can’t be hijacked in the event of an XSS flaw.

# 6:27 am / httponly, brad-fitzpatrick, firefox, security, ie, mozilla, javascript

Sept. 7, 2007

Spend 10 minutes collecting everything you need to work on a problem, and unplug the internet for 2 hours. You'll finish in 30 minutes.

Matt Mullenweg

# 10:42 pm / matt-mullenweg, productivity

Protoscript (via) JavaScript tool designed for easy prototyping of JS interactions; powered by YUI and jQuery.

# 10:55 pm / jquery, yui, javascript, libraries, prototyping, protoscript, bill-scott

Corrupt countries were more likely to support the OOXML document format. “We used the 2006 CPI index (Corruption Perceptions Index) as a measure of corruption.”—a statistical study by Electronic Frontier Finland.

# 11:30 pm / ooxml, microsoft, corruption, effi, finland

Sept. 8, 2007

Google Maps API gets clickable polylines and polygons. Interesting explanation of how they optimised calculating the distance to the nearest point on a polyline.

# 12:58 pm / polygons, polylines, algorithms, google, googelmaps, javascript

Advanced Django. Slides from my hour long tutorial at PyCon UK this morning. Most of the material was adapted from OSCON, but I also added a new section covering newforms.

# 1 pm / slides, pyconuk, newforms, django, pyconuk2007, slideshare, talks, tutorial, python

Sept. 9, 2007

wikimarkup (via) “MediaWiki markup in Python”. I’ve always suspected that MediaWiki was like Perl; the only thing that can parse MediaWiki is MediaWiki. Not sure how faithful this Python port is but I’d love my theory to be proved wrong.

# 12:33 am / python, cursegaming, david-cramer, mediawiki, perl, wiki, wikimarkup

django-sphinx (via) More code from Curse Gaming; this time a really nice API for adding Sphinx full-text search to a Django model.

# 12:35 am / django, python, orm, search, sphinx-search, cursegaming, david-cramer, full-text-search

2007 » September

MTWTFSS
     12
3456789
10111213141516
17181920212223
24252627282930