soft-shell crabvietnam crab exporter

Simon Willison’s Weblog

Newsletter
Atom feed

Entries

Filters: Sorted by date

Election endorsements

My ex-colleague Jacob Kaplan-Moss has put together a fantastic site listing the presidential endorsements published by American newspapers in the run up to the election. I was looking for something like this just the other day so it was great to find the answer so close to home. I was depressed but not at all surprised to see my former employer endorse Bush, but it’s interesting to see that of the four Kansan papers listed two endorsed Kerry, despite that state’s huge Republican majority.

Keeping up appearances

Wow, I think this is the longest gap in my blogging since I started! I wish I could say I’ve been enjoying the sunshine or taking up a new hobby, but the truth is that the weather’s been horrible and I’ve just been run off my feet readjusting to life in England and at University.

[... 222 words]

Back in England

And I’m back.

[... 80 words]

Running Pydoc under mod_python

I’ve written about pydoc before. In my opinion it’s one of Python’s best kept secrets: a way of instantly browsing the properties, methods and documentation strings of any module available to the Python environment. It can even run a local HTTP server to allow for easy browsing of available documentation.

[... 372 words]

Python2.4 highlights

A.M. Kuchling’s “What’s New in Python X” documents are always a treat, and his guide to the forthcoming Python 2.4 is no exception. Among other things, 2.4 elevates sets to built in type status, dramatically improves the usability of Python’s list sort method (for easier application of DSU, aka the Schwartzian transform), makes reverse iteration easier and introduces an alternative string substitution method.

[... 231 words]

Matching newlines in JavaScript

Just a quick note: the . character in a JavaScript regular expression will never match a newline character. If you want to match any character including newlines you can use the [\s\S] character class instead, which means “any character that’s either whitespace or not whitespace”.

[... 86 words]

Browser innovation is alive and well

Here’s a feature that caught me by surprise (maybe I haven’t been keeping my ear close enough to the ground): the new Firefox 1.0 preview release supports Live Bookmarks, a novel twist on RSS aggregators where feeds look just like bookmark folders, displaying a list of bookmarks corresponding to the headlines from the feed. Best of all, the feature support RSS autodiscovery. Sites with auto-discoverable feeds display an attractive RSS icon on the right hand side of the status bar, allowing for one click subscriptions.

[... 230 words]

Command line blacklisting

Just over a year ago, I started blacklisting domain names from links featured in comment spam. My idea then was that these blacklists could become a shared resource: people would publish their own blacklist and subscribe to those of people they trust, thus making it much harder for spammers to operate. While the sheer volume of spam domains meant that the technique was much less useful than I originally anticipated, I’ve continued to maintain my blacklist ever since as a preventative measure against repeat spammers.

[... 721 words]

The bookmarklet solution to the password problem

Anyone who makes heavy use of the internet has run in to the password problem: dozens of user accounts on sites with varying degrees of trustability, leading to an unmanageable proliferation of username and password combinations. The temptation is to use the same combination on multiple sites, but doing so opens you up to the horrifying prospect of a security flaw in one site compromising al of your other accounts.

[... 366 words]

How to track an RSS feed

According to the HTTP specification, RSS/Atom aggregators should obey the HTTP 301 Moved Permanently header by altering the stored subscription URL for the feed they are attempting to retrieve.

[... 199 words]

1000th Blogmark

I just posted my 1000th blogmark. I can’t emphasize enough how much of an impact this 15 minute hack has had on both my browsing and my blogging habits. While I still tend to leave browser windows open for days at a time, I now at least have a procedure for getting rid of the ones that still interest me. More importantly, having blogmarks has eliminated the temptation to write a full blog entry (with quotation) just to share a link. This has dramatically reduced my posting rate, but has meant that when I do post an entry I usually have something moderately interesting to say.

[... 181 words]

A snarky note from the administrator

No, you can’t have a Gmail invite. No, I won’t hack your email account for you. And if you can’t find your hotmail inbox, you shouldn’t be using a computer.

[... 44 words]

Site specific stylesheets in Mozilla

New in Mozilla 1.8 Alpha 3: bug 238099—implement at-rule for matching on site/document URL. Here’s the example:

[... 111 words]

Participatory journalism

Participatory (or citizen) journalism is getting a lot of coverage at the moment, thanks in part to Dan Gillmor’s new book We the Media. For a great example of participatory journalism in action, check out Wikipedia’s outstanding coverage of the 2004 Summer Olympics. It’s already a serious competitor to the official site in terms of content, and its wiki nature means it will only get better as the games continue. Hat tip: Gadgetopia.

[... 203 words]

Early adoption, and Airport Express cut-outs

I don’t know quite how I did it, but in the past 48 hours I’ve become an Apple early adopter. I spent the weekend in Minnesota, where a visit to the Mall of America (aka Unholy Temple to Consumerism) resulted in a visit to the Apple store, and a visit to the Apple store resulted in a shiny new fourth generation 20 GB iPod. Of course, the seven and a half hour journey back south would go so much faster with an iTrip to play with, so I picked one of those up as well.

[... 477 words]

Improving online credibility

If you’ve browsed Amazon’s product reviews recently you may have noticed an interesting new feature: Badges, little icons displayed below certain people’s names. This isn’t a new idea by any means—many online communities use special icons as rewards for members who make valuable contributions (SitePoint is a good example). What’s interesting about Amazon’s badges is that one of them is “Real Name”. Amazon’s Real Names FAQ explains the badge, and includes the following:

[... 230 words]

Jimmy Wales on battling wiki spam

Jimmy Wales of Wikipedia was interviewed recently by the Slashdot community. One of the questions regarded protecting Wikis from spammers:

[... 241 words]

Site-specific extensions

I’ve been thinking about per-site user stylesheets for a while now, but my colleague Adrian has gone one better: his All Music Guide Corrector extension for Firefox fixes their horrible JavaScript links, hides the useless Flash navigation and improves their unpopular “read more” links, causing them to load content on the current page rather than navigating to a new page entirely.

[... 211 words]

News site registration

The single hottest topic in the online news industry at the moment is that of required registration. A number of large news sites (the New York Times, the Washington Post, the Chicago Tribune) have moved to this model, and many local newspapers are following suit.

[... 660 words]

Per-site user stylesheets

I’ve been thinking a lot about per-site user stylsheets recently. Eric Meyer’s CSS signatures are great for sites that support them (as this site does), but the sites that really need altering are highly unlikely to carry them. I posted a comment to that effect on photomatt.net a while ago, and thankfully it was spotted by Ryan Tomayko who has published a simple brilliant hack that uses XBL in Mozilla’s user stylesheet to execute JavaScript which adds a CSS signature to every site you visit.

[... 261 words]

Instant authentication against an existing web application

I was thinking today about the problem of querying an existing authentication database from a new application—exactly the kind of thing web services are useful for. Then I realised that any web application protected by HTTP Basic authentication already provides a standard API against which queries can be run. Here’s the Python code to do exactly that:

[... 187 words]

PHP 5 is out!

It’s finally here! Unfortunately PHP.net, while a great site in most respects, fails miserably when it comes to permalinks for news items and/or new software releases. You can grab it from their downloads page, and read more about it in the changelog. Now all it needs is widespread adoption. Unfortunately, something tells me PHP 4 is going to stick around for a long, long time.

Compile everything with a one-liner

The other day, we noticed that the .py files in our main mod_python application at work did not have corresponding compiled .pyc files. mod_python runs as the unprivileged apache user, which on our server doesn’t have the required permissions to write the compiled .pyc files in to the directories in which our code lives.

[... 111 words]

Fancy a job?

My placement here in Lawrence, Kansas comes to an end in a few months time, and I’m now in the interesting position of needing to find my own replacement. I’m not going to beat around the bush: this is a fantastic job and an excellent opportunity for anyone looking for a way in to the online news industry. The team here has won so many awards it’s hard to keep track of them all, and is very well respected within the industry.

[... 447 words]

Tantek’s Fridge

Recently spotted on Tantek’s fridge:

[... 18 words]

I have some gmail invites

I have four gmail invites left. The first four people to leave a comment with their email address can have them (put it in the email field and fill in a URL as well if you’re worried about spam harvesters—the email won’t be displayed but I’ll still have access to it). No random gift or good deed necessary—consider it a “thank you” for reading.

[... 144 words]

The orange XML icon sucks

I’m not a fan of the orange XML icon, even though I use it on my categories page. I love the concept of a universally recognised icon for RSS feeds, but XML is simply the wrong acronym to put on it. Don’t think it’s liable to cause confusion? Check out this excerpt from Journalism.co.uk (emphasis mine):

[... 160 words]

Embracing Best Practice

D. Keith Robinson is Sick of Web Standards, and to a certain extent, so am I. Like Keith, I’m not sick of standards themselves; I’ve been using them for over two years now and couldn’t conceive of developing without them. Unlike Keith, I’m not tired of advocating them—but I thoroughly believe that it’s time to extend the discussion.

[... 396 words]

Backporting from Python 2.3 to Python 2.2

We have a home-grown templating system at work, which I intend to dedicate an entry to some time in the future. We originally wrote it in Python 2.2, but upgraded to Python 2.3 a while ago and have since been evolving our code in that environment. Today I found a need to load the most recent version of our templating system on to a small, long neglected application that had been running the original version ever since it had enough features to be usable.

[... 356 words]

OS X Tip: Remapping keyboard shortcuts

On my Mac, Apple+W is the shortcut for closing a window (or tab in a tabbed application such as Safari or Firefox) while Apple+Q quits the application completely. These keys are right next to each other on the keyboard. Today, for the final time, I hit the wrong key and accidentally sent a couple of days accumulation of useful browser windows straight in to the abyss. I say for the last time because my intended IRC rant about the stupidity of setting those two keys right next to each other was cut off by Richard Soderberg, who showed me how to remap keyboard shortcuts for any application in OS X.

[... 242 words]