August 2003
Aug. 2, 2003
On Metadata
Tim Bray’s series On Search now has a table of contents page linking to each of the previous entries. The most recent article covers metadata, and includes some insightful commentary on the huge problem of gathering metadata from users in the first place.
Applications of RDF
Shelley Powers: RDF: Ready for Prime Time gives an overview of the many applications and services already deployed that use RDF in some way. Via that article, RDF in Mozilla Docs and RDF in fifty words or less, both published by the Mozilla project.
The Doomsday Algorithm
I always thought you had to be an idiot savant to be able to state the day of the week for any date in history, but it turns out there’s a reasonably simple trick to it. The Doomsday Algorithm was first invented by Dr John Conway, also famous for creating the game of life. Rudy Limeback’s detailed explanation provides everything you need to know about the algorithm, how it works and how to memorise it.
Page Readability Bookmarks
I’ve long been a proponent of flexible web pages rather than restricting sites to a hard coded width in pixels, but now that I’ve started surfing at 1280x1024 I’m beginning to realise how true the statements about an optimum width for readable text really are. The simple solution would be to surf with my browser window resized to a sensible size, but old habits die hard. Instead, I made myself the following bookmarklet:
[... 157 words]Aug. 3, 2003
Marketing Firebird
Blake Ross has published a page on Marketing Firebird. He makes an interesting comparison between Firebird and Kazaa, pointing out that Kazaa has over 3.1 million downloads a week with promotion only via word-of-mouth:
[... 325 words]XHTML for future-proof content
Don Park questions the benefits of emitting XHTML. In one sense, Don is right; publishing a whole site using XHTML in this day and age brings very little benefit and can cause a great deal of grief. But just because XHTML doesn’t provide advantages when publishing whole sites does not mean it should be written off entirely. As I’ve said on this blog many times before, XHTML offers an excellent format for future-proofing site content, especially chunks of content kept in a database. Keith D. Robinson makes some excellent points along the same lines in his latest essay, Standards, Semantic Markup, Distributed Authorship and Knowledge Management:
[... 299 words]Excellent PHP 5 Overview
HarryF’s PHP5: Coming Soon to a Webserver Near You is the most detailed overview of the features we can expect from the next major PHP release that I’ve seen yet.
Minor comment system improvements
I should have made these a long time ago: thanks Nat for reminding me ;) Comments no longer require an email address, and provide a proper error page with the comment intact if you forget to enter your name. They also now add http:// on to your site URL for you if you forget to enter it yourself. I added the last feature in the code that displays the comments, so it should fix all of the older comments with invalid URLs as well.
[... 116 words]Aug. 5, 2003
A better image replacement technique
Over on Kryogenix, Stuart has solved the CSS image replacement problem with some clever application of the overflow: hidden;
property. The Fahrner Image Replacement technique is often used to replace a heading with a background image (see most of the designs in the CSS Zen Garden for examples), but has the disadvantages that it requires an additional <span>
tag to be added to the code and that some screen readers which follow the display: none;
directive skip straight over the replaced text without reading it. Stuart’s new technique solves both problems, and works in modern browsers from IE 5/Win upwards.
Aug. 6, 2003
Neat tip for clean URLs
Here’s one of the neatest tips for clean URLs I’ve seen yet, from Thijs van der Vossen. He’s come up with a mod_rewrite rule that checks to see if the requested file exists if you add .html on to the end of it, and serves it up if that’s the case. I’m posting the full code snippet here because it’s just too good to risk losing to link-rot in the distant future:
[... 88 words]Aug. 8, 2003
Notepad popups
Ever time I see something like this I’m reminded of how truly irritating the internet would be if I hadn’t switched to Firebird.
Aug. 10, 2003
Code personalities
Danny O’Brien compares Perl with Python. Best observation: Python code just doesn’t have much personality compared to Perl.
Aug. 11, 2003
Self-contained data: URI kitchen
I couldn’t resist this. Hixie has released a new version of his data: URI kitchen, to celebrate the addition of data: URI support to the latest Opera beta. In the spirit of recursion, I present this reformulation of the data: URI kitchen that uses client side Javascript. What better way to deliver such a thing than as a data URI?
[... 94 words]Don’t use document.all
I’ve lost count of the number of Javascript scripts I’ve seen floating around that include the equivalent of the following code snippet:
[... 164 words]Moveably Type with XSLT
Kevin Davis has set up an impressive demonstration of the power of Moveable Type templates when combined with browser-side XSLT transformations. He’s set up MT to output an XML document containing just his entries (similar to an RSS feed), along with a link to an XSLT stylesheet that causes Mozilla and IE 6 to transform the entry and render it as XHTML.
Improved FormProcessor class
I get one or two emails a week about my FormProcessor class, making it the most popular of all of the code experiments I’ve posted on this site. Each time I’m asked if I plan to update it soon, and each time I reply that while I’d love to go back to it, I can’t promise I’ll ever get the time to take it further. The great news is that Peter Bowyer of Maple Design has been working with my code and has made a number of huge improvements to it. If you liked my version, you’ll love his evolution of it: it adds support for radio buttons, checkboxes and select fields and he’s got a number of other interesting ideas up his sleeve for the future.
Python script shell integration
In another silly Python/Windows hack, Hans Nowak shows how a simple Python script to move a file up to its parent directory can be added to the contextual menu for all Windows files. I can think of all kinds of useful tricks that can be enabled using this tool: instant uploading of a file to an online Photo Gallery for example.
Aug. 12, 2003
Multi part forms with Javascript
Andy Arikawa has a nice demonstration showing how multi page forms can be served up as a single page using some simple Javascript, resulting in a clearer form without loading times in between each page.
[... 279 words]Firebird and Mozilla chrome URLs
Jesse Ruderman (of indispensible bookmarklets fame) now has a blog. It’s off to a good start: here’s a useful summary of the different chrome URLs available in Firebird and Mozilla.
Aug. 13, 2003
On blogging technique and better tabbed browsing
I’m addicted to tabs. Several times a day, I scan down my blogroll looking for blogs that have updated since I last checked, then middle click each one to open it up in a new tab in the background. I then work my way through each one, reading the earlier ones while the later ones are still loading (tabbed browsing makes being stuck on a modem a lot less painful). If I see anything interesting linked to from a blog entry I’m reading, I’ll middle click that as well. Within a few short minutes I’ll have so many tabs open I’ll be running out of space in my tab bar.
[... 399 words]Artificial Diamonds
Wired: The New Diamond Age. Two companies in the US have perfected techniques for creating cheap artificial diamonds, virtually indistinguishable from the real thing. The story of how they got there is riveting—retired army generals purchasing cold war soviet technology, veiled death threats to scientists at conferences and best of all, a very real threat to the De Beers diamond cartel / monopoly.
[... 137 words]Python never copies implicitly
10 Python pitfalls by Hans Novak (via Simon Brunning) is essential reading for anyone with more than a passing interest in Python. Python never copies implicitly
. If only that were true of PHP.
Note to self
When writing an XML parsing class in PHP, don’t forget the ampersands in the following code snippet:
[... 85 words]PHP Library Tips
Kellan Elliott-McCrea (author of the popular Magpie RSS parser): A Few Tips for Writing Useful Libraries in PHP. Kellan makes the interesting observation that PHP encourages a culture in which most development occurs in the context of either full applications or C extensions, with few people devoting themselves to releasing libraries.
Aug. 18, 2003
Atom API
Mark Pilgrim has posted an extensively documented demonstration of the current draft of the Atom API, a REST style web service interface for posting to and editing weblogs. It looks like it will be a fun standard to implement; the basic idea (as with all REST services) is to obtain as much leverage as possible out of the HTTP standard, using lesser known methods such as PUT and DELETE in addition to the more common GET and POST. The authentication mechanism is particularly interesting: since Apache’s support for digest authentication requires an additional module that many hosts may not provide, the Atom guys have created their own based around new Atom-Authenticate HTTP headers.
[... 227 words]3 column CSS layouts: Easier than you might think
In a recent issue of the Sitepoint Tech Times newsletter, Kevin Yank explains (in detail, with pictures) the recurring problem in CSS of trying to create a three column layout with columns of equal height and a footer spanning all three. If you don’t yet understand the problem, you will once you’ve read his article. Kevin suggests a javascript fix for the problem, but fails to mention that by using floats instead of absolutely positioned divs for the side columns a three column layout with a full width footer can be achieved without resorting to javascript. Pixy’s 3 columns, no hacks demonstrates this technique in action. In addition, the CSS-Discuss Wiki has a comprehensive list of 3 column layouts that demonstrate a number of other techniques for solving the same problem.
Firebird sidebars coming soon
Mozillazine are carrying a preview of the next release of the excellent Firebird browser, with the most exciting new feature being the new support for Mozilla style sidebars (previously known as web panels). I’m looking forward to being able to browse with my blo.gs powered blogroll in a side panel again.
Aug. 27, 2003
I’m in Kansas
If you’ve been wondering why the site has been so quiet for the past few days, here’s the reason: I’ve moved to the States! To cut a long story short, I’m here in sunny Lawrence for a couple of weeks preparing for a year long industrial placement at the Lawrence Journal-World, which should start for real in October (depending on my Visa application). To call this an exciting opportunity would be an understatement. The team I’m working with have won a ton of awards, and have a fearsome reputation within the industry. I’m joining Adrian Holovaty (recently interviewed on zlog) as a web developer working on KUSports, LJWorld and the excellent Lawrence.com. The company itself is remarkably forward thinking, especially in its approach to the web (no need to support Netscape 4)—there’s a good overview of what makes the Journal World special here, which includes a video interview with my boss, Rob Curley.
[... 206 words]ML Types Explained
From a link on the mailing list edition of comp.lang.python, this talk on strong typing (in the form of heavily annotated slides) is an explanation of the ML type system and why it really doesn’t suck. From the same thread, Felix is a new high level C++ style language with an ML style type system which looks like it could be worth experimenting with.