AaronCrane.co.uk

Articles tagged “Brokenness”

How not to handle errors

Sometimes the code running a dynamic website will encounter errors. There are a variety of ways to handle runtime errors, of course. Some are better than others, and today I encountered a site that manages to get a surprising number of things wrong.

More…

This is not an RSS feed

Various things we do at work involve taking RSS feeds from elsewhere. Some incompetent people emit feeds that are broken in one way or another.

More…

Insanity with dumping MySQL stored procedures

Suppose you have a MySQL database containing stored procedures (which were added in MySQL 5.0.3). Now you dump that database using mysqldump, take the dump, and load it into a different server.

Oops, the dump didn’t contain the stored-procedure definitions, so your code fails. So you read the mysqldump manual, and discover that you need to add a -R (--routines) unbreak-me option. You regenerate the dump with -R, and load it into your other server. That worked; phew. (Assuming the user you dumped as has read permissions on the mysql.proc table, anyway.)

Then you load the dump into a third server. But you weren’t thinking very clearly at this point, and this third server is running 5.0.2, or 4.1, or some other version N−k. What should happen now?

More…

Numbers and strings in MySQL

Here’s a MySQL query issued by some Perl code:

$db->do(q{
    CREATE TEMPORARY TABLE byline_age (
        byline_id int PRIMARY KEY,
        last_used int not null
    )
    SELECT byline_id, MAX(IfNull(published_at, ?)) AS last_used
    FROM article
    GROUP BY byline_id
}, undef, time());

Spot the bug? No, nor did I.

More…

An egregiously-broken website

I have a ticket to the William Gibson event at the Edinburgh International Book Festival. However, I can’t make it: I’m going to be at YAPC::Europe instead. So, I’m shopping the ticket round some friends. I’d like to point them to the URL of the event. So, I go to the festival website — hey, that’s nice, it’s the first Google hit for the term book festival. Click on What’s on. Select the date of the show. Search within page to find Gibson. Click on the More information link. Go to copy URL into clipbo— just a minute, the page URL shows absolutely nothing of value. The thing I clicked on must have been a POST form.

More…

It’s a modifier key, dammit!

[Previously published here.]

Sometimes the small hates are the most consuming ones.

My desktop uses Gnome. I mostly like it; it’s certainly not hate-free, but it’s not the topic of today’s rant.

OpenOffice.org.o.OoOO.Oooo runs on my Gnome desktop. I don’t really like OpenOffice, but some idiot has sent me a picture as, of all things, a PowerPoint presentation, and I need to be able to look at the benighted thing. So. Now I can Alt+Tab between the thing I’m actually working on, and the stupid picture stuffed into the stupid PowerPoint document.

More…

MySQL whitespace insanity

Here’s some astonishingly bad MySQL insanity. (I know I rant about MySQL lossage a lot, but that’s because there’s just so much of it to rant about.)

More…

MySQL and foreign-key support

[Previously published here.]

(This started out as a polite response on a mailing list to someone saying “You guys are out of date, MySQL is a pretty decent db now”. But it got a bit ranty, so I thought I’d put it here instead. Enjoy!)

Current releases of MySQL certainly have many of the checklist features of a real DBMS. However, this does not constitute a defensible claim that MySQL is a real DBMS.

More…