Category Archives: General

Communities of Learning

A fun and inspiring TED talk by John Green.

Making your Mac keyboard function better (as it were…)

Here are a couple of menu-bar apps I run on all my Macs:

Keyboard Maestro

Keyboard Maestro is a quirky and exceedingly useful utility. It’s a bit like Automator, but with a whole range of different capabilities. At its simplest, it responds to an event (like a particular key combination) and executes a set of actions (like, say, opening an app and moving its window to the top-right quarter of the screen).

But it can do more complex operations. Sometimes, for example, I have apps that respond to particular hot-keys, but only if they’re running; I can use Keyboard Maestro to detect the keystroke, and if the app isn’t currently open, it’ll fire it up and then send the keystroke on to it, or choose the equivalent option from its menus. More about keyboard shortcuts later.

A set of actions can be triggered by more than just keystrokes, too. You can have them run when:

  • The system wakes from sleep
  • The contents of the clipboard change
  • A button is pressed on an attached MIDI controller
  • A particular USB device is plugged in or turned on
  • You connect to a particular wifi network
  • Every 15 minutes
  • An item is added to a particular folder
  • A particular application starts
    to name a few…

Its one of those utilities that will be used in a different way by almost everyone who installs it. Here are some of my most-used triggers:

  • When I press Fn-J, it opens my journal (nvAlt)
  • When I plug my GPS logger into the USB socket, it moves all the track files onto Dropbox and runs various scripts on them, then ejects the USB drive so I can just unplug it.
  • When I turn on (or open the lid of) my scanner, it fires up various things to help with my paperless workflow. When I turn it off, it closes all the windows it opened.
  • When I wake up my laptop, it waits a few seconds to let things stabilise, then checks whether I’m on my home wifi network, and if so, it mounts my photo and music shares from my Synology server.
    None of these is vital, but all of them make my life easier, and creating them with keyboard Maestro is really pretty easy. Recommended.

Karabiner

Karabiner used to go under the snappy name of KeyRemap4MacBook, which was horrible, but at least somewhat descriptive! This little utility is even more quirky than Keyboard Maestro, and has a rather poor user interface, but it’s one of those things that, once you’ve set it up, does its job reliably and predictably, so you seldom need to touch it again.

It lets you remap your keyboard in various ways, and, despite its previous name, works on much more than just MacBooks. You can do very powerful things with this, especially if you want to go as far as customising bits of XML configuration, but normally you’ll just want to pick from a few of the standard options.

It’s really useful if you switch between different keyboards and want, say, to make the PC-style keyboard in the office work more like the Mac keyboard at home, or the other way around. I have Apple keyboards everywhere, so this is less of an issue, but I use it for just two things:

A ‘hyper’ key

I have a few global keyboard shortcuts that I use all the time, like the one mentioned above to open my journal, and another to create an item in my to-do list. I don’t want these to be buried under two many modifier keys (shift-ctrl-T), but I also don’t want them to clash with keyboard shortcuts used by my apps: I want them to work the same everywhere.

The secret is to create a new modifier key, sometimes called ‘Hyper’, which nothing else uses! I forget who came up with this idea originally, but the trick is to map, say, your Function (fn) key to produce Shift-Ctrl-Alt-Command, which no app ever uses for its shortcuts because it’s too much of a pain to type. Karabiner has a setting to do precisely this, without affecting The normal use of Fn when pressed with, say, the function keys. The, by setting my hotkeys in things like Keyboard Maestro to things like Fn-J (which it interprets as Shift-Ctrl-Alt-Cmd-J), I can just type Fn-T to create To-do items, Fn-J to create journal entries, Fn-D for my diary, and so forth, and I know that they work anywhere on my system.

A coder’s UK keyboard

I have UK keyboards, which I prefer to US ones, except that they have a £ when you type shift-3. I’m a programmer, and not a wealthy one, which means I need a ‘#’ far more often than I need a ‘£’. This does involve a short bit of XML: you just need to follow these instructions and paste in the code below, after which you’ll have an option called ‘Swap £ and # on UK keyboard’.

I hope others find those useful too!

<?xml version="1.0"?>
<root>
    <list>
        <item>
            <name>Swap £ and # on UK keyboard</name>
            <identifier>private.swap_pound_and_hash</identifier>
            <autogen>--KeyToKey-- KeyCode::KEY_3, ModifierFlag::SHIFT_L, KeyCode::KEY_3, ModifierFlag::OPTION_L</autogen>
            <autogen>--KeyToKey-- KeyCode::KEY_3, ModifierFlag::OPTION_L, KeyCode::KEY_3, ModifierFlag::SHIFT_L</autogen>
        </item>
    </list>

</root>

Coming into alignment

The project I’m currently involved in at the University Computer Lab is investigating how we can make use of some of the lab’s computer vision and human interface expertise to improve the experience for car drivers. This is being done in conjunction with Jaguar LandRover, and we’ve been equipping a Discovery with several cameras, some looking at the driver and passengers, some at the surroundings.

2015-07-09_10-56-23-07

We can also record various bits of other telemetry from the car’s internal CAN network, and some of the cameras are synchronised to this, but not all of them.

My knowledge of computer vision techniques is about a quarter of a century out of date, so as part of a learning experiment today I was thinking about ways of automatically synchronising the video to the data. The two graphs below show the first minute and a half of a recording, starting with the stationary car moving off and going through a couple of turns. This isn’t how we’ll eventually do it, but it was a fun programming experiment!

This first plot shows the angle of the steering wheel, as recorded by the car’s own sensors.

steer

This second plot shows the average horizontal component of optical flow seen by one of the front-facing cameras: in essence, it’s working out whether more of the pixels in the view that the driver sees are moving left or right.

flow

I’m quite pleased that these two completely independent sources of data show such a nice correlation. Optical flow is, however, pretty time-consuming to calculate, so I only got through the first 90 seconds or so of video before it was time for dinner.

Fun stuff, though…

The great gluten-free diet fad

seed-head-wheatI thought this BBC post by William Kremer presented a pretty balanced view about dietary gluten. Here’s a quick summary for people like me who knew nothing about this:

  • As a general rule, avoiding gluten is a bad idea because we get valuable vitamins and fibres from it that you would then have to supplement in some other way.
  • A little under 1% of people, however, suffer from coeliac disease which gives them serious gluten intolerance, and the increasing availability of gluten-free foods is very valuable for them.
  • There is a larger group of people who may have some gluten sensitivity, perhaps as high as 6%, and can benefit from reducing or avoiding it. This is hard to test for, and its existence is somewhat debated, but double-blinded trials with placebos suggest that it isn’t completely imaginary.
  • Nearly 30% of Americans, however, feel that they ought to try and avoid gluten in their diet. This is a recent trend.
  • If you replace gluten-containing foods – e.g. baked goods – with gluten-free alternatives, you will often be worse off because they tend to be more calorific. You can lose weight, however, by replacing them with fruit and vegetables.

Strike action

lightning

There seem to have been a few reports of people being struck by lightning recently – this recent tragedy in the Brecon Beacons being one example.

So what should you do if you find yourself at risk? My first thought would be to get close to something taller and more conductive than me. But this site suggests it’s a bad idea – being close to a strike can be almost as dangerous as being hit. They also recommend sitting on your rucksack, to insulate you from the ground, which I guess is fine as long as there hasn’t been any rain recently.

On a cheerier note, I saw some reports last week about a man who had been struck twice in his life, and survived both. This was pretty unusual in itself, but the focus of many of the articles seemed to be his name: Rod.

Photo: Kent Porter. Thanks to Jo for the link to the mountain safety site.

A Colossal Hit

One of the websites I most enjoy browsing, perhaps because it’s really rather different from most of my other reading, is Colossal.

Dedicated to ‘Art, Design, and Visual Culture’, it’s somewhere you can always find striking images. Here are some of my recent favourites – click on them to go to the relevant articles and find out what they’re all about…

rolling-1

leaf-9

bubble-1-600x828

pencil-5

tent-2

User interface design can save lives

Prof. Harold Thimbleby on how good design can dramatically improve safety.

Thanks to Simon for the link.

Western English

If you leave Cambridge and go south-west for about an hour and a half, you get to Heathrow airport. From there you can head westwards to a strange place where they speak a kind of English – quite a reasonable kind of English – but it’s a bit different, particularly in its spelling, from what most Englishmen would find familiar.

I’m referring, of course, to Oxford.

Now, I’m generally a big fan of the Oxford English Dictionary, but I was shocked – shocked, I tell you – to discover recently that they spell ‘organize’ with a ‘z’. And organization. And realize and realization. And so forth. I immediately assumed I was looking at a modern global edition which had sold out to the American market, but no, my elderly Shorter OED on the shelves at home has the same failing. It does offer the -ise variants as an option, but the primary spelling is with a ‘z’.

Now, I know that across the pond, those nice Americans have their own spellings, but surely no well-educated native Englishman in recent centuries would spell ‘organisation’ with a ‘z’. My father simply didn’t believe it until I showed him. Yet this is something on which the OED has apparently taken a line, to the extent that there’s a wikipedia page about Oxford Spelling for surprised people like me. The page admits:

Oxford spelling is not necessarily followed by the staff of the University of Oxford. In 2011, 2012 and 2013, the university website recommended the use of “ise” for its public-relations material.

The argument put forward in favour of Oxford spelling is that -ize corresponds more closely to the Greek -izo, which is the root of most -ize verbs. (Unlike, say the French/Latin origins of words like ‘surprise’.)

This may make academic sense, and indeed, many academic publishers have adopted it including, I’m embarrassed to say, Cambridge University Press. It seems to be favoured particularly for those publications with a more international audience. Even The Times used it for a while before reverting to the natural way of things.

So, lest anyone outside these shores be confused… yes, the OED is normally the gold standard for British English, and those Oxford chaps generally know what they’re talking about. I even agree with them about the comma. But this, surely, is a step too far in the direction of prescription over description.

The clever men at Oxford
Know all that there is to be knowed.
But they none of them know one half as much
As intelligent Mr. Toad!

Heat from the clouds

A few years back I wrote about how I thought home computing power and heating systems should be combined, to make good use of excess heat from CPUs in the winter, or to provide efficient cooling for them from building-scale aircon systems in the summer.

nerdalizeMy friend Ray sent me a link to this article about Nerdalize – a Dutch company who provide something that looks like a radiator, to heat your home, and is actually a server on which they sell computing capacity to others.

I’m not sure whether they can make this work at scale, but it’s an intriguing idea, especially in a country like the Netherlands where fibre-to-the-home is more readily available than here. It saves you building expensive data centres, but also makes for great reliability, I imagine, at least in the aggregate, since your overall network is not dependent on small numbers of power supplies, network connections or geographic locations.

Being responsive

I’m in the process of turning my previous, rather elderly, theme for this website into one that looks somewhat similar, but is now what is known in the jargon as ‘responsive’.

This means the layout will try to adjust in all sorts of terribly cunning ways to the size of your screen or window. In particular, it should make it a bit easier to peruse Status-Q on a mobile device. One should always have something sensational to read on the train.

Please bear with me if there are still some rough edges, though…

A quiet sea voyage

Pretty amazing footage of the French frigate Latouche-Treville tackling some high seas.

It’s easy to watch it, be impressed, and forget what the film crew must also have been going through! The footage was apparently shot for the film “Oceans”, released in 2009.

Following a Parisian trail

Yesterday my parents gave me something they had found in a local shop: a copy of Fodor’s guide to France, dating from 1958. It has some nice turns of phrase, ranging from this comment in the section on dining out:

Wine-labeling was established by law at the end of the 19th century and is one of the few laws that Frenchmen take very much to heart.

to this piece from the chapter on shopping:

haute-couture

Then I came across a throwaway line in a paragraph about post offices:

There is a special fast letter service within Paris by pneumatic tube, delivery guaranteed within three hours of mailing. Ask for a ‘pneu’ form, costing 100 francs, or use one sheet of ordinary airmail stationery and an airmail envelope.

This intrigued me. As a child I had seen pneumatic tube systems in banks and building societies, and even in the occasional large shop; they allowed excess cash to be moved safely from the tills to the back office, in the days before credit cards and the invention of the ‘cashback’ concept enabled your customers to take the excess cash away for you.

But I hadn’t realised that pneumatic systems operated on such a scale in quite a few cities. The Paris network was the largest, incorporating, at its peak, over 400km of tubes. It featured in Truffaut’s 1969 film Baisers Volés (Stolen Kisses):

It operated for more than a century until it finally closed down in 1984, as reported here by the New York Times. To give some historical context, that was also the year in which Apple introduced the Macintosh.

Prague’s pneumatic post system wasn’t as large as the one in Paris, but continued operating (just) into the 21st century. And didn’t it have some beautiful control panels?

Hlavní-panel-2

Molly Wright Steenson’s 5-minute Ignite talk is a good way to find out more.

Even though pneumatic tubes are now little used for the delivery of messages, they still exist in many locations for garbage collection – most famously on Roosevelt Island – and some companies, like Envac in Sweden are promoting them as the rubbish-collection model of the future. Our system in the UK does seem a bit primitive in comparison…

But, gosh! How did I arrive here from the haute-couture catwalks of Paris in the 50s?

I guess I just got sucked into it.

© Copyright Quentin Stafford-Fraser