Camels and badgers and moose, oh my!

November 28, 2009

I spent the whole of Wednesday at an excellent Perl course organised by UKUUG. I’ve always maintained that a significant benefit of any training course is simply being forced to take the time out of the normal day-to-day work and focus on one thing; having expert guidance on exactly where to focus during that time is a bonus. A big bonus in this case, as tutor Dave Cross‘s lucid and engaging presentations showed me lots of things that I’d been doing really badly and inefficiently for years (and how to fix them!). I said as much to him, and he seemed quite taken aback: he hadn’t meant to make people feel bad, he protested. I meant it in a wholly positive sense, though; it was as if I’d spent years trying to tighten screws with the point of my Swiss army knife or the edge of a coin and then someone had finally given me an electric screwdriver. That’s a good thing.

The thing is, often it’s obvious when you’re doing things inefficiently (if you’re putting in a lot of effort for little gain, or finding yourself doing the same things again and again) but much less obvious how to fix this. There are lots of tutorials that teach you how to learn things properly from scratch; and if you’re actually getting errors, it’s easy to search for them and find out how to fix them (or at least make them go away, which isn’t always the same thing). But, assuming you don’t have time to start again from scratch (and, in a particularly frustrating vicious circle, if things aren’t actually broken then it’s hard to justify taking the time to fix them, particularly since if you’re doing things inefficiently you probably don’t have lots of spare time in which to sit down and learn how to do them properly…) it can be incredibly difficult to see how to get from where you are to where you want to be: a classic case of “I wouldn’t start from here”. It’s as if you’d learned a natural language in fragments from a dictionary and never had a chance to talk to a fluent speaker: you’d feel sure that “By what sequence of steps in what sequence of directions can I walk in a short amount of time from the place where I am now to the place where I can catch a train?” wasn’t the best way to ask your question, but no amount of looking up “direction” or “place” or “what” or “where” in a dictionary would be likely to get you to “What’s the quickest way to the station from here?”

I won’t try to recap everything that was taught in the course (the slides should be available online soon, and I’ll add the link here when they are) but the DBI, Template::Toolkit and DateTime sections covered about 80% of the Perl I write (and could probably reduce the number of lines of code by half!), and the Testing section (writing unit tests with Test::More) covered about 80% of the Perl I should be writing, hem hem. I thought the Object Oriented Perl section would be the hard bit (I’ve never really done any object-oriented programming — cutting and pasting bits of other people’s Perl without understanding it doesn’t count!) but one of Dave’s slides made more sense of OOP than anything else I’d tried to read about it so far. By the time we got to a quick overview of Moose, I was itching to go and rewrite every bit of code I’d ever touched (there never seems to be time because of the day-to-day bug-fixing, firefighting, and the million-and-one other things that always need doing, but I was seriously considering taking two weeks’ holiday to rewrite it all in my so-called ‘spare time’).

And as if all the geeky joy of learning how to do things more efficiently and elegantly wasn’t enough, the course also included a short digression about badgers! As some of my readers may know, I have a bit of a thing about badgers, so I’m delighted to learn that it was specially requested by the author as the cover animal for the Template::Toolkit book (which I do own, and no, the badger wasn’t the only reason I bought it). Maybe not everything in black and white makes sense, but a hell of a lot of things in Perl seem a lot clearer than they did before.


Let me unpack that for you

November 18, 2009

A while ago our University IT Staff mailing-list got very excited about this cartoon:

It’s a lot less aggressive than Let Me Google That For You (best when pre-combined with search terms, e.g. http://lmgtfy.com/?q=google) and its less work-safe companion, but the underlying attitude is not dissimilar — basically, “dude, this is easy, you could find this stuff out by Googling for it”. Now, I know the xkcd flowchart shouldn’t be taken too seriously, but it did make me think just how much knowledge and assumptions are embedded in an instruction like “Google the name of the program plus a few words related to what you want to do” — not to mention “follow any instructions”. It’s assuming that you know:

  1. how to “Google” something (really, not everybody can even get this far)
  2. the name of the program (or the operating system)
  3. the correct terminology for the thing you’re trying to do
  4. how to narrow your search down with relevant search terms
  5. what you want to do in the first place!

Let’s unpack that a bit more:

What is its name called?

When I’ve been doing helpdesk support, the Windows users I’ve spoken to often don’t seem to know that they’re using Windows (though “it’s a computer” or “it’s a PC” usually gives the game away), let alone the name of any software they might be running. In a University environment, “the web” is as likely to mean Firefox as Internet Explorer; and as for “So I went into my email”… it’s anybody’s guess what client they’re using. (“Okay, are you using Outlook Express, maybe? Thunderbird? Eudora? Do any of those sound familiar?” “No, I went to the bit where I put in my password…” “Is this on the web?” “It’s the bit where you go to the internet and you put in your password, you know, your university password.”) Google produced an video of ordinary people attempting to explain what a web browser is — it’s quite enlightening. How far would you get googling for the answer if your search was along the lines of “my email doesn’t work” or “the google crashes”?

Calling a spade a thing you dig with

Not all words are equal; some types of terminology make for better searches than others. Things which would be intelligible to a human being may result in a lot of frustrating irrelevance if you type them into a search box. For example, there’s a world of difference between “How do I make it so that when I go to the web I start with my webmail?” and “change default home page”.

The straight and narrow

Of course, the above example is still quite vague: there’s a difference between “change default home page” and “change default home page ‘internet explorer 8′”. Knowing which terms will successfully narrow down your search to the level of detail you want requires some awareness of the hierarchy or taxonomy you’re dealing with — you don’t have to call it that, of course, but it helps to know (for example) that there are several operating systems out there, and lots of different programs that you can run on those operating systems; that a web browser is a type of program, and there are lots of different web browsers; that any given web browser will have several different versions… and so on.

What users really want

“Find a menu item or button which looks related to what you want to do”, says xkcd — but actually, knowing (or articulating) what you’re trying to do may be harder than it looks, and is probably half the battle. “How do I stop it going all funny every time I click here?” isn’t much help whether you’re googling or looking for menu items (again, it helps if you know some more specific terminology for “going all funny” or how to describe to a computer where “here” is); and often what people think they want to do is “stop it giving that error”. There isn’t usually a menu item that says “Make it stop going all funny” — it’ll be something more like Tools → Preferences → Advanced → Deactivate Epic Fail.

End of an error

Typing an error message into Google is a useful strategy for solving problems, and may seem obvious; but even that involves some more deeply embedded assumptions: it assumes that you’re even allowing for the possibility that an error message is an attempt to communicate something to you (so that you can do something about it, or pass the message on to someone who can do something about it), rather than just a sign that “it’s all broken”. Too many users seem to think that computers exist in two states, “working” and “broken”: if it’s not working, then obviously it’s broken; and if it’s broken, then obviously what you want to do is get it working.

Simon Tatham says, in How to Report Bugs Effectively (which, incidentally, should be compulsory reading for anyone who ever has to talk to anybody else about computers): “Numbers in error messages are there because the computer is too confused to report the error in words, but is doing the best it can to get the important information to you somehow.” At the end of the day, it’s all about communication: the programmer, the software (insofar as it can be regarded as an agent), the user, the IT support guy — they’re all trying to pass information (in the broadest sense) from one agent to another without losing data. Starting with lots of unexamined assumptions is a bit like giving someone a document in a proprietary format, without checking that they’ve got the necessary software to decode it — at best they’ll spend unnecessary time and effort reverse-engineering it, at worst they won’t be able to extract any of the message you were trying to convey. Why make people guess? Even Google can’t read your mind. So far.


Inboxing clever

November 15, 2009

In the process of trying to get from ‘Inbox 600’ (otherwise known as ‘completely out of control’) to something more manageable, I’ve been thinking about what would make email easier for me to deal with. So here’s my wishlist. (Most of this functionality probably exists in at least one email client, or would be scriptable with a bit of effort.)

1. The ability to set an ‘expiry date’ on email when it arrives.

I get a lot of mailing-list email to my personal account which contains offers, “what’s on”-type information, the sort of thing which might be useful at some point over the next couple of weeks but isn’t immediately useful now. I keep it in my inbox as a way of keeping it “on my radar”, reminding me occasionally that it’s there in case I want to look at it; but I’d like to be able to tag it for expiry in, say, a couple of weeks — or when the next email from that mailing-list comes in.

Similarly, at work I get a lot of email containing ideas or suggestions for things that I could do if I had time; I want to set them to expire (or at least require manually ‘renewing’) after a couple of months. If I haven’t found time to do something within that amount of time, then either a) it’s too time-consuming/complicated to do inbetween other tasks, and should either become a genuine project/task and be logged/managed as such, or b) it’s just not actually that important.

Also, most emails don’t need keeping for ever. At work, I keep a lot of ‘paper trails’ in email; if I haven’t referred back to them within 6 months then I’ll probably never need to — but if I haven’t referred back to them in 6 months then I certainly won’t remember to go back and delete them after that time. At home, I keep a lot of confirmation emails from online shopping; I don’t want to waste paper by printing them out, but once I’ve saved them to my ‘admin’ folder they’re basically in a black hole. I want to save them to whichever folder is relevant but also set them to expire in, say, 1 year’s time (very few receipts etc need keeping longer than that). Organisational emails from friends don’t need keeping for ever — I may want to keep the emails where we tried to organise a party or something, but they’re not such works of literary genius or items of such sentimental value that I’m likely ever to revisit them.

(To be honest, I can’t remember when I last went back and re-read an old email for sentimental or nostalgic reasons. Occasionally I grep through my various read-mail files for specific bits of contact information, or for half-remembered words or phrases; but even that’s quite rare. Maybe I shouldn’t be keeping any of it.)

2. The ability to move things from email to other applications more easily.

This is getting better with more integrated calendaring, contacts, task-lists, etc. (not to mention Google Wave!), but there are things that just aren’t easy enough yet:

  • When an email contains dates and times, I want to be able to add those easily to my calendar, with a link to the email. It should be possible to delete the email from the event, or vice versa, or both at once.
  • When an email contains an address, I want to be able to add it easily to my contacts, with the email address, and whatever context is necessary from the email.
  • When an email has a PDF or doc attached, I want to be able to add that easily to a document store, detaching it from the email, but keeping a link to the email. Again, it should be possible to delete email and document in one go.
  • When an email contains a bit of text that I want to save, I want to be able to highlight that extract and save it as a snippet, automatically adding a ‘citation’ consisting of the name/email address and the timestamp.

3. The ability to tag and filter more flexibly.

This is the area where it’s almost certainly me who’s deficient, not the email clients. I want to be able to:

  • manually tag emails with as many keywords as I like
  • search/filter according to the presence/absence of single tags or combinations of tags
  • define rules for automated tagging according to sender/subject etc

Tagging probably entirely removes the need for folders (and is obviously more flexible as things can belong in multiple categories), but I admit that I still think in terms of folders. Ideally the user interface would make it possible for me to set up virtual ‘folders’ based on tags, rules, etc to ease the mental transition from one model to the other.

4. The ability to set automated replies based on sender/subject/time

For example, an ‘out-of-office’ reply to work colleagues during out-of-work hours, telling them that I’ll deal with their query in the morning; an ‘out-of-socialising’ reply to friends during work hours, telling them that I may check personal mail during work but they shouldn’t rely on it and I probably won’t have time to give them a long reply (but they can phone my mobile if it’s urgent).

5. The ability to set different levels of alert for new emails or other triggers

Rather than choosing between a popup alert for all new mail or nothing, I’d like to have, say, an SMS alert when email from my husband arrives in my personal inbox; an audible alert when email from certain senders arrives in my work inbox (as it’s probably important enough to interrupt other things for); no alert at all for emails from mailing lists; some kind of alert when my inbox goes over a certain number.

6. The ability to queue specific emails to be sent automatically at specific times

I want to be able to write work-related emails at the end of the day or in odd moments in the evening, but set them to be sent at 8:50am the next day, so I don’t end up getting sucked into work email exchanges late at night. If I write the email and postpone it, I don’t currently have a way to remind myself that there’s an email sitting in the invisible out-tray. Also, if I’m writing official announcements or questions to send to mailing lists, the time when I get a chance to write the text is not necessarily the best time to send the email (something sent to a mailing list on a Friday afternoon risks getting buried in an avalanche of silliness and pedantry; the same email sent on a Monday morning will get a much more sober and potentially more useful response). Ideally, this would work in close conjunction with my calendar, so it’d be easy to, say, set a reminder email to be sent half an hour before a meeting.

7. Built-in coffee-making functionality

Ideally this would be triggered when the inbox goes over a certain number of messages, or when email from specific colleagues arrives … Well, hey, I can dream. :-)