Simon Willison’s Weblog

Subscribe

July 2002

July 22, 2002

Floats clarified

Floats, an alternative perspective. A useful overview of how CSS floats should work based on the specification.

PythonCard and PyCrust

Patrick O’Brien: Building GUI Applications with PythonCard and PyCrust. I’m a big fan of PythonCard, an excellent toolkit for creating GUI applications in Python that seperates the GUI layout from the program logic and makes it ridiculously easy to put together a basic GUI in a short space of time. Patrick is the developer of PyCrust, an interactive shell for debugging and interacting with GUI components, and is also a contributor to PythonCard as a whole. Patrick and Kevin Altis, the lead developer of PythonCard, will be presenting a session on PythonCard at OSCON on Thursday.

Using XML

Using XML on A List Apart:

[... 67 words]

Lycos tip the balance

Fantastic news for the web standards movement: Lycos Europe goes XHTML and CSS for layout (via Zeldman and the W3C evangelism mailing list). The new layout can be seen here—at the time of writing it had a few validation errors but hopefully they will be fixed before launch. The one thing CSS positioning advocates really need is a “big” site to start using CSS for layout, and it looks like Lycos are going to provide just that.

Useful tips from Craig Saila

Craig Saila’s Web Building Tips include all kinds of frequently asked but infrequently answered questions relating to various areas (mostly client side) of web design and development. The rest of the site is full of quality content along similar lines and is well worth exploring.

IBM accessibility center

IBM’s Accessibility Center has a plethora of useful information and resources, including a free 30 day trial of their Home Page Reader text-to-speech browser software.

July 23, 2002

Swannie’s blog

Mark Swanborough (a friend from Uni) now has a blog. He’s getting hooked already.

[... 44 words]

Evil but sometimes unavoidable

I’ve seen a few questions on various forums and mailing lists asking if there is a way of using target=“blank” on links in XHTML Strict without running in to a validation error. I’ve put together an example page showing a method of fixing this using the DOM, which also demonstrates Andrew Clover’s fun-but-ugly Evil Mangled Comments Hack.

Excite UK now powered by AllTheWeb

The Register: Tiscali to launch Excite across Europe. From Excite.co.uk:

[... 101 words]

Apple HCI guidelines

Apple’s Aqua Human Interface Guidelines (via a link on the Pinstripe Theme for Mozilla page). Interesting reading, and an excuse for a new category. I’m doing a course on HCI next term so I imagine I’ll be blogging a fair amount of related information in the future.

Browser testing tip

I have Mozilla, Netscape 4, Internet Explorer and Opera installed on my Windows PC. I use Mozilla for browsing and the other three for testing. It turns out that all four browsers can be loaded with a specific URL from the command prompt like this:

[... 100 words]

July 24, 2002

Random links with Google

Paul Freeman has come up with new use for the Google API—generating random links. The idea is simple but effective—a random theme is selected and searched for (via pygoogle), then another search is run on the title of one of the top ten results to return a random link and description.

PHP object overloading

I’m not sure how this one snuck under the radar, but PHP now supports object overloading (as of version 4.2.0). It can be implemented by creating class methods __set(), __get() and __call() and then applying the new overload() function to the class name. The documentation claims that __call() is not yet supported but is apparently out of date. Standard warnings about the experimental and unfrozen nature of the extension apply.

Instant PHP Web Services

XML-RPC Class Server is a really clever piece of code. It consists of a single file which you can drop in a directory full of PHP .class.php files to instantly provide an XML-RPC interface to every class in the directory. Private methods that begin with an underscore are not included in the web service. Unfortunately the system requires PHP’s XML-RPC extensions to be enabled.

Windows SSL support in Python

Adding SSL support to Python on Windows is as easy as dropping a couple of DLLs and a .pyd file in to your Python DLLs directory. Grab the zip file from this page and off you go. I haven’t tried it out yet but it appears to work—the socket.ssl function miraculously appeared when I installed the new files. Why is this useful? Because it opens the way for secure XML-RPC calls from Python applications...

TMs

I’ve been trying to get my head around Topic Maps, a powerful but complex standard for building intricate networks of metadata. I couldn’t even begin to describe them myself but the following resources have proved very useful:

July 25, 2002

Another rubbish site

Why is it that badly designed high profile sites that completely fall apart in Mozilla never have a “contact our web team” or “send us feedback” link anywhere? You would expect better from a company that provides web technology and customer management consultancy services (well if you’re a cynic like me you wouldn’t, but that’s beside the point).

[... 128 words]

How browsers load images

From the stuff-I-never-knew department: Bill Posters explains how browsers load images simultaneously on the SitePoint forums, in response to a question about getting images to load in a specific order.

Blog Hot or Not

Blog Hot or Not. I’m surprised no one had thought of this before—it’s clever idea, well implemented. When adding my own blog I was asked to come up with some keywords to describe it, so here they are for posterity and my own future reference:

[... 67 words]

Admirably prompt response from KPMG

A member of KPMG’s web team responded to my query about Mozilla support (sent via their online contact form using IE because the site was unusable in Mozilla) and informed me that a new site is on the way. You never know, they might even embrace web standards ;)

Warp factor PHP

I’ve been working on a PHP application that can take an XTM formatted Topic Map and convert it in to relational data in MySQL, run queries on it and convert it back to an XTM later. My work on the initial parser has involved some pretty heavy duty processing, and the speed with which PHP and MySQL are handling the data I’m throwing at them is phenomenal. The classic Italian Opera Topic Map example weighs in over a megabyte of XML, but PHP is munching it up and spitting out (and executing) over 13,000 SQL queries in less than seven seconds.

July 26, 2002

Here comes another meme

Via Kottke: True Porn Clerk Stories, a hilarious, touching and insightful journal of the trials and tribulations of a female Porn video store clerk in Chicago. This is some of the best and most original writing I’ve seen on the web in a long time. It is also quickly turning in to something of a meme. When you’ve finished reading the journal, be sure to have a look around the rest of the site it is hosted on—the community there is undergoing something of a trial by fire, with over 180,000 reads of the Porn Clerk journal resulting in massively increased traffic and a flood of new members that threatens the stability of the existing community. They have even had to open a PayPal scheme to help cover the dramatic increases in bandwidth ($15/month is now up to $25/day).

Google and the semantic web

I’ve long been wondering what kind of research Google are doing with respect to the Semantic Web. August 2009: How Google beat Amazon and Ebay to the Semantic Web (via From the Orient) is a superbly written essay which explains the concepts behind the Semantic Web through a “history” of how Google has become the world’s largest marketplace by the year 2009. Stuart has written his own essay discussing some of the issues raised by the piece, such as security and classification problems.

Browser specifications

Browser Specifications:

[... 27 words]

July 27, 2002

Stanford guidelines

Stanford Guidelines for Web Credibility:

DMOZ for Bath

I’ve had my application for editorship of the DMOZ University of Bath Category accepted. Bath’s main site has notoriously bad navigation, so hopefully I’ll be able to use DMOZ to build an alternative. I’m also looking in to eventually syndicating the DMOZ category via RDF and replicating it elsewhere. Unfortunately it looks like you have to grab the whole 130MB RDF file to do this, but I’ve seen tools that syndicate smaller portions of DMOZ so it must be possible to extract only the information you are interested in.

Syndicating the ODP

Having looked at some of these tools for syndicating content from the ODP, it seems that the standard method is to grab and parse the actual HTML files from the site rather than grabbing the huge RDF files. This would be a lot easier if the pages of the site were valid XHTML, but unfortunately they don’t even have a DOCTYPE. Luckily I wrote a page-link parser the other day for something else which seems to do a pretty good job on the ODP, so I should be able to put together a decent script without too much trouble.

July 28, 2002

Facets understood

And suddenly I understand faceted metadata. Sometimes all you need for that final moment of insight is a good example, and Peter Van Djick’s Columbia Guide Site Map is just what I needed. A facet is simply a “flat”, mutually exclusive (at least as far as the XFML specification is concerned) way of categorising a topic—it can be described as a bottom-up method of categorisation rather than the more common hierarchical top-down approach (as seen on the ODP) which seeks to assign all topics as sub-topics of something else. Peter writes in XFML Background and Concepts that Faceted taxonomies are generally more powerful for websites than classic hierarchical taxonomies—this seems to make a great deal of sense, and it will be interesting to see this demonstrated by XFML in the near future.

[... 163 words]

The mind of God

Red Herring: Dinner with the mind behind the mind of God, an informal interview with Sergey Brin, cofounder of Google. The “mind of God” reference stems from this quote:

[... 74 words]

FacetMaps

Yet another interesting take on XML metadata representations: FacetMaps. A facet map (as I understand it) is a way of combining facets with hierarchies, best explained by the excellent interactive three minute concept intro on the site. One of the main contrasts to XFML is that in a Facet Map Facets, rather than Topics, are the principle categorisation element. A resource in a Facet Map is linked directly to one or more facets, rather than going through a topic. The XML format is pretty simple (a lot simpler than XTM and XFML) so I might have a go at a PHP implementation at some point.