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.
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.
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.”
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.
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.
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.
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.
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.
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.”
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.
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.
Freebase developer documentation. The JSON API and particularly the query language are fascinating.
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.
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.
Amazon EC2 Basics For Python Programmers. Detailed introduction and tutorial from James Gardner.
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.
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.
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).
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.
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.
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.
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.
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.
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.
Protoscript (via) JavaScript tool designed for easy prototyping of JS interactions; powered by YUI and jQuery.
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.
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.
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.
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.
django-sphinx (via) More code from Curse Gaming; this time a really nice API for adding Sphinx full-text search to a Django model.