mari
a
a
chi >
[ Page 1 of 2 ]
From: Smylers Date: 19:05 on 11 Mar 2008 Subject: Gnumeric Graph Plug-Ins I have a Gnumeric spreadsheet with a graph in it. I get a new computer, which happens to be running a more recent version of Gnumeric, and copy my home directory to it. I open up my spreadsheet. The graph's gone! Hateful! It still has a title, axes, and so on, but there's a big white space where my data used to be. Double-clicking the graph and looking at the options I can't even see where one could specify what the data should be. Odd. Eventually I give up, thinking I'll create a new spreadsheet and insert a chart on that, then perhaps copy the data over. 'Insert' > 'Chart...' brings up a dialogue box entitled 'Select Chart Type'. There's a list at the left headed 'Plot type'. The list is empty. Hateful! So, somehow this version of Gnumeric doesn't have any graph types defined -- yet it still displays the useless dialogue box, pretending I can pick one. Hateful! Perhaps graphs type definitions are now separate. Hmmm, Ubuntu has a gnumeric-plugins-extra extra package; let's try that. Nope, no difference. I can't be the only one suffering this. Let's try Googling. Ah, graphs are indeed plug-ins, and 'Tools' > 'Plug-ins...' is the place to go to configure them. But that's greyed out. Hateful! I click on an empty cell, and the menu item is now available. But, really, why on earth does having a chart selected mean I can't manage plug-ins? I see there's a bunch of charting plug-ins, so I activate them. I can see the logic in moving this functionality into plug-ins, but why weren't plug-ins for former-core features activated by default? Hateful! Oh, it turns out that actually for new users such plug-ins _are_ activated by default. It's just that I copied my home directory -- including my Gnumeric config, it seems -- from an older version. And part of that config was my list of active plug-ins! THEY MOVED CORE FUNCTIONALITY INTO A PLUG-IN AND THEN DECIDE WHETHER TO ENABLE THAT PLUG-IN ON THE BASIS OF WHETHER I'VE PREVIOUSLY ENABLED THAT PLUG-IN THAT THEY'VE JUST MADE UP! Hateful doesn't cover it. When I opened the document with a graph surely Gnumeric could notice it needs a plug-in? Or the interfacing for enabling graph-releated plug-ins could be in the dialogue boxes for selecting the types of new or existing graphs? Or at least those dialogue boxes could mention where to go to enable plug-ins? Or at least they could do that if currently no chart plug-ins are enabled? Because if graphs require plug-ins to be enabled, what bigger clue that the user wants to use them could there possibly be than choosing the 'insert graph' feature? Do they actually expect there is _anybody at all_ who when presented with an empty list of chart types wants to do anything other than enable a chart plug-in or two? Really? But that isn't the end of it. Because enabling the plug-in doesn't actually make the chart appear, oh no. For that I have to re-open the document. Hateful! Smylers
From: Smylers Date: 13:43 on 12 Feb 2008 Subject: mysqldump Error Messages $ mysqldump -p -d > current.sql Hmmm, that didn't prompt me for my password. And it finished very quickly! Wonder what it did. Let's look in current.sql: $ cat current.sql Usage: mysqldump [OPTIONS] database [tables] OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...] OR mysqldump [OPTIONS] --all-databases [OPTIONS] For more options, use mysqldump --help Nooooooooo! The whole purpose of having standard error is that it's the _standard_ place for _errors_ to go. Sending error message to standard output is just hateful. Smylers
From: Smylers Date: 18:30 on 04 Jan 2008 Subject: Debian Bash Command-Not-Found Extension Debian/Ubuntu supply Bash with an extension that lets you define a function to be run whenever a command in an interactive shell hasn't been found. As shipped it does things like this, which can be handy: $ echo znetnerg gungpure | rot13 The program 'rot13' is currently not installed. You can install it by typing: sudo apt-get install bsdgames bash: rot13: command not found This feature's documentation in its entirety, is an item in the 'Shell Variables' list in bash(1): command_not_found_handle The name of a shell function to be called if a command cannot be found. The return value of this function should be 0, if the command is available after execution of the function, otherwise 127 (EX_NOTFOUND). Enabled only in interactive, non POSIX mode shells. This is a Debian extension. Points of hate: * The docs suggest that you set $command_not_found_handle to the name of the function you want to run. I couldn't get this to work. The shipped function is called command_not_found_handle (and $command_not_found_handle doesn't appear to be set anywhere); so far as I can tell you simply define your function with that name for it to work, and the documented variable simply doesn't exist. * Because the API only provides for a single function, not an array of them, it's needlessly hard to set up a series of fallbacks -- for example to try the shipped 'uninstalled package' thing first and then something else. To get this your function has to duplicate the default behaviour before adding in its own check. This obviously doesn't scale, and makes assumptions about what the default behaviour is. * The default function in its entirety is this: command_not_found_handle () { /usr/bin/python /usr/lib/command-not-found -- $1; return $? } It only has two lines, and the second is entirely redundant! And the underlying Python program that determines whether the command is a program in an uninstalled package has the generic name command-not-found rather than something which indicates what this particular not-found handler does. * Whether that program knows about the command (and successfully tells you which package to install) or it can't help at all, the spec says it has to return 127 (because in neither case has the command been installed, for next time). This makes using it in a chain of fallbacks more work than necessary, because you have to capture its output to see if it's worked. (Then save its exit code, check if there was any output, and if so echo the output and exit with the exit code.) How hard would it'd've been to come up with different exit codes to distinguish these situations? Perhaps this 'uninstalled package' scenario isn't one the authors of the feature considered -- except that this is a Debian extension that appears to have been written especially to provide this behaviour! Grrr! Smylers
From: Smylers Date: 17:31 on 04 Jan 2008 Subject: Bashing Bash Hashing I just spotted this in the README.Debian that Debian supply with Bash: bash does not check $PATH if hash fails bash hashes the location of recently executed commands. When a command is moved to a new location in the PATH, the command is still in the PATH but the hash table still records the old location. For performance reasons bash does not remove the command from the hash and relook it up in PATH. "For performance reasons"?!? The only way I can parse that is as claiming it's better to complain 'No such file or directory' than it is to run the command that the user asked for (and is in the path) because the former is faster. Really, do you expect me to buy that? Is that actually going to be useful to anybody? Use 'hash -r' manually or set a bash option: 'shopt -s checkhash'. Options make sense when different users genuinely have different preferences, not to make up for stupidities in your default behaviour. Smylers
From: Smylers Date: 10:59 on 03 Jan 2008 Subject: Firefox Update "Click Finish to continue starting Firefox." I'm not entirely sure how I'd've phrased that, but surely, _surely_, when you want to indicate starting something there must be a better verb to use than 'finish'? Smylers
From: Smylers Date: 14:43 on 02 Nov 2007 Subject: MySQL date_format() MySQL's strftime()-esque function is called date_format(). That's mildly hateful, because it involves going to the manual page to look up whether it's date_format() or format_date() or format_datetime() or dateformat() or ... But at least it's understandable; the name is much more intuitive to those whose backgrounds don't include strftime(). Much more hateful is that even after getting the right name for the function, it still does the wrong thing because it takes the date first and the format second. Why? Why, when it's at best arbitrary which way round two arguments go, but there's a history of putting the format string first, would you do it t'other way round? I'm hoping that merely typing out this hate will sufficiently ingrain it in my memory that I'll remember it and not be caught out by it again ... Smylers
From: Smylers Date: 22:41 on 15 Aug 2007 Subject: Evince Blocking Sound Evince is a PDF viewer. Obviously no application should ever be hogging the sound device such that other apps can't play music -- but at least a sound-playing app has a plausible reason for why it's doing _anything_ with the soundcard. Whereas Evince was only charged with displaying a document, something which it was doing reasonably well. It hadn't made any noise. It has no excuse for being the answer to the question 'what do I have to kill off to make sound work again?'. That it was is hateful. Smylers
From: Smylers Date: 00:02 on 01 Aug 2007 Subject: Apache mod_rewrite Escaping Apache's mod_rewrite provides an escape function, whose complete documentation is: Translates special characters in [its input] to hex-encodings. So I tried to use it on a website to translate visible URLs such as: http://www.example.com/menu/Yorkshire_Pudding http://www.example.com/menu/Fish&Chips into a CGI call with parameters: http://www.example.com/menu.cgi?item=Yorkshire_Pudding http://www.example.com/menu.cgi?item=Fish&Chips Except that last one is wrong: the ampersand gets interpreted as starting a second CGI parameter; to do what I want it needs escaping as %26. Which is why I was using the escape function in the first place. And that was my mistake. Because by "special characters" it this function for use in rewriting URLs hatefully didn't mean characters that are special in URLs; it apparently meant characters that are special in OS filenames! No, really: http://issues.apache.org/bugzilla/show_bug.cgi?id=39739 Why is that more useful in a URL rewriter than escaping characters that are special in URLs? Would escaping ampersand and plus as well (which is harmless in the cases it's unnecessary) really have been too hard? And ... how on earth with that documentation was I supposed to guess at what your hateful function does? Smylers
From: Smylers Date: 18:36 on 24 Jul 2007 Subject: DenyHosts Locking # denyhosts.py --daemon DenyHosts could not obtain lock (pid: 6864) [Errno 17] File exists: '/var/run/denyhosts.pid' So let's try: # denyhosts.py --daemon --unlock Invalid command line option detected. Usage: /usr/bin/denyhosts.py [-f logfile | --file=logfile] [ -c configfile | --config=configfile] [-i | --ignore] [-n | --noemail] [--purge] [--migrate] [--daemon] [--sync] [--version] --file: The name of log file to parse --ignore: Ignore last processed offset (start processing from beginning) --noemail: Do not send an email report --unlock: if lockfile exists, remove it and run as normal --migrate: migrate your HOSTS_DENY file so that it is suitable for --purge --purge: expire entries older than your PURGE_DENY setting --daemon: run DenyHosts in daemon mode --sync: run DenyHosts synchronization mode --version: Prints the version of DenyHosts and exits Nice touch; when telling me that an option is invalid it's always nice to see the full usage information displayed, _complete with documentation of the option that you're telling me doesn't exist_! Smylers
From: Smylers Date: 13:51 on 20 Mar 2007 Subject: MySQL Function Naming MySQL has a couple of functions for extracting a substring from a string. They differ in how the substring is selected -- in one of them you specify a delimiter string, and in t'other you specify the index of the first character you want. The one in which you specify an index is called Substring(). The one in which instead of an index you specify a delimiter is called ... wait for it ... Substring_Index(). Wow. Smylers
mari
a
a
chi >
[ Page 1 of 2 ]
Generated at 10:27 on 16 Apr 2008 by mariachi