Craigslist gems

Just been idly flicking through the best of craigslist postings, and thought I’d share a few amusing ones:

April Fool’s Roundup

Just a selection of April Fools gags seen around the web –

Good stuff :)

There’s probably plenty more to add, mind.

Re-review: Williams Ale & Wine House

Yesterday I was Googling to try to find the menu for the Williams Ale & Wine House online to pass to a new colleague, and I found my own review of it, written back in 2007.

Williams Wine and Ale House

That review was done after probably our first visit, and criticised them for bringing the food out slowly; we’ve since been there many, many times, and they’ve been very good, so I think it’s time to re-review them – it’s only fair :)

The Williams Ale & Wine House is at 22/24 Artillery lane London E1 7LS (Google map). Artillery Row is a small back street not far from Bishopsgate & Liverpool Street station.

The food is consistently good there; their burgers are very large & tasty, many people have praised their beef & yorkshire pudding wraps, their Lasagne is top-class, and I’ve never seen anyone really disappointed with their food (except Esben, when they accidentally brought him a vegeterian lasagne (this, to the guy who won’t touch anything plant-related :) ). You can see their food menu online (or as a PDF), and their wine list is also available.

The staff are always friendly and helpful, and despite the pub’s popularity, we rarely have to wait more than a couple of minutes to get served, and the food arrives quickly.

There’s also apparently free wi-fi (although I’ve never tried it; we go there to get away from work, not to work :) ), and you can book a table online (or just call 020 7247 5163).

So, hopefully that will set the record straight :)

Synaptics touchpad under Xorg lives again

I have a Dell Inspiron 1501 laptop running Arch Linux, and recently, after an update, the Synaptics touchpad stopped working.

The touchpad shows up in dmesg as:

Synaptics Touchpad, model: 1, fw: 6.3, id: 0x180b1, caps: 0xa04713/0x200000
input: SynPS/2 Synaptics TouchPad as /class/input/input7

I was using a USB mouse until I found time to get the touchpad working again. Here’s what I had to do…

Continue reading Synaptics touchpad under Xorg lives again

Retagging audio tracks based on filename

I had some audio tracks which weren’t tagged, but did have filenames containing the artist, title etc, so I whipped up a quick Perl script to sort them out – retag-by-filename.pl.

It takes a regular expression with named captures for track, title, artist and comment, and sets the tgs on the file as appropriate.

It makes use of Music::Tag to do the actual tagging and Getopt::Lucid to read the options supplied, and requires Perl 5.10.0 for named regex captures (and ‘say’).

A --dry-run option allows you to check that the filenames are being parsed correctly by your regex before actually writing tags.

See retag-by-filename.pl for the full details.

Easy CLI option parsing with Getopt::Lucid

I often write Perl scripts which need to read options given on the command line. Normally I turn to the venerable old Getopt::Long which does the job.

However, I was writing a script which needed to be able to accept only certain parameters, which were mostly optional, and also take a list of filenames. I wanted this to be possible in any order, e.g.:

myscript --foo=foo --bar=bar file1 file2
myscript file1 file --foo foo

Getopt::Lucid makes this all pretty easy, and also makes the code pretty self-documenting, too. Straight from the documentation, showing the various types of parameters it can parse:

@specs = (
    Switch("version|V"),
    Counter("verbose|v"),
    Param("config|C"),
    List("lib|l|I"),
    Keypair("define"),
    Switch("help|h"),
);

$opt = Getopt::Lucid->getopt( \@specs );

$verbosity = $opt->get_verbose;
@libs = $opt->get_lib;
%defs = $opt->get_define;

A real-world example,from one of my scripts which handles ID3-tagging:

# The options we can take - these correspond to the name of the tag that
# they'll set:
my @options = qw(track title artist album comment);

my @option_specs = (
    Getopt::Lucid::Switch('verbose|v'),
    map { Getopt::Lucid::Param($_) } @options,
);
my $opt = Getopt::Lucid->getopt(\@option_specs);

my @tags_to_set = grep { $opt->{seen}{$_} } @options;
my @files = @{ $opt->{target} };

if (!@tags_to_set) {
    say "Nothing to do.  Use one or more of the options:\n" .
        join ', ', map {'--'.$_} @options;
    exit;
}

(The script then goes on to loop over all files, and use Music::Tag to set the ID3 tags requested).

Disabling reply-all? How stupid!

Apparently, Neilsen has disabled reply-all for all their Outhouse users, to “eliminate bureaucracy and inefficiency”.

What an incredibly stupid idea. Removing a very useful feature, just because a few people use it incorrectly? Stupid, stupid, stupid.

If people were CC’d on a mail you receive, then that mail was relevant to them, and contained info they needed. There’s a good chance your reply will also be something they should read; if that’s the case, you hit Reply All. If your reply is only relevant to the original author, just hit Reply. Really not that hard, is it?

Whining entitlementism

Just read a post likening shutting down websites to eviction (see also the follow-up here).

I’m saying that, like a real eviction, there should be practices in place. When you open your doors to hosting user content, you should have rules in action that, unless it’s a complete and total fire sale and you have no hope of even staying open that long, then you should be required, yes by law, assholes, to make the data available to customers for an extended period of time.

I’m sorry, but I think that’s a terrible idea. If a site or hosting service is free, you have no rights to demand things from it. If the site/service owners cannot afford to continue running it, or do not want to do so, it’s their prerogative. It would be nice and polite of them to do whatever they can to help you retrieve any content you had submitted there, but bollocks should it be a legal requirement.

Making laws like this will achieve one thing: dissuading people from knocking together valuable sites, for fear of the hassle of having to follow these laws if they ever want to shut it down. It’s not at all uncommon for sites which are huge these days to have started out as a one-person operation hacked together in their spare time.

At the end of the day, if a site/service becomes unavailable, the very most you should be legally entitled to is a refund of the amount you paid (pro-rata for the remaining paid-up service term). Morally, if the site owners are able to keep the data about for a while for people to download, that’d be a very nice gesture, but should certainly not be required.

The author of the posts above cites a few “heartbreaking” comments by people who used AOL Hometown, which shut down. AOL provided four week’s notice of the closure. Who the hell treats data placed online as their only copy? I’ve uploaded a fair number of photos to Flickr and Facebook, but the originals stay on on my hard drive (RAIDed and backed up to another drive also). If Flickr or Facebook had to shut down for whatever reason, I’d not have lost anything, and wouldn’t consider them responsible for my data.

David Precious – professional Perl developer, motorcyclist and beer drinker