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:

  • 100% NON-FUNCTIONING THROUGH INFERIOR DESIGN.
  • AVOID AT ALL COSTS.
  • DON’T TRUST THE MARKETING.
  • THE TRUTH IS OUT THERE.
  • JUST DON’T.

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 #144: Eternal learner.

Welcome back friends!

(Right after the nerd news, there’s running and backyard philosophy. You can start wherever you like.)

Nerd News

The Weekly Nerd News Network (WNNN) wanted to bring the following points under your attention:

  • Emacs 26.1, the first major release since September 2016, when 25.1 came out, happened on May 28. Although Emacs reached perfection (and sentience, some say) a few decades ago, this new version does include improvements such as native line numbering for the VIM refugees and buttery smooth scrolling on X11 (read the very entertaining story behind this).
  • PyTorch (my favourite deep learning tool by far) and Caffe are merging. This is amazing because while PyTorch is some of the most dynamic and flexible deep learning software you can pay with, Caffe runs on your telephone. You’ll be able to fine-tune your deep network on PyTorch, and then click a button (or type some obscure incantation, probably) to get that network in a highly efficient compiled form on any embedded device or scaled up to run on your cloud. Although apparently not possible, this really does feel like free lunch!

Reunion

In Weekly Non Nerd News (WNNN), an old friend came to visit all the way from Omaruru, an occasion which served as the happy excuse for a mini-reunion at my place.

It’s strange to think that some of the university stories we recounted are now more than 20 years ago.

In that time, humans go from birth to fully formed adult human beings with opinions, and relationships, and stories of their own.

Thank you Omaruru Friend for bringing us all back together again.

Running mouse

The flu and/or cold virus that managed to enter through the cracks left by my immune system being under pressure from above-mentioned celebrations caused a week-long period of man flu, a period that I was only able to conclude today with a lovely winter morning run.

As one does, I continued searching until I found evidence confirming my belief that running with some remaining flu symptoms would not be irresponsible.

What I found was even better than that!

A 2005 study titled Moderate exercise protects mice from death due to influenza virus, published in the journal Brain, Behaviour and Immunity, found that in mice that had just been infected with a real influenza (i.e. not man flu) virus, moderate exercise had an additional protective effect relative to no exercise or strenuous exercise mice. The PDF full-text can be found on the sci-hub website, or via their telegram bot (the bot is really convenient, you can find and read fulltexts on your phone!).

Thanks to the internet, and lab mice, I had confidence that I was probably not going to die due to my run.

Confirmation bias aside, or not, based on more reading it looks like moderate exercise is not the worst thing you can do during or after cold or flu. The secret is to keep it relaxed, and to keep a very close eye on your heart and your temperature.

Mastery

I finally finished reading the book Mastery by George Leonard, a recommendation by LS that I am grateful for.

It can get preachy at times, but the core message is really good, and especially timeous in this era of hyper distraction.

Below is Leonard’s message, sent at least once through the old washing machine that is my brain.

Learning is a lifelong process.

More specifically, the path to mastery of any worthwhile skill usually consists of short bursts of novelty exhilaration (you often start with one of these) followed by long and seemingly boring plateaux of never-ending practice with no kick.

No kick means that many learners decide to quit, and switch to something exciting, only to repeat their cycle of not-mastery there.

If you are able to make peace with the plateaux, and keep on trudging along, you are on the path to mastery.

In a decidedly Buddhist twist, being on the path to mastery means that you are in fact an eternal learner, and you will never become a master.

The author of the book is an Aikido sensei. I especially loved the story he told of the beginners and the senseis.

When beginners practise, they ask the sensei for a new move to practice every few minutes. They try to get through as many moves as possible during their 2 hour training session.

When senseis practise, they practise the same basic move over and over for many hours, losing themselves in the universe of that single apparently straight-forward form.

The Buddhist Twist

From the Wikipedia page on Buddhism:

The Four Truths express the basic orientation of Buddhism: we crave and cling to impermanent states and things, which is dukkha, “incapable of satisfying” and painful. This keeps us
caught in saṃsāra, the endless cycle of repeated rebirth, dukkha and dying again. But there is a way to liberation from this
endless cycle to the state of nirvana, namely following the Noble Eightfold Path.

… and then later:

…. and finally passing through the gate of wishlessness (apranihita) – realizing that nirvana is the state of not even wishing for nirvana.

I can work with this.

Readers, I wish you wishlessness!

Weekly Head Voices #137: Let me mine your metadata.

Winter is coming, somewhere on the R44 between Betty’s Bay and Gordon’s Bay.

Wisdom from the Twitters

Let me start this week’s edition with something that a friend forwarded, quite ironically, from the dark underbelly of the internet, also known as “twitter”:Daily activities to avoid: - Consuming endless (news) feeds - Discussion w/ anyone with a big ego - Thinking without pen & paper - Arguing on Twitter - Mindlessly saying yes to meetingsMost of these resonate with me, except for arguing on twitter.

This is not because I disagree, but rather because I sort of went cold-twitter-turkey about a year ago, a departure which has had only positive effects on my humanity, as well as on my trust in the goodness of humans.

I still sometimes slip and fall into arguments on other platforms,  where the same advice unfortunately holds.

#DeleteFacebook?

On the topic of online arguments, I would like to bring the next interesting conundrum to your astute attention.

There is at this moment quite some internet rage due to the details that have been revealed about the extent to which the company Cambridge Analytica managed to exfiltrate social network data from facebook, in order to perform extremely targeted advertising and hence psychological manipulation to get vulnerable users to vote for Trump, and to vote for Brexit leave.

Readers of this blog might remember that I already talked about this exact issue one year ago to the day. I even cited this early article in The Guardian mentioning Robert Mercer, Bannon, and Cambridge Analytica and their role in geo-political interference.

At this point, I hope you will allow me a quick two-pronged educational intermezzo:

  1. Do read my posts carefully, and you too can be all like “I knew that a year ago you silly muggles”.
  2. Probably more importantly, read The Guardian. (I would like to thank the brilliant Dr Ed Chadwick for introducing me to The Guardian so many years ago in Delft and/or Amsterdam, over either a pint of Irish stout (which he also introduced me to) and/or a Trappist.

Anyways, back to my rant.

So the internet is angry (years too late), and everyone and their mom is telling each other to #DeleteFacebook.

I too disapprove in the strongest terms of what Cambridge Analytica and its backers did (besides the immorality of the approach, conservative thinking is really primitive), and Facebook facilitated.

However, I also think that we find ourselves in a tricky baby-with-bathwater situation.

Let me ironically summarise the two main points from a comment I posted on Facebook:

  1. What happens when the clever / privacy-conscious people leave facebook? It becomes an even bigger echo chamber for the uneducated. Is it not our duty to come and fight with a vaccine denialist, or a conservative or someone who is in some other way unenlightened now and then? (instead of arguing, you could also choose a more socratic approach, or just be that persistently cool perfectly rational actor in any discussion)
  2. What replaces facebook as the admittedly flawed but largest virtual human gathering ever? Related to this: Facebook is the most accessible publication platform we have ever had. More people have a voice and can be heard than ever before. Do we really want to take that away?

Let me know in the comments what you think. I promise I’ll only mine a little bit of your metadata.

New arduino blog posts at vxlabs

My arduino – artwork journey continues. Over on vxlabs I have published a short post on the itead shield 3.3V jumper, and a much more interesting post showing a barebones solution (i.e. no additional software) to using the JetBrains CLion IDE for Arduino sketch programming.

I hope that these help future travellers on their quest.

WHV Film Club: Blade Runner 2049

The original Blade Runner was an important part of my upbringing.

This weekend I, up to this point 100% unspoilered, finally got around to watching all but the last 30 minutes of Blade Runner 2049, and I was utterly blown away.

It’s true what they say: You can take just about any scene from the movie, and look at it like you look at a painting. The scenes are thought- and emotion-provoking.

Without giving anything away, the story is an amazing example of how great science fiction is the perfect mechanism for making us think deeply about strange but extremely relevant human situations.

Tot gauw

Over the past few weeks, these blog posts have played a small but necessary role in more than one high quality human connection.

Each time this happens, the time I spend here feels like it has been rewarded 100 times over.

I thank you, and I look forward to the next time that we may meet.

Weekly Head Voices #133: Onder in my Whiskeyglas.

The legendary Koos Kombuis (aka André Letoit) performing with Schalk Joubert on bass and Vernon Swart on percussion in the Helderberg Nature reserve, eponymous mountain visible through the trees on the right. This was a surprisingly amazing end to the week.

What a week.

It was beautiful to see the whole team step up to the plate and engineer at about 110% throughput (software gets complicated quickly, and there’s always one more thing you need to get done before the deliverable is ready), all the while remaining calm and, most importantly, kind.

Pro-tip Special

I was of course the lucky winner of the manual-writing sub-project. I love writing code, but there’s also something quite satisfying about writing documentation for a technical product. Anyways, there are five tiny but hopefully useful lessons I extracted from this exercise which I would like to present here:

  1. I’ve lamented the sorry state of the Windows console before (in 2011 to be exact). In a surprise twist, the Windows console still sucks almost 7 years later. At least it’s reliable. Anyways, cmder is a great console replacement which makes some of the stupid go away, somewhat.
  2. The Windows 10 built-in screenshot facility … wait for it… sucks. When you’re writing documentation you need a tool that fits into your workflow. Keyboard shortcut – window or region – image ends up in a directory of your choice. Greenshot is an open source screenshotting tool that does this with aplomb.
  3. You need to show a CHM (Windows Help) file to the user of your wxPython application when they hit F1. How hard could it be? Well, you could spend a number of hours trying to come up with a wx-y cross-platform solution, or you could use that time for something else worth your while and just use the Python win32 package to call into the official Windows help API. (cross-platform does work, it’s just really ugly)
  4. Sphinx is a much better tool to write technical manuals than is Markdown and related tools. I briefly considered Markdown because I always have to look up reStructuredText syntax, but fortunately ran into enough other places warning against using Markdown for documentation. For the record, I prefer orgmode over all of these puny formats in most other cases, but the documentation story of Sphinx with reStructuredText is admittedly much better.
  5. Start writing the manual as early as possible. It was amazing to see how this helped me to see the software we are designing at a more integrated (user) level. This knowledge was useful in driving more valuable improvements. If you can’t explain the flow of some procedure in a manual, that’s a good sign the procedure might need some refinement.

Humble Book Bundle and Rust

I bought the Humble Bundle of (O’Reilly) Functional Programming Books for a super affordable $15. I was primarily interested in the Programming Rust book by Blandy and Orendorff, but the other titles on Scala, Clojure, Erlang, Elixir, Haskell, Javascript and general functional programming are welcome additions to my library. Speaking of which, I emailed O’Reilly to ask if the books in the bundle could be added to my member library, which they promptly did!

I have avoided Rust up to now due to natural hype suppression circuitry, and because I grew up with C++, but its zero-overhead memory safety and trustworthy concurrency story makes it hard to ignore any longer. Even although Andrei Alexandrescu once called Rust the language that skips leg day, it’s certainly interesting seeing the constructs the language designers have come up to build a really fast compiled language with the lowest number of foot-guns per line of code.

Anyways, when this blog gets published, you should still have about 22 hours to make use of the Humble Bundle deal if you too see something that you like.

Life is continuous practice

I wanted to conclude with something that I’ve been thinking about recently. It has to do with explicitly treating one’s life as continuous practice. As I’ve mentioned before on this blog and people much smarter than me have been pointing out since forever, goals are no good and (lasting) happiness is probably not attainable.

Discarding as many as possible of these sorts of fetters is liberating (you Buddhist), but can seem to leave holes in one’s  life narrative. However, treating your life as a super long practice session is an interesting perspective.

There is also no end point, and no real life goal.

The only point of the whole exercise (yes, I see what I did there) is to try to improve continuously. Every day, we try to become a little better at our jobs, or at running, or at being a good human, or a partner, or a parent.

Practice means that you have good days and bad days. It means that you sometimes look back and think that you were a better person then than you are now. Practice means that when you pick one activity, another will temporarily languish until you can make time for it again.

All of this is ok, because tomorrow you have a whole new day to try again.

Weekly Head Voices #131: Function over form.

Do you know what time it is?

It’s Sunday, which means it’s time for a new edition of the WHV!

GOU #2 has made what will probably be the most significant contribution to this week’s edition. I am happy that it’s in the form of an art piece, although I am slowly also growing quite excited at the prospect of one of my GOUs popping up here one day with an acerbic comment.

Our family through the eyes and hands of GOU#2 (age 7), also known as My Most Favourite Middle Child.

It was one of those really high intensity work weeks.

This is probably because a deadline is approaching at high speed. We are in good shape, but we wil have to work with an even slightly higher intensity in the coming week and a bit to deliver.

Water

Day Zero has been pushed out further to mid May, due to the generous contributions by farmers of the Groenland Water Association, and due to new calculations based on agricultural use tapering off slightly in the coming months.

This has had a very welcome positive effect on our stress level.

We continue with our household water saving efforts. On Friday, we were surprised by about 15mm of rain. Our various rain harvesting systems did an excellent job at further bolstering our emergency supplies.

No Fibre For You!

Last year in July, magical elves starting digging up my neighbourhood to install green trunking everywhere. As you all know, green trunking is for optic fibre. Anyways, “fast” forward 7 months, and the online fibre coverage map finally turned dark purple over my house. As you also all know, dark purple means my house can be hooked up to the giant net of laser conducting fibres encircling the whole earth.

Whilst the jocks never got any further than reminiscing monosyllabically about how awesome they were in high school 25 years ago, the nerds were busy wrapping our whole planet in a net of optic fibres to send exabytes of information everywhere at light speed.

On Saturday a gentleman from the telco was here to hook me up. I was understandably vibrating with excitement.

Unfortunately it turned out that this specific gentleman was sent too early.

He had come to hook my house up to the fibre which by then should already have been pulled into the building from the termination point on the street outside.

Anyways, he promised to arrange for the extending-fibre-from-street-into-house lady or gentleman to swing by, before he himself would come back again to wrap the whole business up.

I guess that when you work with things moving at the speed of light, time travelling faux pas are bound to happen.

What a tool

Speaking of nerds, I have finally found a multi-tool that is small enough to disappear into one of my pockets, yet enables me to make myself more useful at least once a day. After a long search (I’ve been walking around with a pen-sized screwdriver with 4 interchangeable bits in my pocket for the past time) I settled on the Gerber Dime.

It looks like this:

They say the best camera is the one you have with you. The same goes for tools.

My Leatherman Wave, recently replaced under the 25 year Leatherman guarantee with a Wave 2 because they didn’t have Wave parts anymore, is a brilliant tool, but it’s bulky and so it usually sits at the bottom of my back-pack, until I run into a problem which requires its steely persuasion.

In contrast, I can have the Gerber Dime out and pulling teeth, Ron Swanson-style, in a few seconds. The bottle opener is best in class, the blade is sharp, and the package opening blade makes short work of those irritating blister packs. I have not yet been able to test more extensively the pliers, the scissors, the screw-drivers and the tweezers, but the mere fact that this is the tool I always have with me means they will probably win the suburban leg of this contest.

Tool belts for humanity

One day, when I care even less about what strangers think, I am planning to start wearing a tool belt. Tool belts don’t have the best reputation, especially in sartorial circles, but they are amazing.

Along with hiking shoes and bulky multi-tools, they epitomise the philosophy that many engineers are born with, and a philosophy that could benefit the world at large:

Function over form.

To me this is an echo, or perhaps a specific case, of reason over emotion. Feels are certainly important, but if we are to advance as a society, rationality has to win.

Ok kids, I am about to push an unexpected side-project into production tonight. I wish you increased utility, and an exceptionally deliberate experience of life, at least until we see each other again!