Weekly Head Voices #151: We are pleased to meet you.

The Weekly Head Voices number 151 are trying to tell you something about the week from Monday July 30 to Sunday August 5.

Prepare yourself for a slightly stranger than usual post. I have: two short programming ideas, a bad review of an outdoor security passive infrared sensor, using Jupyter Notebook for (GPU-accelerated) numerical computation when you only have a browser, computing device input latency, and an utterly unexpected bit of backyard philosophy from the gut.

Two random micro side-project ideas

I would like to start with two hobby / maker ideas that popped up in my head this week. There’s a high probability I will not get around to them, but perhaps they help you to spawn a new set of hopefully more worthwhile ideas.

Chrome or Firefox plugin to convert Spotify playlists to Apple Music using the new MusicKit JS API

I seem to see many more Spotify playlists shared than Apple Music playlists. For example, at this moment I’m listening to the official Lowlands 2018 playlist.

This is not ideal, as I am an Apple Music subscriber, but not a Spotify subscriber.

It turns out there are paid apps to convert Spotify playlists to Apple music playlists.

However, it also turns out that Apple has a new thing (still in beta) called MusicKit JS.

I briefly dissected the Spotify Playlist website.

It would be straight-forward for a Chrome or Firefox plugin (WebExtension, so same code. I’ve done this before) to go through this playlist, search for each track using the MusicKit JS API, and then recreate the playlist in the user’s Apple Music account.

This solution would be much cleaner and simpler than the current app-based ones.

An Emacs package for displaying your RescueTime productivity metric right on the mode line

I scanned the RescueTime API documentation.

I was just about to start working on it, when I came up with the bright idea to name the package ironic.el, and so I stopped.

On that topic: The struggle for practically sustainable focus is real, and it never seems to stop.

The Head Voices REVIEW(tm) the Optex HX-80 outdoor passive infrared security detector: AVOID AT ALL COSTS

From the Optex HX-80 outdoor passive infrared security detector’s web-page we have the following:

The most important element in reliable outdoor detector is accuracy to distinguish a human from a small animal. … In addition, the HX-80N’s dual PIR’s and 20 detection zones utilize the ‘AND’ detection pattern technology … This technology helps to prevent false alarms caused by a pet or small animal.

Well, I had two of these installed by trained professionals.

(There are of course interesting discussions to be had about the necessity of devices such as the HX-80, or its mythical actually working counterpart, down here.)

I can confirm that they excel at one fairly specific function: Triggering the alarm, and thus automatically calling my security company, at the most ungodly hours of the night, whenever a certain small grey cat, looking exceptionally unlike a human, decides to take a stroll outside of our house.

Oh yes, the cat is not even ours, but belongs to our neighbour.

The installation and subsequent repeated fine-tuning of our Optex HX-80 have only had the result of me having to punch in an additional key-sequence every evening to bypass the two ‘AND’-detection-pattern-technology-equipped HX-80 devices.

You will understand that the only reasonable Head Voices REVIEW(tm) of the Optex HX-80 is:


Image result for just don't meme

Some more odd but perhaps useful bits

Google Colaboratory for Numerical Computation when all you have is a browser.

I’m late to the party (again), but Google Colab is really great if you need a Jupyter Notebook with some GPU power behind it.

It comes with tensorflow pre-installed (being Google and all), but getting the GPU-accelerated PyTorch 0.4.1 (latest version of the most amazing deep learning tool at the time of writing) going was a cinch.

To repeat this experiment, create new notebook with File | New Python 3 Notebook, then change Edit | Notebook Settings | Hardware accelerator to GPU.

You can then install the correct version of PyTorch by executing

!pip install http://download.pytorch.org/whl/cu80/torch-0.4.1-cp36-cp36m-linux_x86_64.whl

in a notebook cell.

What a time to be alive!

P.S. Remember, under normal (non-Colab) circumstances we keep our Notebooks as empty as possible. Prefer as much as possible of your code in Python modules. The notebooks are only there to act as glue, for visualization and sometimes for long-running jobs.

Dan Luu’s computer and mobile device input latency research

This most amazing work was recently brought to my attention by WHV reader Matthew Brecher in the comments under my 2017 Android vs iPhone performance post.

In it, Dan Luu measured the input latency of various devices, using the 240fps camera on his iPhone SE, or with the 1000 fps  Sony RX100 V camera if the device was too fast.

For the computers in his study, input latency was defined as the time between keypress and character appearing on the display. For the mobile devices, it was defined as the time between finger movement and display scrolling starting.

If you have any interest in this sort of technology and also in-depth technology journalism, the full article is definitely worth your time.

I wanted to mention two interesting points:

  1. The 1983 Apple 2e, with a CPU running at 1MHz, had significantly lower input latency (30ms between button press and character display) than any modern multi-GHz system. The comparison is of course not completely fair, but it’s still nice to see.
  2. Amongst the mobile devices, Apple dominates the fast / low latency end of the spectrum. Their devices, in terms of input lag, are ALL faster than all of the Android devices tested, including for example the 2017 Google Pixel 2XL.
    • Yes, this is me eating my hat, and some more of that yummy humble pie.
    • Android 9, code-name Pie, has just been (will soon be… err) released and has an amazing list of features. I still hope they manage they also manage to catch up with regards to some of the basics like input latency.

Yet another reason to eat more fibre

There are an estimated 100 trillion (10 to the power of 14; 100 with 12 zeroes) bacterial cells housed in each of our bodies.

Each adult human consists of on average only 37 trillion human cells, meaning there are on average almost 3 alien cells for every 1 of your own cells.

I find this a beautiful realisation: All aspects of our lives depend on this multitude of foreign visitors.

They help us digest our food, and, as it has been turning out more recently, they play a crucial role in our mood,  our behaviour and our thinking.

We (or at least the clever people) now talk about the microbiome-gut-brain axis, further underlining the importance that our bacterial visitors play in our lives.

Taking a few more steps back, thinking about the relationship between the 37 trillion human cells, and the 100 trillion visiting cells,  I ask the question:

Who am I really? Who exactly is thinking this?

I, or perhaps rather “we”, find this truly fascinating.

What I was initially planning to mention before going off on this tangent, was a recent paper accepted for publication in the Journal of Physiology, with the title Short-Chain Fatty Acids: Microbial Metabolites That Alleviate Stress-induced Brain-Gut Axis Alterations (click for PDF fulltext).

The Physiological Society press release is more digestibly (I had to) titled “Eat high fibre foods to reduce effects of stress on gut and behaviour“.

In short, fibre stimulates gut bacteria to produce short-chain fatty acids (SCFA), which, besides being the main source of nutrition for cells in this region of the body, also decrease levels of stress and anxiety, at the very least in mice.

The end

Thank you for sticking around friends!

I hope that you found something of value, even if not directly from this post.

I’ll see you next time! Until then, remember to eat your vegetables.


Weekly Head Voices #150: The Road not Taken.

Photo of a cotula lineariloba flower, taken by GOU#1, age 12.

This edition of the WHV covers the week from Monday, July 23 up to and including Sunday, July 29.

Running update

Strava says I’ve just passed the 300km threshold in my Luna Mono 2 sandals.

It also says I’ve done 27km in my Xero Genesis sandals, or as I have begun to call them, Xero Tolerance.

You make one mistake, and something will break. You do get to keep all the bloody pieces.

In any case, when I started on this barefoot-style / natural running adventure, I had subconsciously set myself the limit of 200km before evaluating the success of the experiment.

At 200km, the experiment was still unsuccessful (different parts of feet and ankles were taking turns complaining) so I moved the threshold to 300km, with the plan to move it to 400km if required.

I call this The Stubborn Scientific Method(tm): You keep running the experiment (harr harr) until it says what you want it to say.

To be fair, in this specific case an injury would have (and still can), stop the experiment. Most fortunately the muscles, bones and tendons in my feet, ankles and calves, although complaining quite audibly, have held up.

This past Sunday I did a long(ish) run where it felt for the first time like my feet and ankles had finally toughened up enough (and perhaps my form had also improved slightly) to just keep on propelling me forward quietly and efficiently.

Together with the brilliant sunny winter morning conditions, this conspired to reconfigure my face machine into a rather long-lasting grin.

I am carefully optimistic that I might be able to make this specific adventure a more permanent one, and that makes me really happy.

The Emacs Section


A friend from work sent me a ZIP file with research data.

I was super surprised that I could easily decompress the ZIP file using Emacs Dired (Dired is of course the file-manager built into Emacs, doh), but that there was no easy way to mark and extract specific files from the archive.

I found an SO answer with a piece of Emacs Lisp code that someone had put together and integrated it with my Emacs.

It worked, but it didn’t default to the opposite Dired file-list pane as all commander-style tools should do, and by default it re-created relative paths, which is the opposite of the default in most two-pane commanders I know.

As is the wont of Emacs users, I reshaped the code ever so slightly to work like I thought it should.

Shaping Emacs Lisp code has a pleasant fluid feeling to it. Code is data, code is configuration, data flows through code.

I’m telling you this story, because it was a nice little reminder of one of the reasons I like this software so much.

You can find my modified version of archive-extract-to-file.el as a github gist.

The Odd Bits of Interesting News Section

  • Differentiable Image Parameterizations, a beautiful machine learning article on Distill that surveys and showcases different techniques for generating beautiful images with deep learning. These networks sort of learn to see in order to solve specific tasks, but you can tickle them in different ways to get them to show you the insides of their visual circuitry, and it’s quite beautiful.
  • The Prophylactic Extraction of Third Molars: A Public Health Hazard is an article which was published all the way back in 2007. It makes the claim that at least two thirds of wisdom tooth extraction are unnecessary. One could say that their only function is to… extract your money. BA DUM TSSSSS! To that I would like to add: WHY DENTISTRY WHY? HAVE YOU NOT HURT US ENOUGH?!
  • A colleague at work emailed this TechCrunch post about a 3D printed neural network that diffracts light going through in order to do its trained inference work on incoming images. Although it’s a retro-futuro-mind-bending idea to do it with a whole neural network, and it smacks of hell-yeah-this-is-what-scifi-promised-me-that-AI-would-look-like, I could not help but recall a certain Very Flat Cat telling us about this sort of passive light-based computation almost 20 years ago.

The Poetry Section

GOU#1 had to select an English poem to recite for class.

From the depths of my memory bubbled up The Road not Taken by Robert Frost.

I had forgotten how much subtlety and recognisable human complexity this poem was able to pack into such a petite little frame. If you have the time, read the analysis linked above after spending some time with the poem itself.

Two roads diverged in a yellow wood,
And sorry I could not travel both
And be one traveler, long I stood
And looked down one as far as I could
To where it bent in the undergrowth;

Then took the other, as just as fair,
And having perhaps the better claim,
Because it was grassy and wanted wear;
Though as for that the passing there
Had worn them really about the same,

And both that morning equally lay
In leaves no step had trodden black.
Oh, I kept the first for another day!
Yet knowing how way leads on to way,
I doubted if I should ever come back.

I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I—
I took the one less traveled by,
And that has made all the difference.

Friends, no matter which paths you take this week, I hope that we may meet again.

Weekly Head Voices #149: I forgot to proof-read this.

Part of the Sunday morning trail. Although I really enjoy these, I’m at my happiest running down antelope on the savannah.  Antelope strictly-speaking not required, but those wide open plains on the other hand…

This, the one hundred and forty ninth edition of the Weekly Head Voices, covers the week from Monday July 16 to Sunday July 22 of the year 2018.

This week, we have apple watch running adventures, deep learning in production (finally), yet another focus tip and finally a youtube poetry reading.


The Apple Watch, Vitality and You

On Monday, I became the owner of a brand new Apple Watch 3, FOR FREE(ish).

I feel that two points are worth mentioning:

  1. Having one’s work macbook unlock automatically as one prepares to put one’s hands on the keyboard, with a sweet little unlock sound emitting from one’s watch, is much more fun than I had expected.
  2. One was looking forward to using third party running apps on the watch, such as iSmoothRun which does real-time reporting of cadence, which can be shown together with a number of other stats on a number of configurable screens a la Garmin . One has had to cancel these plans, because Vitality, the shadowy organisation responsible for the FOR FREE(ish) nature of the watch, only recognises runs submitted by the built-in Workouts app.
    • The September watchOS update will include runtime (haha) cadence, which is great. However, some technical system for the support of third party apps would have been even better. I’ll live.
    • Runs logged with the built-in Workouts app can be easily and automatically submitted to other platforms, such as Strava, where many of my running peeps hang out, and even to one’s own Dropbox in FIT format, with the HealthFit iOS app, a very reasonable once-off purchase.

DeepLearning Inside(tm)

On Friday, we shipped a new version of the most important work project I am currently involved in.

Again I feel that two points are worth mentioning:

  1. We now also have deep learning, albeit a humble example, out in actual production. I was starting to feel a little left out. Anonymous shout-out (because top secret) to the team members who made this happen!
  2. They say one should never deploy or ship on Friday. Because I come from the I-won’t-do-what-you-tell-me generation, I cut the final release on Friday evening after the traditional weekend-starter braai.
    • To be honest, this was only necessary because I had promised our client that we would release, and it was only possible because we have a fairly good test-suite, with end-to-end being most crucial in this specific scenario, and a checklist-style release procedure.


As part of my chaotic but ever-evolving constellation of systems for maintaining work focus, I have renamed the shorter focus blocks approach to the short-but-specially-defined-so-that-completion-is-possible-within-one-block focus blocks approach (SBSDSTCIPWOB-FBA).

This adds the incentive of a small but probable shot of dopamine at the end of the focus block, and sometimes even leads to its unwitting extension by the woefully undersized (not to mention super lazy) rider sometimes sitting atop my mental elephant.

It sometimes feels like I’m slowly reinventing GTD.

(This blog post is an emotional roller coaster ride for me. This is the first time I’m feeling something.)

I used to be a fan of GTD when I still believed that my function in life was to answer emails really quickly, and master multi-tasking.

Since then however, I’ve slowly had to come to the realisation that, at least in my case, the amount of email processed is more or less exactly inversely correlated to the actual value that I produce.

The impotence of proof-reading

The following poetry reading made various subsets of my neurons fire in extremely pleasant ways.

I hope that you experience similar effects. See you next time!

Weekly Head Voices #118: Accelerando.

Too much nerdery took place from Monday February 20 to Sunday March 5. Fortunately, be the end of that period, we found ourselves here:

The view from the shark lookout all the way to Hangklip.

bibtex references in orgmode

For a technical report, I thought it would be handy going from Emacs orgmode (where all my lab notes live in any case) to PDF via LaTeX.

This transformation is more or less built-in, but getting the whole machinery to work with citations from a local BibTeX export from my main Zotero database does not work out of the box.

I wrote a post on my other even-more-nerdy blog showing the extra steps needed to turn this into an easy-peasy 38-shortcut-key-combo affair.

Google GCE K80 CPUs available, cheap(ish)!

I’ve been using a cloud-hosted NVIDIA Tesla from Nimbix for my small-scale deep learning experiments with TensorFlow. This has also helped me to resist the temptation of buying an expensive new GPU for my workstation.

However, Google Compute Engine has finally shipped (in beta) their cloud-based GPU product. Using their pricing calculator, it turns out I can get a virtual machine with 8 CPU cores, 30G of RAM, 375GB of local SSD and a whole NVIDIA Tesla K80 GPU (12GB of memory) in their EU data centre for a paltry $1.32 / hour.

This is significantly less than half of what I paid Nimbix!

(That resistance is going to crumble, the question is just when. Having your stuff run locally and interactively for small experiments still beats the 150ms latency from this here tip of the African continent to the EU.)

nvpy leaves the nest :`(

My most successful open source project to date is probably nvpy, the cross-platform (Linux, macOS, Windows) Simplenote client. 600+ stars on github is not A-list, but it’s definitely also nothing to sneeze at.

nvpy stats right before the hand-over

Anyways, I wrote nvpy in 2012 when I was still a heavy Simplenote user and there was no good client for Linux.

In the meantime, Emacs had started taking over my note-taking life and so in October of 2014, I made the decision to start looking for a new maintainer for my open-source baby nvpy.

That attempt was not successful.

By the end of 2015 / early 2016 I had a bit of a Simplenote / nvpy revival, as I was using the official client on my phone, and hence nvpy on the desktop.

Emacs put a stop to that revival also by magically becoming available on my phone as well. I have to add that the Android Simplenote client also seems to have become quite sluggish.

I really was not using nvpy anymore, but I had to make plans for the users who did.

On Saturday March 4, I approached github user yuuki0xff, who had prepared a pretty impressive background-syncing PR for nvpy, about the possibility of becoming the new owner and maintainer of nvpy.

To my pleasant surprise, he was happy to do so!

It is a strange new world that we live in where you create a useful artifact from scratch, make it available for free to anyone that would like to use it, and continue working on improving that artifact for a few years, only to hand the whole thing over to someone else for caretaking.

The handing-over brought with it mixed feelings, but overall I am super happy that my little creation is now in capable and more active hands.

Navel Gaze

Fortunately, there’s a handy twitter account reminding us regularly how much of 2017 we have already put behind us (thanks G-J van Rooyen for the tip):

That slowly advancing progress bar seems to be very effective at getting me to take stock of the year so far.

Am I spending time on the right things? Am I spending just the right amount of effort on prioritising without this cogitation eating into the very resource it’s supposed to be optimising? Are my hobbies optimal?

I think the answer is: One deliberate step after the other is best.