06 June 2020

Black Lives vs Flattening the Curve

Today I was proud to participate in a Black Lives Matter protest in Waterford. I kept at least two metres
away from others as much as possible although this wasn't easy despite staying on the periphery. Unfortunately
the two-metre radius was largely ignored by most participants here. I'm very grateful to local police who
carefully shepherded this peaceful protest despite it being officially cancelled.


Much online discussion of these global protests against the shameful behaviour of US police focusses on
how the protests are in violation of lockdown orders in the context of the current coronavirus pandemic.


This perspective is entirely reasonable given what we have seen of overwhelmed hospitals and mass burials.
These protests will very likely delay our recovery and may lead to more avoidable coronavirus deaths.


But the question is : what is more important for the kind of world we want to live in? How long should a
pandemic last? How long should racist violence last? There are two main voices in this debate:


"I think racism is disgraceful, but I didn't say anything because I didn't want to get sick. Maybe later?"


"I was worried about getting sick, but I could not stay silent in the face of this injustice. (coughs)."


I picked my side and I'm sticking with it.


14 November 2018

Foodopi: the saga continues

You probably thought this was a joke: FOODOPI - coming soon to a nation near you! - but look what a dutch cheese company is trying to do - EU court rules that the taste of food is not protected by copyright. While "not protected" might sound like good news for the rest of us - but in fact the court argued that it was merely "impractical" and not that it was "an utterly stupid idea".

13 November 2018

It doesn't have to be this way

Every time I pay for parking at Dublin airport, I'm filled with optimism for the future.


dublin airport parking payment with notice that change is possible

"Change is possible" - indeed, and the sooner the better.

06 February 2017

LibreOffice 1 -- 0 Microsoft Office

If you have a corrupted word doc on your mac and word just refuses to open it, the Internets of course have many helps for you, including but not limited to the great advice from Microsoft itself : how to troubleshoot damaged documents in word for mac (spoiler: the solution involves copy-pasting the word "test")

Actually, it's worse than that, the friendly dialog word offers says (more or less) "I can't open this file because it's corrupt. You should open this file and repair it". Duh ... the problem is I can't open it in the first place.

In any case, none of the many helps worked for me, so here's a hare-brained scheme I hatched all by myself : mail the file to yourself, open it on your ubuntu laptop using LibreOffice. Guess what ... it worked! "Save As" something sensible, mail it back to yourself on your mac, open again with Word. Word complained a little about unorthodox characters (specifically, the letter "V" ... who knows why...) but the opening was ultimately successful.

Anyway, this little post is another little piece of help on top of the great big pile of helps that make up the internets. I hope it helps you one day.

22 January 2017

gem install rmagick on ubuntu

Installing gem rmagick on ubuntu is almost worse than installing mysql gems used to be!


You will get a variety of errors depending on the version of ubuntu, the version of imagemagick, the various imagemagick libraries, and the version of rmagick you have installed or want to install. I mostly suffered from "checking for wand/MagickWand.h... no", "Can't install RMagick 0.0.0." (dunno where the version number went), "*** extconf.rb failed ***", among others.


This is what finally worked for me:
  • fresh install of Ubuntu 14.04
  • sudo apt-get -y install libmagickcore5 libmagickwand-dev libmagickwand5 ruby-rmagick graphicsmagick graphicsmagick-dbg  imagemagick imagemagick-common libmagick++-dev libmagick++5 libmagickcore-dev libmagickcore5 libmagickcore5-extra libmagickwand-dev libmagickwand5
  • gem install rmagick

(at time of writing, "gem install rmagick" installs 2.16.0 without complaint)



Ubuntu 14.04 supports imagemagick 6.7.7-10 and no later version. Ubuntu 16.04, on the other hand, doesn't offer anything earlier than 6.9.


According to tellnes, newer versions of imagemagick will not work with rmagick, although the rmagick page says: "Version 6.4.9 or later")



I didn't take the trouble to try the apt packages one-by-one to figure out the minimal set of packages rmagick needs to install successfully.



Note, "this works for me" ... it probably won't work for you. Google can point you to a large number of absolutely sure fixes for this problem, all of which worked for their authors, and none of which worked for me.


11 December 2013

UFT8 in string literals using MySQL client over ssh

MySQL documentation ain't what it used to be; it took some experimenting to figure out how to get a utf string into my db from the command-line client interface.


The problem is that for some reason when I run mysql on my server through ssh, non-latin characters just get dropped. It might be an ssh config thing, you never know, but I explored the mysql avenue first.


Here's what I found. Suppose you want to update a field containing some non-ascii character, like "à", like this:


update events set timetable = 'de 10h à 12h' where id > 100000;

But after you paste this into your shell, the "à" is missing:


update events set timetable = 'de 10h  12h' where id > 100000;

And your data doesn't get updated the way you expect.


This is the mysql documentation on string literals: string-literals.html


And here's a handy utf8 lookup table: http://www.utf8-chartable.de/


And here's the solution:


update events set timetable = concat(_utf8'de 10h ', _utf8 0xC3A0, _utf8' 12h' where id > 100000);

To explain: _utf8 0xC3A0 gives you your "à", you concatenate that with the rest of your string and away you go. It's ugly, but it works, so stop complaining.

13 November 2013

10k downloads

Yo, my rubygems.org profile has just hit 10,000 downloads!

I'm guessing that 99% of these downloads are bots though ...

Although not entirely ... the gems at the bottom of the list are either very recent (rspec_numbering_formatter), or kinda utterly pointless (ageism). On average, older gems have more downloads. Top of the list is protopack, which is actually useful as a way to store objects as YAML for later resurrection, kind of like test fixtures, but in a production context, with liberal meta-data sprinkled on top. You would think that sepa would end up being most popular though, as it's made for a critical bit of business - preparing SEPA direct debits, using the ISO 20022 xml standard (also known as "pain.008.001", although all banking standards are a pain so in this case "pain" is banking shorthand for "payments initiation"). It's newer than protopack though, so time will tell.

One more piece of data: none of the corresponding github repositories have issues opened. There are several ways to interpret this:

  • an army of bots is dedicated to downloading my stuff and archiving for posterity it all over the internet, but they don't take any more interest beyond downloading
  • real people download my stuff, decide it's unusable, and run away fast
  • real people download my stuff, it fits their needs perfectly and is 100% defect-free, and they're using it happily

Please feel free to draw your own conclusions. Then colour them in.