Simon Willison’s Weblog

Subscribe
Atom feed

Entries

Filters: Sorted by date

Some stuff

A few other things I read today:

Phil says goodbye to the popups

Phil Ringnalda has done the decent thing and rid himself of comment popups (the comments attached to his post make interesting reading). I haven’t got round to doing this yet, which is especially silly considering I open my own comments links in new tabs to avoid the popups myself. The main problem I have is that I want people to permalink to each entry within the context of the day it was posted—comments without a popup would need each entry to have its own comments page which could lead to people linking to the wrong place. My options so far are either to trust people to link to the permalink rather than the entry comments page or to go with a “show comments on the page” feature, possibly using a hidden div or even an external comment loader script as demonstrated by kryogenix a few weeks ago.

Trackback roundup

Plenty of action on the TrackBack front. Michel V is adding TrackBack support to b2, Moveable Type have released a standalone Perl implementation of TrackBack under the Artistic license, MetaFilter have added TrackBack support and Matt Kingston has published a full blown Homebrew TrackBack Tutorial for people who want to roll TrackBack support in to their own home grown blogs. Yet another thing to add to the todo list...

Zeldman gems

Two gems from Jeffrey Zeldman: Show, don’t sell and Table Layouts, Revisited. An extract from the former:

[... 91 words]

Sanity

BT lose.

DOM-Drag

youngpup’s DOM-drag is a cross browser library for creating draggable interfaces in DHTML. I had previously been looking at using Glen Murphy’s dragdiv for this kind of thing but DOM-Drag looks like a more mature implementation.

Opera 7, coming soon

Coming soon: Opera 7:

[... 55 words]

Marquee in Mozilla

News to me: Mozilla supports the <marquee> element (marquee test page)! Support was added a couple of months ago in light of the fact that nearly 30% of top 150 sites in China use the marquee element. Bug 156979 contains a fascinating discussion of this issue and why the decision was made to implement this controversial extension to the standards. Hogarth has a page detailing a way of disabling the behaviour of the element in your own Mozilla installation.

Mozilla pie menus

I’ve installed a brand new shiny copy of Mozilla 1.1, and thrown in the new Pie Menus addon for good measure. The new build seems a fair bit speedier than the 1.1 alpha version I was using before, but other than that and some funky new icons I haven’t spotted many differences. Pie Menus are interesting (and have already been discussed at length on Mozillazine, Blogzilla and Slashdot) but don’t seem as useful as mouse gestures, although they have a much shallower learning curve.

DevShed stuff

DevShed have published two useful new articles—MySQL Connectivity With Python and Understanding SQL Joins. They also now provide nice looking printer-friendly PDF versions of articles, which appear to be dynamically generated. Having found this article on Google I suspect they are using HTMLDOC to create the PDFs.

Back from Reading

Back from Reading. 3,200 emails (I forgot to unsubscribe from some mailing lists). <sigh>

Off down to Exeter

I’m off down to Exeter to see my girlfriend this afternoon, then we’re heading off to the Reading Festival on Wednesday. Updates will be scarce for the next few days.

The Lessig debate

I watched Laurence Lessig’s OSCON keynote the other day (an 8.4MB Flash file courtesy of Leonard Lin). A transcript of the session is also available. It was an excellent presentation and really opened my eyes to the issues facing intellectual property in the United States. It also appears to have raised some hackles—Dave Winer took offence to the implication that developers had not done anything about the problem, and Doc Searls has responded to Dave’s criticism with some interesting background information on Lessig.

Netscape Google?

Sam Buchanan: The Netscape Google mystery. A user complains of a non functional web appli ation, and when asked what browser they are using replies “Netscape Google”. Sam suspects that this is because Google is their home page and they type URLs straight in to the Google search box. I wouldn’t be surprised if he was right—I have seen several people (including an Aunt of mine) do this in the past. Sam’s summary rings particularly true:

[... 127 words]

Today’s pleasant surprise

Today’s pleasant surprise—while surfing around the Wireplay forums I came across a link to alliedassault.co.uk, a community site for Medal of Honour: Allied Assault. Imagine my surprise when I realised the news section was coded by me! It uses a news script I wrote over a year ago and never got around to finishing—I released it to a few people and it seems Reality ended up using it on the site. It’s great to see code you’ve written being used after you’ve all but forgotten about it—the site also uses my ssLinks link management script, the sequel to which I am working on now.

CSS image rollovers

CSS Image Rollovers describes a brilliantly simple technique for creating the effect of an image rollover using only one image and no javascript. The effect works by creating a gif with a transparent background, then using a :hover pseudo class to change the background colour of the the containing area. Pretty straight forward so far, but the clever part is that by making the transparent part of the gif an interesting shape (placing it around the outline of a shape in the image for example) you can give the impression of displaying a different image entirely.

Working on my blog

If I don’t post much today it’s because I’m hard at work on the new database driven version of this blog. I’m hoping to open souce it so I’m trying to design it to be as easy to customise and modify as possible, which means plugin support, themes and an extensible API. At the moment it will only work with mySQL but I’m trying to keep the data access routines abstracted away so they can be easily replaced with code for other databases or even a flat file or XML storage system.

PHP immune to SQL injection attacks

An interesting thread on SitePoint about SQL injection attacks. One of the points brought up is that PHP is by default virtually immune to injection attacks thanks to magic quotes (discussed here yesterday).

Tips for working from home

Another cracking article from Scott: 12 Tips for Working from Home But Keeping it Under Control. I worked from home for a while last year and these tips make a lot of sense (I know because I wasn’t doing any of them and I suffered as a result).

Why Scott doesn’t read your blog

Scott: Why I’m Not Reading Your Blog and Why Others May Not Be Also. Scott likes text he can resize and a decent update frequency. Tony Bowden responds that update frequency is no longer an issue for him ever since he switched to using a blog roll that shows him when the blogs listed were last updated. The same is true for me—my blo.gs powered blog roll has slashed the amount of time I spend keeping up with other people’s blogs as I only visit them when there’s something new to read.

A plan for spam

Paul Graham: A Plan for Spam. Paul suggests using content based filters that learn from users specifically marking messages as spam or legitimate mail. The system then picks emails apart looking for commmon terms (in both the body and the header of the message) that can then be used later on to identify spam messages. He claims his test have let through only 5 per 1000 spams, with 0 false positives. Impressive stuff, and great reading for the excellent explanations of some advanced alogithmic and statistical techniques.

Fiendish markup quiz

Hixie has posed a fiendish markup quiz—spot the four markup errors in a document that validates. It’s harder than it sounds. I’ve mailed off my answers, but I’m not expecting to get full marks.

[... 43 words]

Comments improvement

I’ve improved the comment system at the bequest of Adrian Holovaty. URLs posted in a comment (both those beginning with http:// and those beginning just with www.) will now be converted in to links.

Magic quotes solution

Pink Goblin (otherwise known as HarryF) explains why magic quotes are evil. This is an issue that every PHP developer should be aware of, as it can cause all kinds of problems in your scripts if you ignore it. He suggests using a custom myAddSlashes() function which only calls addslashes() if magic quotes are turned off. I have an alternative solution—chose your preferred setting (quotes on or off) and apply it at run time to all incoming data in one go. My code for doing this is available here. By a bizzare coincidence I wrote the script this morning, then spotted a link to the Pink Goblin article on tidak ada literally five minutes after finishing it.

New memes make Baby Jesus cry

Things that make Baby Jesus cry (stolen from Mark Pilgrim). Google as social commentary?

Python RSS locator

Mark Pilgrim has written an ultra-liberal RSS locator (in Python, naturally). I guess he had to scratch an itch. The amount of work it puts in to locating an RSS feed for a site is astonishing, especially when you consider how short the actual code is.

Zeldman played by a stand up comic

Eric Meyer has confessed.

css-discuss rocks

css-discuss has seen some interesting threads in the past 24 hours and the new archive means I can link straight to them—so here goes. Kentaro Kaji kicked off the topic of techniques for aligning an image with the bottom of a block of text. In the same thread, Benn Nunn advocated avoiding width and height attributes on images and keeping that information in an external style sheet. Other topics included accessible navigation and a tricky absolute positioning problem with Opera. The most informative mailing list I’m currently subscribed to just keeps getting better.

Today’s required reading

10 Tips on Writing the Living Web is full of invaluable advice for anyone who wants their weblog to be of interest to other people.

PHP numbered code listings

Michael V has written a couple of functions to apply my CSS numbered code listing technique to PHP’s built in syntax highlighting.