From: Aaron Crane Date: 12:43 on 08 May 2007 Subject: It's a _modifier_ key, dammit 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. Check something in OO. Switch back to code. Check something in OO. Switch back to code. Check something in OO. Swit-- no, wait, what was that in the PowerPoint document again? Oh, but now what's happened is that I hit the Alt key, then released it without doing anything else. Whoops, bad mistake. Because, unlike every other application I ever use, OO feels the need to make that mean "activate menu bar". Please note that there are already _two_ fucking keyboard shortcuts for activating the menu bar (F6 and F10), not to mention that Alt+F has exactly the same behaviour as F10 then F. But two shortcuts are apparently not enough: OO also has to make one of my precious, precious modifier keys behave in a completely stupid and counter-intuitive manner. Now, I know why OO does this: it's to emulate the broken behaviour of Windows. But, here's the thing: if I wanted my system to behave like Windows, don't you think I'd be using Windows? And on the contrary, if every other menu bar I ever use doesn't make me want to STAB PEOPLE IN THE FACE, don't you think that fitting in with that would be a good plan? Nnngggghhhh.
From: Aaron Crane Date: 13:16 on 19 Oct 2006 Subject: MySQL and foreign-key support (This started out as a polite response on another 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 share it with all you software haters 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. MySQL still, after all these years, has a whole host of arbitrary limitations (like the limits on key length, and the inability to use TEXT columns in a foreign key, and the lack of recursion in stored functions). And there are still important features missing, whatever table engine you use (like CHECK constraints, and deferred constraint checking). Worst of all, though, MySQL seems to deliberately make it hard to use the features it does have. A recent project needed transactions and foreign-key references in a MySQL 5.0 database (the current stable release, please note), so we used InnoDB tables. The situation was broadly equivalent to this: CREATE TABLE actor ( id INT PRIMARY KEY AUTO_INCREMENT, name TEXT NOT NULL ) ENGINE=InnoDB; CREATE TABLE film ( id INT PRIMARY KEY AUTO_INCREMENT, name TEXT NOT NULL ) ENGINE=InnoDB; CREATE TABLE film_actor ( film_id INT NOT NULL REFERENCES film, actor_id INT NOT NULL REFERENCES actor, PRIMARY KEY (film_id, actor_id) ) ENGINE=InnoDB; Simple enough, yes? No, actually. As it happens, using REFERENCES as a column constraint doesn't work at all, and you also have to explicitly specify the primary-key columns of the referenced table. So the only permitted syntax for foreign keys is this (which you'll notice is much more verbose than the obvious version): CREATE TABLE film_actor ( film_id INT NOT NULL, actor_id INT NOT NULL, PRIMARY KEY (film_id, actor_id), FOREIGN KEY (film_id) REFERENCES film (id), FOREIGN KEY (actor_id) REFERENCES actor (id) ) ENGINE=InnoDB; So guess what happens when you use one of the naughty-but-convenient syntaxes? That's right -- MySQL just silently ignores what you said! No error, no warning, just a blithe "sure, no problem mate, I'll get right on it", without actually doing what you asked. Why, yes, this _did_ cost me a day of debugging, thanks for asking. I'm aware of MySQL's propensity for handling compatibility requirements by "helpfully" ignoring any bits of syntax that the engine doesn't have the semantics for. But what made me so fucking angry about this was that the engine _does_ have the semantics for this! How hard could it be to just do the right thing? Hate.
From: Aaron Crane Date: 13:11 on 27 Jun 2006 Subject: CGI.pm OK, now I know that CGI.pm's HTML-generating functions are considered mor= e than somewhat d=E9class=E9, but I have to maintain an application that ma= kes liberal use of them. One of the most persistent sources of niggly and unpleasant bugs in this application is caused by CGI.pm's insanely hatefu= l and broken behaviour. Allow me to explain. Here's how you generate a hidden field with CGI.pm: print hidden('field_name', $field_value); This has the benefit of being simple, comprehensible, and elegant. Sadly= , it also has the disadvantage of being wrong. How's that? Well, suppose we're processing the result of submitting the form that contains this hidden field, and the $field_value you've just calculated isn't the same as the one that got submitted. In such a case, CGI.pm thinks that the best thing to do is to COMPLETELY FUCKING IGNORE w= hat you told it, and instead SCRIBBLE OVER YOUR DATA with whatever random cra= p it received from the form submission. (I'm not going to labour the point about inappropriately trusting data received from the internet, but pleas= e do be aware of it.) Of course, you can fix this. Here's how to code defensively against this retarded API: print hidden( -name =3D> 'field_name', -default =3D> $field_value, -override =3D> 1, ); (Just for good measure, note how this simple thing now takes up five time= s as much vertical space on my screen to fit into 80 columns, and that scre= en space is a non-renewable resource.) This API is just astoundingly fuckwitted. I can't conceive of any situat= ion in which it would be desirable behaviour, and it has caused huge numbers = of bugs in the software I maintain. And that's in spite of the fact that I know about this brokenness -- it's so stupid that it's apparently impossi= ble to remember to use the ridiculous workaround. Hate. --=20 Aaron Crane
From: Aaron Crane Date: 17:10 on 02 Mar 2005 Subject: Alsaplayer So, Alsaplayer seems to be pretty much the only simple (non-jukebox) MP3 player I've tried that can spit sound out of my not-particularly-spiffy USB speakers (as opposed to the fully-working soundcard in this laptop; long story). It seems OK. It has a little GTK GUI (or it does when you install the right Debian package, sigh) that lets you skip in a track with a slider, and adjust the volume, and all that sort of thing. So. Why in the name of all that is holy does the volume slider make the sound quieter when you roll the middle mouse wheel _up_? Hate.
From: Aaron Crane Date: 09:51 on 24 Sep 2004 Subject: Vim Mutt in a terminal can show me these kanji characters: 風é¨. Vim in a terminal can too. I can even type them using a sane input method: only four phonemic characters, plus two keystrokes overhead. But gvim under X? It insists on showing me the replacement codepoint-only glyphs, because it's _clearly_ too hard to render those characters in a font that has the right glyphs. Hate.
From: Aaron Crane Date: 10:49 on 31 Aug 2004 Subject: Fonts, Unicode, i18n, blah A word of background. I know about Unicode. I can distinguish UTF-8 and other encodings. I have a working knowledge of several non-Latin scripts. My system can happily display text with nicely-rendered fonts, even in Arabic. I've given a conference talk about how to get this stuff working in Unix. Today, $boss said "download Skype so we can teleconference". OK, thought I, no problem. Download. Run. It's all in Korean. I don't know any Korean. Hate. As far as I can tell, the damn thing has assumed that the fact I have Korean fonts installed is an obvious indicator that I want to be spoken to in Korean (and not, for example, an indicator that I'd rather see pretty text I can't read than lots of boxes containing Unicode code points). I find it hard to imagine what sort of cluelessness could give rise to this pestilence, this fetid ordure, this pollution of sanity. Hate hate hate.
Generated at 10:26 on 16 Apr 2008 by mariachi