import/export

Very flat, Excel

jp.stacey 22 March 2006

Database design, as an intellectual exercise, can be tremendously satisfying. As one builds up relations and constraints, making your database just rigid enough to support the more intelligent model soon to be layered over it, it’s possible to feel a sense of future-problems-solved: this check will prevent the model from trying to call a service a finished product; this trigger will roll back any unpassworded changes to a given provider.

This space intentionally left blank

jp.stacey 11 July 2006

I’ve been asked a couple of times recently, as part of separate projects, to split the results of a SQL query on whitespace within. Simply put, how does one go from:

foo
foo bar
quux
blort wuu spong

to the expanded form:

foo
foo
bar
quux
blort
wuu
spong

You can skip this one (and that five, and that seventeen...)

jp.stacey 11 August 2006

Programmers: know your Excel!

Now that's magic (quotes)

jp.stacey 15 August 2006

If your web application ensures that all your incoming CGI variables are free of the most common source of malicious site damage, can you stop worrying?

Blosxom to WordPress: tying up loose ends

jp.stacey 6 November 2006

A busy few weeks, but they’ve included an import from a Blosxom blog to a WordPress blog which is worth describing. There are a couple of established methods for importing the data, and I opted for the one that seemed the most modular.

Library of Congress, Flickr'd to the max

jp.stacey 17 January 2008

Flickr is working with the Library of Congress on new project The Commons. Currently there are around three thousand photographs up there from two collections, and according to the Commons homepage they’re all copyright-free. More information in the relevant post on the Flickr blog.

Firefox/Sage bookmarks to Google Reader import

jp.stacey 17 July 2008
When OPML is OPML but it isn't OPML

Want to migrate your RSS bookmarks from Firefox (or its RSS-reading addon, Sage) to Google Reader? I did, just now.

Christopher Hinze has written a great Firefox addon that exports bookmarks to OPML 1.0. Unfortunately, OPML is a bit of an anything-goes specification. So although Hinze's plugin produces valid OPML, it isn't the same sort of valid OPML that Google Reader expects.

Spliticket running again with BeautifulSoup

jp.stacey 7 September 2008
Or, how I learned to stop parsing and love the soup

Ages ago Matthew Somerville emailed me to say that spliticket had fallen over. It's my hacky interface to his wiki page documenting split tickets, and ultimately it found the vagaries of even wiki-generated HTML a bit too hard to cope with.

At the time I built the HTML parser using core SAX-based HTML parsing, and it was horrible.

Blogging about the password anti-pattern, finally

jp.stacey 26 October 2008
If you think I'm behind the times with this post then just give me your GMail username and password so I can tell all your contacts how tardy I am!

Here's a basic rule of account security: you should never give your login details on website X, to a form on website Y. And here's a basic rule of etiquette: if you're running website Y, you should never ask people for their login details on website X.

A WTF at the heart of your Drupal feed aggregation

jp.stacey 25 November 2008
Do try this at home, kids: but please have the decency to feel a little dirty about it.

Embedding JSON in XML. Hah, that's ridiculous, right? Almost as ridiculous as running a successful blog in .NET/ASP. Well, RSS can combine with JSON to quickly get a Drupal site to consume complex data structures over a webservice.

Drupal's core Aggregator module understands RSS2.0 with no tweaking, putting the text in the <description/> element into the content of quasi-node objects, so you can aggregate all sorts of syndicated content.