Entries
Filters: Sorted by date
Accessing cookies with application/xml+xhtml
I’m completely stuck on this one. When serving XHTML documents to Mozilla as application/xml+xhtml, the available DOM is for an XML document rather than an HTML document. This means it’s missing the document.cookie object normally used to access cookies from Javascript. I can’t figure out how you access cookies without it (I’ve searched Bugzilla to no avail). Anyone got any ideas? I sure wish the Mozilla project provided better documentation on this stuff.
RDF and PHP
If you’re still struggling to get to grips with what RDF is actually for, you could do worse than read this guide to Parsing FOAF with PHP. It shows how the FOAF flavour of RDF can be processed using the PHP RAP library, and in doing so demonstrates how RDF documents are built from collections of triples anmd how these triples can be queried to extract useful information. If you’ve ever used Prolog, RDF is actually a very similar concept.
Norwegian Hixie
Congratulations Hixie on his new job at Opera software, in sunny Norway. That’s a pretty exciting opportunity. Does this mean he’ll be contributing less to the Mozilla project? (Dave Hyatt has managed to keep working on it despite his move to Apple).
More unobtrusive DHTML
I’ve talked about unobtrusive DHTML before, and here’s a superb example of it in practise from Chris Casciano. His zeitgeist is enhanced by some clever javascript which hides and reveals tables of data when certain page elements are clicked. View source, and you’ll see that the document contains only structural HTML, with no embedded javascript at all. The special behaviour is added by an external Javascript file which adds the necessary event handlers when it loads, based on the structure of the existing document. This approach maintains the usability of the information in a non-javascript supporting environment, while seriously enhancing the maintainaility of the page as new structural elements can be added to the HTML which will pick up the special behaviour without any further modification to the javascript needed.
CSS Roundup
- SitePoint are running a CSS Design Contest, inspired by the Zen Garden.
- CSS/Exp is Mark Schenk’s collection of CSS experiments which show off some pretty advanced CSS, much of which oonly works in Opera due to its full support of generated content.
- CSS Destroy is a similar collection, with an emphasis on pushing CSS to its limits and beyond.
Knowledge Representation Timeline
This is pretty impressive: A Timeline of knowledge-representation that starts at the dawn of the Universe and continues through the whole of human history right up to the present day.
The Verbosity of Echo
Sam Ruby has called for people to start experimenting with the current (very early) Echo example feeds, and the response has been pretty impressive; check out these feeds from Joel Spolsky, Phil Ringnalda and Mark Pilgrim. Now that Echo has progressed to a stage where there are concrete feeds to examine, I have some serious concerns over the verbosity of the format. As they stand, Echo feeds contain a lot of duplicated information. Considering that the default behaviour of aggregators is to poll a feed for updates once an hour, any unnecessary information in the feed itself is going to have a very real monetary cost in terms of burnt bandwidth.
[... 257 words]Simple FTP uploading with Python
Here’s a nice example of a simple Python script which can be bound to the right-click menu in Windows and used to quickly upload files to a specific FTP server.
Further reading on the RNIB redesign
There’s been a flurry of blogger activity concerning the RNIB redesign over the weekend. isolani created an XHTML/CSS redesign independantly of mine, while Tom Gilder took mine as a starting point and made several improvements. Ben Meadowcroft has posted an open letter summarising the concerns felt by him and others over the way the redesign has been implemented. Meanwhile, Julie Howell (the RNIB’s Good Web Design campaign co-ordinator and a well respected member of the Web Accessibility community) has replied on Tom Gilder’s blog promising to collate feedback and pass it on to the web team (Julie herself was not involved in the redesign). It’s good to see they’re listening, but I really wish they would hurry up and fix their broken links!
Join the Buzz
Artima.com keeps getting better and better. In addition to the world’s most interesting collection of technical bloggers, Bill Venners has just added Artima Technology Buzz, a collection of community based public aggregators. They work a bit like the Python Programmer Weblogs page, but covering a wider range of topics and with the important difference that you can add your RSS feed up to the relevant community yourself. I’ve just added some of my category feeds to the relevant sections—you can add your own site using the links in each section, but you need to register a user account on Artima first.
time_since() on Feedster
This is pretty cool: Scott’s taken Nat’s time-since function and added it to Feedster, giving a quick indication of how long ago an item was posted.
The new RNIB site in CSS
Just to show it can be done, here’s the new RNIB site design (as mentioned earlier) re-done with a CSS layout. It’s something of a first draft—I’ve only tested it in IE6 and Firebird on Windows and it still has a few glitches here and there, but as a proof of concept it works pretty well. Here are a few notes on the implementation:
[... 550 words]More caching
One of the golden rules of web site development is “never launch a new feature on Friday”, because it’s almost certain to break over the weekend while you’re not around to fix it. I’ve just extended my hacked together caching system to cover entries as well as the front page in a bid to reduce the load on the database a bit, and since I’m off to Glastonbury tomorrow morning it will have a whole four days in which to collapse in to a smoking hole in the ground. What’s the point of golden rules if you don’t break them once in a while?
Moving forward from Internet Explorer
Dave Shea is advocating moving forward from Internet Explorer, enhancing pages for more advanced browsers (Mozilla, Opera, Safari) using additional style rules that are hidden from IE by using selectors it doesn’t understand. Essentially it means adapting the approach we’ve been taking to Netscape 4 for the past few years to work around flaws in the current browser generation’s backwards cousin.
[... 159 words]More thoughts on RSS
I helped Natalie set up an RSS feed for her (home brewed) weblog last night. Explaining what RSS was was easy. Explaining what she needed to put in her feed took a little bit longer. All she needed to do was provide a feed of entries, each with a title, the full body of the entry, the date it was posted and a permalink to the archived entry. In working out how to do this, we identified the following steps:
[... 460 words]Tom Gilder’s blog
Tom Gilder has finally started his blog properly, powered by Moveable Type. Nice design too (be sure to view source to figure out how he achieved the drop shadows). He’s already covered the RNIB site and has some refreshing thoughts on the IE/Windows situation.
RNIB redesign a disappointment
Accessify: RNIB redesign does not go far enough examines the RNIB’s much hyped new accessible web site and finds it sorely lacking. While it includes basic accessibility features such as alt attributes and skip-navigation links it suffers hugely from out-dated development practises and unnecessary markup bloat. Here’s a prime example, taken from the left hand column of the front page of the site:
[... 385 words]BBC News Feeds
Adrian Holovaty has the scoop on the BBC’s new RSS feeds, one for every news index page of their site. Adrian has also written a bookmarklet to find the feed for any section of the BBC site.
PHP philosophy, and bundling SQLite
Here’s a great quote from Rasmus Lerdorf (the creator of PHP) for people who have become disheartened with PHP’s lack of elegance when compared to other languages such as Python:
[... 232 words]Friends’ Blogs
My friend Tristan has got his blosxom powered blog up and running again. He’s also set up an experimental public aggregator of feeds from a small group of friends from Uni, using blosxom’s companion aggregator blagg. I think public aggregators are going to become a popular end point for RSS in the near future: they’re a great way of creating an instant community from existing weblogs. The Python Programmer Weblogs page is a great example of this in action.
[... 110 words]Another rant about Flash
Michael Pick has kicked off an interesting discussion on the usefulness of Flash, which is continued on mezzoblue. The key idea under discussion is that while Flash has its uses it remains a fundamentally bad choice for serving up text based content. I couldn’t agree more. It’s nice to see that some Flash designers think the same way.
[... 401 words]Sporting Gentleman’s Guide
If you’re still wondering what RDF is actually for, Ben Hammersley’s Sporting Gentleman’s Guide to the Semantic Web includes a perfect example of triples (even if it get’s a bit less obvious after that).
XML Shorthand Language
Via Keith, PXSL, the Parsimonious XML Shorthand Language provides a shorthand way of writing and maintaining XML documents. It’s based around the idea that a lot of XML formats contain more markup than actual text, thus by reversing the way the syntax is formatted and using meaningful indentation to express hierarchies markup heavy XML can be greatly simplified.
PEAR Tutorials
PHP Kitchen have compiled a list of PEAR tutorials, covering a number of useful PEAR modules. This is an especially important resource considering that PEAR’s module documentation is probably the weakest part of the project. Most modules have some documentation available in the PEAR Manual but much of this is incomplete and crucially there are no links from the package directory entries to the documentation for each package. It’s a shame because PEAR has a great deal of excellent code that many developers are completely unaware of.
Some thoughts on caching
Keith is thinking about caching. He’s drawn up a pretty interesting set of thoughts and requirements, such as support for conditional GET and fine-grained cache length control, and support for caching most of a page while leaving some small parts dynamic.
[... 206 words]Gorilla Web Tips
D. Keith Robinson’s Gorilla Web Tips: News and Featured Content, the first in a series of columns.
Jython as a learning tool
In Jython Is Just Too Useful, Joey Gibson shows how Jython can be used to quickly demonstrate Java class libraries interactively, including using Python’s dir() builtin to inspect available methods of Java classes. I used Jython last year while learning Swing for a piece of University coursework and found that being able to interactively create and manipulate Swing components (and see them appear on the screen as I typed) sped up the learning process a great deal.