Weekly Head Voices #164: It’s what future you would want.

Pre-work not-too-shabby running route.

Welcome back friends! This WHV looks back at the two weeks from Monday February 18 to Sunday March 3, 2019. I was planning to release the edition of the WHV on time, but my need for a break was greater.

Because I’ve given up on ever mastering the art of the bullet-list form of the weekly(ish) status update, I am going to double-down on the old-fashioned sectioned prose form that you see before you.

Also, this post has again evolved into a long ramble. (It’s now Saturday March 9, time to start working on the next edition. I’m curious what form it will take.)

GOU#1 is #2

It feels like through these posts you’ve pretty much seen GOU#1 grow up before your eyes, so I’ve given myself permission to mention this moment of parental pride, hopefully quite briefly though (I write this blog not only for you, but also for me in 20 years time!):

GOU #1 has been elected as deputy head girl of her 1600+ pupil primary school!

She was really mature, also before the time, about this possible outcome of taking the #2 position. She seems to have made up her mind before the time that this would in fact be, for her, the best configuration.

This thoughtfulness of hers might have made me even more proud than the achievement itself.

Dreams of clean solar electricity wafting ineffectually against the greasy gears of government.

Way back in December of last year I mentioned that we were working on getting the house upgraded with a photovoltaic solar power system.

Some of you have asked me via various communication pathways how it was going.

Thanks to legislation, or rather the lack of communication around this legislation, the amount of physical progress we have made so far is close to zero. Oh, just make that zero.

My shopping list now looks as follows:

  • Unchanged: 3.6kW GoodWe EM hybrid inverter: Although a larger inverter would have been preferable, uncertainty caused by above-mentioned lack of communication motivates me to play it safe with this unit which is in the 2017 column of the approved list.
  • Unchanged: 2 x PylonTech US3000b lithium ion batteries.
  • CHANGED: 16 x Canadian Solar CS3U 350Wp or 355Wp solar panels.

It used to be common knowledge that monocrystalline panel power output suffered less due to high temperature than that of the cheaper polycrystalline panels. This is quite relevant, because just sitting there on your roof the whole day, these things can get really hot!

Well, I finally went and looked up the temperature coefficient of these current generation Canadian Solar panels, namely the CS3U range, which is -0.37% Pmax / ℃. This is in fact slightly better than the -0.39% of the monocrystalline panels I had on my list.

I am currently on the lookout for what is going to be my fourth candidate solar installer, although at this stage I would be quite happy with a talented electrician who is not afraid of heights.

(My second installer had difficulty keeping up with all of their work (probably thanks to load-shedding and also to the substantial price increases expected from our embattled electricity monopoly) and my third installer has decided to focus on commercial installations.)

My big and stupid misstep into Google Drive.

Somewhere during the past two weeks, I lost, forever and ever, at least three evenings.

Tipped off by a colleague at work, encouraged by my family’s mobile photos investment in Google Photos, and further tempted by the significant price difference and the family storage sharing option, I convinced myself that it was time to migrate my little empire of useless files (dropbox reports that I currently have just over 500000 (five hundred thousand) of them) out of Dropbox and into Google Drive.

This is how it looked on paper, i.e. in my head and in my Emacs notes:

  • I have about 70GB of photos taken with various family cameras of kids growing up, vacations everywhere and so on. These photos are currently not easily accessible by said family. If they were on Google Drive, they could be automatically exposed to Google Photos, which my family is already using!
  • My 237G of Google Drive space, sufficient for everything, costs R39 / month (that’s about $2.75), whereas my Dropbox subscription costs $10 / month.
  • The cheap subscription of Drive already enables one to do content searches. E.g. I could find scans of documents instantly by typing OCR’d words that occur in the documents. If you want the same with Dropbox, you have to go Pro (not Plus), and pay double, that is $19.99 per month.
  • Drive has a built-in facility to backup folders outside of the main sync folder.
  • There’s a great tool called rclone with which nerds can sync files to Google Drive from the command-line!

Four lessons learned uploading 500k files to Google Drive

  1. Google has servers down here in South Africa: With larger files, the upload could easily max out my 50Mbit/s upload.
  2. However, in spite of allocating and configuring my own client_id, I could not upload faster than about 3 files per second. Based on various threads on the rclone forums, this is a known issue.
  3. Google Drive’s selective sync functionality does NOT (easily) allow you to maintain a local version of an excluded directory in the same way that Dropbox does. This is especially annoying for those already quite annoying node_modules folders.
  4. Google Drive and its API support identically named files and directories, located in the same parent directory.

How did the wheels fall off then?

I was alternating between the official Google Backup & Sync client and rclone sync. I did this to check if rclone with a private client_id would be able to upload faster (it couldn’t) and because rclone showed sync progress more clearly with an estimated time of completion (all of this turned out to be wildly incorrect and variable due to all of those small files).

My logic was that as long as the two tools were not running in parallel, sync logic and checksums should prevail right?!

Well, that turned out to be a very sad assumption…

rclone, which I still believe is a great tool for bulk uploads and downloads, should probably not be used for syncing in situations like this.

Unbeknownst to me, it had created hundreds of identically-named directories everywhere. (See lesson #4 above.)

At about halfway through this multi-day upload project, I switched back to the official Google tool, which finally, FINALLY managed to sync everything after about 5 days I would guess.

I was briefly quite happy with Google’s arrow-in-cloud you-are-fully-synced icon in the menubar.

However, because happiness is so inherently fleeting anyways, I decided that it was time for the next phase of the project: Add the first Linux workstation to the little sync family.

Google Drive does NOT have a native client for Linux, although they’ve promised this since the start, and so I decided to try Insync, which seems to be one of the best of the third party clients.

I pre-seeded the sync directory on said Linux machine using rsync and then started the insync client. This is a use case which was often enough mentioned on the forums as being supported.

Initially, everything seemed to be going swimmingly!

However, soon I saw whole directory hierarchies with thousands of files disappearing simultaneously from both my local disc and google drive.

STAAAAAAAAHP!!! JUST STAHP.

A second, stubborn attempt, after having recovered files and synced everything up with Google’s tool, yielded similarly frustrating results.

Granted, the duplicate folders on Google Drive are a far from ideal test case, but deleting directories like that on both client and server is not defensible.

Defeated, I retreated to the expensive, but safe, embrace of Dropbox.

More lessons learned:

  • The lack of an official Google Drive client on Linux is debilitating to my workflow.
  • Handle the third-party Insync client with extreme caution.
  • The sunk cost fallacy is a real danger in cases like these.
  • The hours I lost are probably worth at least a year or two of Dropbox.
  • Having reliable incremental backups outside of your cloud syncing service remains important.

On that last point: Juggling my 500k files between Dropbox, Google Drive, then going live on Google Drive with real work before jumping into the shady world of badly implemented sync clients made me realise (again) the importance of a separate set of incremental backups.

Before my macOS phase (which started on May 6, 2015 when my employer bought me my first MacBook Pro and I wrote in my diary: “Bought 13.3 retina MacBook Pro early 2015, 128 GB SSD. I am doomed.”) I used to maintain a dirvish backup.

(Dirvish is an amazing tool by the way.)

The truly stupid and frustrating adventure I write about here, did at least lead to some learning, and to me hooking up a Seagate 4TB external drive to my desk at work. Now when I connect my MacBook, Time Machine performs incremental backups the whole day long.

The next time I have one of these moments of irrationality again, I will at least have the possibility of returning my files to sanity as soon as I do.

Thinking of future you.

There was one more learning I wanted to share.

I have mentioned before on this blog the well-known productivity trick of writing down, during your morning planning, the two to three really important tasks for the day.

In the Sam Harris podcast where he interviews Derren Brown, they briefly mention a really interesting take or perspective on the tip above.

When writing those tasks down, try to predict the two to three tasks the completion of which will satisfy future you the most at the end of the day.

It sounds like a small tweak, but this is a great way to encourage deeper (almost meta-)consideration of tasks that will really matter.

Additionally and more straight-forward than that, with this exercise you increase the chances that you end the day with that great feeling of closure that comes with getting important stuff done.

Weekly Head Voices #160: Write stuff down.

In the foreground, the mortar and pestle I used to mash together garlic, ginger, a serenade chilli, green cardamom pods, a whole cinnamon quill, one bay leaf, some curry powder for even more oomf, turmeric, coriander, salt and a few cloves. This paste ended up in that blurry red cast iron pot on the coals to result, a few hours later, in a delectable chicken curry potjie.

Welcome to the first WHV of the year 2019 folks!

In what is hopefully just a minor incident and not a portent of calamitous events to come, we have already skipped the first two weeks of the year, which means this WHV looks back at the three weeks from Monday January 7 to Saturday January 26.

I guess this would not be the WHV if we did not start off with some sort of awkwardness or miscellaneous embarrassment, so: CHECK!

Because you are probably thirsty for your WHV now, I tried to write you a long and rambly edition, with pictures! (Because it’s so long and rambly, and because markdown, I have liberally sprinkled with headings and sub-headings, so that those of you with lives outside of blog reading can hop, skip and jump through like the professionals you are.)

The future is here: Long-form blog posts on the iPad.

This also would not be the WHV if we did not have some little digital trick to reveal: Today’s attempt is that this post is being written, for the largest part, on a 2018 iPad (the cheapest one) with an old (also very cheap) bluetooth keyboard.

Because I really don’t like the new block-based WordPress 5.0 editor, named in an entirely non-hubristic fashion “Gutenberg”, but it does fortunately support importing markdown formatted blog posts (just make sure you don’t hard-wrap anything), and because I like trying new things, I am typing this on the iPad using the iOS version of Textastic.

A few hours ago, it looked like this:

In contrast to the direct orgmode to wordpress Emacs workflow I normally use, this workflow enables me to copy and paste sections of markdown text into WordPress. Each pasted section is automatically imported as WordPress blocks, based on the markdown structure.

This means I can position and edit images using the WordPress interface, but author the text using Markdown. With org2blog the whole post, including images, has to go through life as an orgmode file, which is brilliant for my more technical posts, but not so much for prose-heavy blog posts such as this one.

BTW 1: Why I don’t (yet) like the new WordPress editor.

The old WordPress editor enabled me to focus on the content and just write.

The new Gutenberg editor now wants me to create a bunch of blocks, e.g. paragraph, image, paragraph, bullet list, etc., and then work with those blocks.

That’s really great if you’re building a site, but not so much when you would just like to get down and write that blog post.

Although this is now the standard editor in WordPress, there are still bugs, such as the fact that my cursor keeps on jumping to the start of the block while I’m typing, which is not irritating at all, and the not unimportant observation that none of the mobile apps support Gutenberg yet.

WordPress-using readers, what do you think?

(P.S. Another just-discovered issue: In Gutenberg, your biggest heading is H2. H1 is not available in the UI normally. When pasting in markdown, H1s do display, but do not show in the type-UI as anything. Here is a confusing Gutenberg bug report.)

BTW 2: Why Textastic? (AKA At least it will syntax highlight your Orgmode.)

The main reason I found and purchased Textastic, was that I ran into Jez Cope’s github repo with a TextMate Bundle (that’s an editor configuration) that was made for Textastic to support editing Emacs orgmode files.

As is the age-old open source way, there were a few small bugs which I fixed in my fork, which you should definitely get if you are in the same I-want-to-edit-Orgmode-on-my-iOS boat as I am. It’s not a very large boat, but it’s super fun!

(There is no Emacs on iOS. This is in my view the greatest downside of iOS. It turns out that Apple generally does not allow apps with embedded interpreters on the app store. However, I am still trying to find out why there are no iOS-capable Emacs source code forks available.)

BTW 3: The iPad with keyboard is a shockingly good laptop replacement.

I recently recommended to a privacy-conscious reader who was searching for an affordable Linux-running laptop in South Africa, that she instead consider buying an iPad with bluetooth keyboard.

Down here a brand new 2018 iPad costs R5999. A cheap keyboard cover (e.g. Body Glove) can be had for about R860.

If you compare this to any new laptop of R6900 (about EUR 444) which will probably be sold with Windows included, you get a computing device with a fantastic quality multi-touch screen, great battery life, best-in-class security, almost no maintenance, and a fantastic app ecosystem. To seal the deal, the iPad’s resale value is proportionally probably also much better than that entry-level laptop.

After I sent that email, I started with this iPad + cheap bluetooth keyboard experiment to try it for myself. I have to say that the experience has been way better than I expected.

For a large subset of laptop users, and for a large subset of workflows and tasks, this is a really great solution.

Please don’t worry (too much) yet, I am not planning one of those “I switched to an iPad as my main computing device” blog posts. I would not be able to survive without my development tools, and I would especially not be able to survive without my Emacs.

PV Solar installation progress

As I excitedly announced in WHV #159 (slightly more than a month ago), we had decided that it was time to get a photovoltaic solar power system installed at the house.

I found a local installer with the required PVGreenCard accreditation and started the consultation process.

Unfortunately, the installer did not seem to be prepared for a customer that would not stop asking questions. The customer even went so far as to pose questions that challenged the installer’s brand loyalty!

I really do understand that I’m probably not the easiest end-user, but I don’t think that an expert’s brand loyalty should get in the way of reason, and far more importantly in the way of basic physics.

To make a long story short, I ended up getting fired by the installer.

This was probably for the better: He can now continue doing well-practised installs for other clients who don’t ask (so many) questions, and I suddenly had the opportunity to find a new, more engineer-friendly installer, and to continue learning.

Following are two noteworthy learnings:

Learning 1: You should almost always try to oversize the photovoltaic array

If the equipment states for example 4600kVA, then you are usually quite safe installing from 25% up to 30% more kWp of solar panels.

Oversizing will mean that on very sunny days you’ll get peaks higher than the maximum rated PV, which can be handled for short periods by the solar equipment, but more importantly, you’ll be able to generate more electricity when there is less sun, which is most of the time.

In other words, you increase the area under the curve of kW generated per hour.

By the way, I emailed GoodWe (they make the hybrid inverters I have my eye on) who confirmed that their EM range supports 27.8% oversizing. The ES range advertise 30% PV oversizing on the box.

It is of course an interesting question what exactly is meant by oversizing. Do they support pumping 30% more power into the inverter for 5 minutes, or for 2 hours?

Learning 2: powerforum.co.za is a great source of information.

This forum has a surprisingly high signal to noise ratio.

There are a number of experts hanging around, including one of Victron’s super helpful and knowledgeable R&D engineers, and the archive posts are invaluable as you try to navigate the quagmire of often conflicting information.

Avocado baby progress: Very much touch and go.

The baby avocado tree, in spite of being being watered almost every day (thank you rainwater harvest!) does not seem to be doing too well.

Because the summer sun down here can be quite vicious, the tree has its own little pink umbrella.

The current plan is to feed it more compost, and, if that fails, to try to transplant it out of the big, wild garden and into a pot with softer, kinder earth.

How to explain complicated topics

The international and yearly Machine Learning Summer School took place in Stellenbosch this year, from Monday, January 7 to Friday, January 18.

As you can see from the programme, there were a bunch of heavy hitting speakers present both physically and virtually, including the super resourceful (failed super resolution pun, su(p)e(r) me) Dr Stefan van der Walt, who gave a talk on good scientific software.

Anyways, because I am currently in a more commercial configuration, I could not justify taking two weeks out, and instead opted for a day visit at the start of the congress.

It is a testament to the current prominence of the field that the list of international sponsors included Microsoft, Apple, SAP, Uber and Amazon.

It was gratifying to experience a sampling of such a well-organized international gathering here in my neck of the woods.

On the first day, we had a high throughput introduction to causality, probabilistic thinking, and variational inference. All the presenters were clearly good speakers, but they weren’t all equally experienced in teaching such complex material.

(At one point one of the statisticians I was chatting to in break admitted having difficulty keeping up with the math. I did not feel that stupid anymore.)

“What is the difference between being a good speaker and an experienced teacher?”, you might now ask.

Great question, I would then say, grateful for the opportunity to explain.

What I was missing in the one specific case I do not want to be too specific about, was that the presenter did a great job of talking about each of a long list of concepts relevant to his topic, but somehow forgot that one of the most important parts of teaching is communicating the conceptual framework into which all of those concepts fit.

Conceptual frameworks are also one of those multi-scalar things: Each group of factoids can be gratifyingly embedded into a slightly higher level component, groups of which can be slotted into the overarching “big idea”, or another level of compnonent. (It’s turtles all the way down.)

As great lecturers talk, they keep on bringing their narrative back up to the higher-level embedding construct.

It looks something like this:

Yes, I did make this especially for this post, especially for you. No, I am not sure exactly why.

By repeatedly diving deeper into the details, and then following the conceptual link back up to the higher-level constructs and especially your big idea, your listeners will start to see the beautiful fractal of understanding that you are guiding them through.

What will I be working on this year?

At this moment, 2019 is shaping up to be pretty exciting work-wise.

We just heard that we will be able to continue for some months more working on the X-Ray based surgical planning project we worked on last year.

Partly thanks to the great deep learning work of two summer interns (note: Southern Hemisphere means summer interns over December and January, which might be weird if you’re from the Northern Hemisphere) we are in great shape for all of the deep neural network-based image understanding plans we need to execute on.

This year I will also be spending more time on TeleSensi, our FDA-certified tele-auscultation product. This is less rocket-sciencey than the surgical planning project, but super interesting to work on, as it has many more users on the open market.

(That being said, we do have plans to increase the level of rocket science significantly. I am not called the science officer for nothing… (well, that and also the fact that I got to choose my own title, and so I chose the same as Spock on the USS Enterprise).)

Do you write stuff down?

You might remember from WHV #155 my trick of starting the day with a checklist.

A part of that checklist is a checklist of habits which I try to form and maintain, called The HabitFormer(tm). Every item that I sufficiently address gets a super satisfying little [X] mark, which feels a whole lot better than the sadly empty [ ] construct.

Here is the current list:

  • did you write stuff down?
  • are you satisfied with number of pomodori?
  • 7.5 hrs sleep last night
  • meditate <– (WHV hidden pro-tip: Get the Waking Up app by Sam Harris. Thanks LM for the fantastic recommendation.)
  • stand at desk
  • do valuable things
  • fruit & veg
  • reading
  • thinking
  • running or other exercise

Ironically enough, the first item is brand new on the list.

I somehow forgot my habit of writing, during the day, a little done list / random thoughts lists. After bringing this habit back I noticed what difference it made.

At regular intervals during the day, I will spend a minute or three writing down what I had completed, or what I was thinking. This moment of introspection would either result in a pleasant bit of satisfaction with some small task taken care of, or, more often, it would reel me back in from a spot of less than deliberate action and enable me to bring back my attention to the point of focus.

I’m filing this under “101 tricks to get your rider back on your elephant“.

Alright friends, thank you very much for joining me on this part of my journey. I am looking forward to our next interaction!

Weekly Head Voices #159: Extreme.

The view from Waterkloof Restaurant’s balcony, on a fairly perfect evening.

In theory, this edition should cover the period of time from Monday November 19 to today, Wednesday December 19, 2018.

I am very late with this post, because down here we were first busy winding down the year with all of the completion-madness that that entails, and then the vacation started starting.

It hasn’t yet stopped being busy starting.

We are now entering what the Dutch call komkommertijd, and, as I’ve just learned, the Germans Sauregurkenzeit, referring to the period when everyone has left and there’s not really anything news-worthy happening.

Extreme dining

To celebrate the occasion of the official partnership between my partner and me adding another year to its growing collection, and due to my partner’s impeccable timing and ingenuity, we spent an amazing evening at what is currently South Africa’s best restaurant, at least according to the 2018 Eat Out Mercedes-Benz Restaurant Awards.

I would like to share three observations:

  1. The Waterkloof experience is a superbly balanced combination of location (see the photo above), architecture and interior design, art and ambience, all acting as context for the almost other-worldly culinary adventure, itself consisting of pairings of wine and perfect little dishes, the latter again artfully manipulating appearance and taste, space and time.
  2. South Africa is a country of extremes. Just the previous night, close family had been the victims in a violent but fortunately non-fatal home invasion.
  3. If you ever manage to find yourself at Waterkloof, take this advice to heart: The small dégustation menu with wine pairing is most probably more than enough. (We selected the normal. By what felt like the 15th course, we were dealing with the dilemma of having to abstain from eye-wateringly beautiful culinary creations.)

Extreme Solar

For many good reasons, we are currently seriously evaluating upgrading the house with a photovoltaic solar power system.

It turns out, as I should have expected, that there’s a whole universe of new toys and gadgets to evaluate.

We are currently looking at the following main components:

  • 2 x PylonTech US3000B LithiumIon batteries for a total of about 7 kWh of stored electricity.
  • GoodWe GW3648-EM Hybrid inverter: This coordinates everything between the PV Solar panels, the grid and the batteries. When the sun is shining, it charges the batteries, and powers as much as possible of the house, only using the grid when there’s no other option. During the evening, it powers the house using the batteries, again only using the grid when absolutely required. Due to strict rules down here in Cape Town, we are limited to inverters with a maximum output of 3.6 kW, even when no feed-in (to the grid) is planned.
  • The PV Solar Panels: I am still considering options here. I would prefer monocrystalline, and as close as possible to the 4.6 kWp maximum supported by the GoodWe inverter to maximise the amount of sun in our power diet.

As a first step, today we had a number of intelligent geyser controllers installed. These devices enable me to keep the geysers (we heat all of our water electrically down here…) off for most of the day, only switching them on an hour or two before hot water is usually required.

They look like this:

GeyserWise TSE geyser controller. I should have done this ages ago. Who came up with the idea that a water geyser needs to maintain its high temperature 24/7?

The rest of this exercise will be considerably more expensive, but  am really looking forward to being able to harvest most of our electricity from the lovely African sun!

I have one final bit of nerd-news, and it comes in the form of a…

WHV pro-tip #23972847376: If you are doing data science(tm), or machine learning, or visualization, or any other dataset-oriented work, I can highly recommend DVC, or DataVersionControl. We have started using this on one of our projects to manage different collections of DICOM images, and it works incredibly well.

Extreme health

In conclusion, I would like to mention a recent and very impressive study by the Cleveland Clinic about the correlation between cardiorespiratory fitness and all-cause mortality.

I’ll start with this quote:

In this cohort study of 122 007 consecutive patients undergoing exercise treadmill testing, cardiorespiratory fitness was inversely associated with all-cause mortality without an observed upper limit of benefit.

Let’s “unpack” that, as they say.

The researchers spent about 23 years measuring the cardiorespiratory fitness of just over 122 thousand subjects as they were running on a treadmill.

Measuring that many people gives your conclusions quite some statistical power. Also, the treadmill doesn’t lie, as people will often do, inadvertently or not, when self-reporting their fitness level.

What’s also interesting to me is that they didn’t observe any upper limit to the positive effect of fitness. Every additional amount of cardiorespiratory fitness, up to crazy levels, correlated with longer life.

The upshot of all of this is that there’s really no excuse. That one most important thing we can do to live long and prosper is to exercise.

It’s what Spock would have wanted.

Running on a dirt road in Betty’s Bay. I love running on dirt roads, although on this particular morning I was already tired before I started. The tiredness unfortunately did not decrease. I think there might still have been some virus involved, or, more probably, just standard bad vacation habits involving craft beer in the evening.