Simon Willison’s Weblog

Subscribe

July 2002

July 28, 2002

Another free Python book

How to Think Like a Computer Scientist: Learning with Python is a new Python text book covered by the GNU Free Documentation License and available on the web. The thread discussing it on Slashdot gives mixed reviews, with other recommended free alternatives including Mark Pilgrim’s Dive Into Python and Thinking in Python by Bruce Eckel.

XHTML ODP attribution

The ODP require you to display an attribution on any page that reuses ODP data. The recommended attribution fails to validate as XHTML, so I created an XHTML compliant alternative which looks visually identical (at least in standards compliant browsers) but uses <div>s with CSS styles. ODP editor in chief rdkeating25 has informally approved my alternative version on the ODP editor forums so I’m ready to go—at least as soon as I finish writing a script to parse data from their pages ;)

July 29, 2002

Back to normal at diveintomark

Mark Pilgrim has made his first update since finishing his accessibility series a week ago. He has launched a new site design (as previewed on css-discuss) in an attractive shade of blue, and posted a catch up of the many events that took place over the weeks that his blog was devoted to accessibility. My favourite quote:

[... 89 words]

XHTML 1.1 Woes

Tim Luoma on thelist poined out this table, which details the media types that can be used when serving XHTML documents. The table shows that XHTML 1.1 should not be served with a text/html Content-Type header. Unfortunately using any of the allowed headers (application/xhtml+xml, application/xml or text/xml) will cause Netscape 4 to pop up a “download file” dialog, and is likely to cause problems in other older browsers as well. Looks like I’ll be sticking with XHTML 1.0 Strict for a good while to come. I don’t really understand the hurry to move to XHTML 1.1 exhibited by some developers—to my mind, the single biggest advantage of XHTML is the fact that it allows documents to be parsed by any XML parsing tool, and this benefit is available in XHTML 1.0.

July 30, 2002

Funky stuff coming soon

Peter Van Dijck has unveiled the Secret Metadata Project (here and here), so I hguess it’s time for me to come clean as well :) I’m working with him on a proof-of-concept PHP application for XFML, his markup language for exchanging faceted metadata. So far I’m really enjoying the challenge—I get to play with XML and collaborate on an exciting new project with an extremely talented information architect. The application is shaping up at an impressive rate, and we hope to have something live and doing things within a couple of weeks.

Multi-lingual PHP

A thread on SitePoint got me thinking about how PHP’s little known parse_ini_file() function could be used to easily manage multiple language versions of web site messages. Sections could be set up for each supported language, with message definitions repeated in each section. You could even have a default message section at the top which is used when a message has not been defined for a particular language. The comments on the parse_ini_file manual page suggest that the function is not particularly suitable for large scale use—PHP exits if the ini file is malformed and it can’t handle files larger than 16,382 bytes. That said, rolling a more reliable native PHP version should be a trivial project.

Tabs are not MDI

Dave Hyatt explains why Mozilla’s tabbed browsing is different to (and better than) Opera’s MDI model:

[... 162 words]

aqTree2

Stuart has updated aqTree, his excellent unordered-list-to-dynamic-tree script. The script is a clever piece of Javascript that uses the DOM to turn a nested unordered list in to a Windows Explorer style tree, without needing to add any extra HTML code. The new version is rather nice and less crufty now.

July 31, 2002

Reasons not to use Access

I’ve never used MS Access for anything web related, and I certainly don’t intend to at any point in the future. however, I do see a lot of questions regarding Access on various forums and mailing lists. Nine Reasons NOT To Use MS Access To Power A DB-Driven Website (published 29th June 2002) is an excellent article explaining exactly why using Access on the web is a really bad idea.

The CSS bug ring

Killer CSS link: Position Is Everything, part of the CSS bug ring. Big John on CSS-Discuss is probably the single most helpful individual I have ever encountered on a mailing list—he explains the most complicated (and simple) of solutions quickly, comprehensibly and in easy to understand terms. Position Is Everything is his collection of common but complex CSS browser bugs, complete with full explanations and any effective workarounds. The site links in to the CSS bug ring, a small ring of five sites providing more of the same. Truly an indespensable resource for anyone with an interest in CSS.

My shortest entry ever

Wow.

Students and the web

Point. Click. Think? (via from the orient). This is an interesting, well written piece on the effect that the web is having on student learning and research habits. Looking back at my first year at Uni I am probably a text book example of the symptoms the article describes—I hardly ventured in to the library at all, getting most of my additional course information from the web. Then again a Computer Science degree is probably better suited to web research than many other courses.