Weekly Head Voices #143: The rider and the elephant.

Pretty autumn sunset. A few metres below, the ritual weekend-starting braai was picking up speed.

Welcome back kids!

Besides this post, which somehow turned out to be longer than I expected, my more nerdy alter ego also wrote a post titled Interactive programming with Fennel Lua Lisp, Emacs and Lisp Game Jam winner EXO_encounter 667.

#DeleteFacebook, part deux

In an unsurprising (to me) turn of events, the Cambridge Analytica scandal has not even caused a dent in Facebook usage.

#deletefacebook, also discussed in a previous edition of the WHV, never really happened.

To the contrary, it seems people even increased their usage, post-scandal. FB share price is back where it used to be, and as an interesting data point, Deutsche Bank reports that their FB-based advertising reach was unaffected by the removable of more than 500 million fake facebook accounts.

Should we deduce anything more from this than the usual 1. humans, even outraged ones, have really short memories and/or 2. most people don’t have the energy to resist, or the presence of mind to avoid, the deeply-seated social desires that are being exploited to varying degrees by the large social networks?

My personal strategy for a while now has been to make liberal use of the unfollow and the mute functions. It’s far from perfect, but with this it is possible to reduce drastically the stream of incoming information, and to make sure that what does come through has to do with friends that you have made the deliberate choice to connect with actively.

Shorter focus blocks work better

In my eternal and sometimes decidedly Sysiphean quest for more and better work focus, I recently started using Focus App (see Pro Tip #2 in WHV #126).

In short, when you activate the app’s focus mode, it kills off and then blocks anything that is remotely fun or even slightly distracting on your computer. This includes websites and applications.

In the beginning, I was enjoying longer (1 to 2 hour) focus blocks.

However, more recently I started noticing a certain recalcitrance in my focus-starting hand.

Especially late in the afternoons (prefrontal cortex GONE by then, remember?) the knowledge of that mega-block of mental exertion would result in highly undesirable procrastinatory behaviour. (Big words for “oh, I can probably fit in one more /r/emacs post!”)

Anyways, it turns out there’s another really good reason that pomodori are only 25 minutes long.

It’s much easier to start a 25 minute block of no-fun-focus, and then get stuck in the zone, than it is to start what your brain expects to be a multi-hour block of mental exertion.

Friend PK introduced me to the tiny rider trying to control the giant elephant as a metaphor for the conscious and unconscious mind (this is from the book The Happiness Hypothesis). The shorter focus block idea seems like it could be filed away under “tricks to control your stubborn elephant”.

The evolving soul of Emacs

I came across this really interesting piece by Richard Stallman about the origin of Emacs, one of my favourite and probably most-used technical artifacts. It’s the multi-tool of computer software.

But, along the way, I wrote a text editor, Emacs. The interesting idea about Emacs was that it had a programming language, and the user’s editing commands would be written in that interpreted programming language, so that you could load new commands into your editor while you were editing. You could edit the programs you were using and then go on editing with them. So, we had a system that was useful for things other than programming, and yet you could program it while you were using it. I don’t know if it was the first one of those, but it certainly was the first editor like that.

When an experienced user interacts with Emacs, they change it, and it changes them.

The opposite of instant gratification

On Friday I started on a slightly longer than usual run.

It usually takes a kilometre or two before all of my running subsystems come on line, and I find my rhythm.

Not this time.

The acclimatisation discomfort in my ankles and calves didn’t fade away as it usually does. My breathing and running cadence stubbornly refused to lock on to their usual correct settings.

My legs felt tired.

It really felt like I was not supposed to be running at all, but I pressed on because at that point there was not much else I could do.

At the turn-around point (the bridge at the entrance to Vergelegen, with beautiful trees all around) I decided to try out some youtube advice from the evening before and do a few deep squats to freshen up my legs.

I started running back on legs and calves and feet which suddenly felt like they had all been replaced with brand-new rested versions of their 2-minute-ago return-to-manufacturer selves.

The rest of the run was of the floating over the ground how-is-this-possible my-smile-might-break-my-head variety.

Super strange.

I don’t think the squats did it. That was just a sort of thought-process punctuation which somehow distracted the mind-elephant for long enough to get me running again.

Anyways, as I was floating home, I could not help but see the whole occurrence as a fairly physical but in this case fortunately quite compact reminder that some of the most worthwhile experiences simply require perseverance with initially no gratification in sight.

Life is a marathon

… so sleep well, eat as healthily as you can, exercise, and try not to stress too much.

We’re in this for the long haul.

Weekly Head Voices #138: Born to run.

I am currently in a place with no to extremely little internet. Just getting the photo above uploaded was an adventure.

I briefly debated breaking my current WHV posting streak due to exceptional circumstances, but decided against it, at least for now.

Anyways, I might have no internet, but the scenery here is phenomenal.

(It later turned out that just getting this blog post uploaded on Sunday evening was not going to happen.)

Sometimes focus falls and slips into Emacs

During the past week I had a fairly difficult technical puzzle to deal with. It’s one of those puzzles that can only be solved with multiple days of research and concerted focus.

It’s funny how my mind manages to sort of slip away when faced with these sorts of puzzles where the solution, if it even exists (this is probably the main reason for the continual slippage), seems to be weeks away, instead of a few hours or days.

It’s like a usually sharp(ish) knife which simply refuses to bite into the thing that I so desperately want to cut with it.

In my specific case, especially later in the afternoons when prefrontal cortex is long-gone, mindlessly drinking its beer while staring into space somewhere, or even later in the evenings when everyone else is also drinking beer while staring into space, I wake up to find myself working on some obscure Emacs hack.

This week, primary thought slippage resulted in:

  • Hooking up my emacs, via helm-for-files with mdfind (the command-line interface to spotlight) on macOS and the tracker file indexer on Linux. This means that with a simple press of the C-x c o keys, I can instantly open any file in Emacs which is already open somewhere, which I’ve recently worked on, whose filename faintly resembles what I’m typing, whose contents (or tags) faintly resembles what I’m typing, no matter where that file is hiding in the hundreds of gigabytes on my SSD.
  • My efforts getting the above working for Linux are now part of helm, via the wonderful system of github pull requests.
  • Setting up Emacs dired to do rsync-based network copying in the background, which culminated in a github contribution which will hopefully also find its way into the main repository soon. (I do most of my serious file management in Emacs dired. You should try it.)

The Running People

I finally bought Born to Run by Christopher McDougall.

In between travelling and other activities, I was not able put this book down.

As I was reading the final pages on Sunday morning, I had trouble keeping my eyes dry. I had connected with the story and all of its nested stories on so many levels.

One strand of the story makes the case that humans, or more specifically homo sapiens, had evolved to run its prey down on the savannah.

We are able to cool ourselves down during running thanks to being mostly hairless and sweaty, whereas an antelope is not able to pant while galloping, and has no choice but to stop.

So the trick is simple: We can run fast enough to keep a galloping antelope in sight. Eventually it will lose the battle, overheat and collapse.

This is what homo sapiens did for millions of years for food. Homo neanderthalensis, our intelligent and stronger competition who used to dominate during colder times, had no chance.

McDougall connects with a number of scientists and sports trainers to flesh out this part of the story. Below is an interesting (and related) video about Prof Daniel Liebermann and his work on the evolutionary biology and biomechanics of barefoot running:

(Being internet-deprived, I’m not currently able to find one of the cited Nature papers discussing other elements of our biology underlining our running heritage. Remind me in the comments so I can update this later.)

Another strand of the story is about the Tarahumara of Mexico, also
known as Rarámuri
, or The Running People, a legendary tribe of natural super athletes who are masters of avoiding other humans (due to past persecution and other shenanigans) and of running 30 miles in the mountains, in sandals.

Even more intriguing than their home-made sandals, is that they run throughout their healthy lives with joy and exuberance.

The final strand I want to mention here, is McDougall’s personal journey from injury-prone runner all the way to finally taking part in the very first edition of a gruelling 50 mile trail race (the centre-piece of the story I would argue), together with the world’s best ultra marathoners and the Taramuhara in the Copper Canyons of Mexico.

For a large part of this journey, he and a number of other key actors are propelled along by Caballo Blanco, the White Horse, a supernaturally gifted runner who lived off the land in the Copper Canyons, and one of the few foreigners who seemed to be completely accepted by the Taramuhara.

Caballo is the one who managed to bring together, for the first time, the Taramuhara and the best ultra-marathoners in the small town of Urque for this humanity-affirming 50 mile trail run. He did so from his stone hut in the middle of nowhere, from where he would have to run for 30 miles to the closest settlement that had a telephone line that he could use.

Often that line was down.

Caballo passed away in 2012, shortly after the first Copper Canyon race. Shortly after, the race was officially dubbed the Ultramaraton Caballo Blanco.

Right after I put the book down, I put on my shoes and went for a run
up the mountain-side and in the valley over here. On the balls of my feet as they landed right under me, really small steps, straight back, trying my best to float over the earth, just like the running people in the book.

I could not help but smile for most of the way.

 

Weekly Head Voices #132: Potato deadline.

Fragment of potato skin, taken with phone camera through GOU#2’s microscope at 100x.

We have a serious deadline coming up on Tuesday, so I’m going to make these few WHV minutes count.

BULLET LIST TO THE RESCUE!

  • Day zero has again been postponed, this time to June 4. We continue with our water saving efforts.
  • That unexpected side-project I mentioned in last week’s post did end up going live that very night. Armed with the Django Rest Framework and plenty of battle scars, it took about 17 hours from idea to fully deployed REST API, a large part of which was debugging the paper’s math and spreadsheets.
    • Django might be a slow runner relative to some of the other kids on the block (go with any of its web frameworks, nginx with openresty (lua right in your web server!), even apistar with uvicorn), but the completeness and maturity of Django and its ginormous ecosystem are hard to beat when it comes to development velocity.
  • There’s a whole blog on the nature of note-taking. I arrived there via interleave and org-noter, both emacs packages for keeping text (orgmode) notes synchronised with PDFs, both found via irreal, a great Emacs blog.
  • In the extra lessons I have with GOU#1, we studied electrical current from basic (atomic) principles. As I was getting all excited about the outer electrons being passed on from copper atom to copper atom (Khan Academy and I tag team these lessons), GOU#1 had to laugh at the goose flesh on my arms.
    • The Khan Academy lecture seemed to imply that Benjamin Franklin started us down the not-quite-correct path of conventional current (from positive to negative), whereas the electrons being passed on imply current flow from negative to positive, aka electron current. However, this physics StackOverflow answer more completely explains that current is defined as the flow of electric charge, with electron flow being one example, and hence both directions are correct.
  • To be honest, I became ever so slightly irritated with an episode of one of my favourite podcasts, CPPCast, as the guest said “like” so often that I had trouble following what he was actually like trying to say. This like led me to using Google’s machine-learning-based speech to text API one night to like transcribe the audio of the podcast to speech so that I could like count the number of like utterances. There were not as many as I thought, but still a whole lot. If you’re curious as to the stats, I wrote everything up in this nerdy vxlabs blog post.
    • On the topic of note-taking: Because I make lab notes of everything in my Emacs, including late night speech recognition experiments, publishing a blog post is a question of some copy pasting, and then telling Emacs to publish to the blog.
  • On Thursday, some dudes came to my house and, after somehow switching seamlessly from pick-axe to optic fibre splicer and back several times, left me with this (and more):
Two fibre strands into my house. They tell me one is for backup.
  • These are strange Gibson-esque times when there’s now permanently a laser transmitting all of these packets to you via the network of glass strands encircling the Earth, whilst many of us are still struggling to grasp the difference between fact and fiction.
    • “The future is already here — it’s just not very evenly distributed”, William Gibson, probably ’93.
  • We have a new president: President Cyril Ramaphosa! He was Mandela’s choice to become president of this country, but it was Thabo’s turn, and then things went pear-shaped with Zuma. Years later, the situation is quite dire, but so far there are many indications that Ramaphosa has the makings of a great leader (I have become convinced that we humans, all of us, need great leaders to advance as humanity; I hope to write a post about that some day). After Friday’s state of the nation (SONA) address by present Ramaphosa, I, along with many fellow South Africans, are hopeful for our future.

Ok peeps, have a wonderful week! I’ll see you NEXT TIME!

Weekly Head Voices #130: TTAGGG.

Lovely summer’s day. Not much rain.

Water

On the water front (I see what I did there): Day Zero, that is the day on which the whole of Cape Town’s municipal water will be cut off, has been brought further forward to to April 12. Citizens will be able to fetch drinking water every day from 200 collection points. Judging by how quickly shelves of bottled water are currently disappearing from the shops and by panicky facebook posts, people are stocking up in advance.

The immortality of lobsters

Continuing with our watery theme, this past week I learned the very surprising fact that lobsters are sort of biologically immortal. In short, lobsters produce more of the enzyme telomerase than humans and other animals, which rejuvenates their telomeres, which means that their cells can in theory keep on dividing forever.

The telomeres are the genetic bits (feeling quite punny today; nucleotides TTAGGG in vertebrates, apparently) protecting the ends of your chromosomes. Every time cells divide, the child cells have slightly shortened telomeres. At some point, the telomere becomes too short, and that line of cells can’t divide anymore.

This is a large part of how most animals finally die: Our cells can only divide so many times, and then the telomere ends, and then someone switches on the bright lights, and then the whole party is over.

However, the enzyme telomerase is able to repair telomeres, thus extending the lifetime of the organism.

Lobsters naturally produce so much telomerase, that their cells can keep on dividing forever. In practice, lobsters apparently only grow in size, strength and reproductive ability as they age.

Unfortunately, their party also eventually ends. As they grow, they have to molt their suddenly too small exoskeleton. As they get bigger, this process takes more and more energy, until the day comes that they have grown so large (12 kg in one instance) so that the attempted molting, due to disease, is a fatal process.

Intriguingly, a 2013 study showed that lifestyle changes such as diet, exercise, stress reduction (including meditation) and social support, boosted telomerase activity and significantly increased telomere length in human subjects.

Your brain (not) at work

On the recommendation of a colleague who is most versed in these things, I am currently reading the book “Your Brain at Work: Strategies for Overcoming Distraction, Regaining Focus, and Working Smarter All Day Long” by David Rock.

While the author clearly has not yet read any books on Coming Up With Shorter Book Titles, he has put together a compelling piece on the extreme limitations of the human prefrontal cortex. These are the bits that we use for important thoughts and for solving tricky technical puzzles.

I thought that I just naturally had the attention span of a budgie (which I continuously try my best to compensate for by the gnashing of teeth, will power, and various other tricks), but it turns out it’s a basic human limitation.

A pretty budgie which will probably distract you from the contents of this post. FOCUS!

If all of the neuroscientists he has interviewed can be believed, we are severely limited both in terms of the number of thoughts / ideas we can handle at any one time, and, to me far more frighteningly, in terms of the total time we have available for this sort of complex work.

The prefrontal cortex is relatively-speaking quite inefficient, and gets exhausted really quickly. Remember the last time you spent the evening trying to figure out how to get all of your children to their various activities during the week, and how unexpectedly difficult that was? (if no children, please replace this example with something more familiar to you :) Your prefrontal cortex was probably already exhausted by 15:00 in the afternoon (if not earlier), and you were in effect beating a dead neural horse.

Sometimes you wake up the next morning, and you solve that exact same puzzle in 3 minutes, at which point you might have already exhausted your cognition quota, and might as well stay at home for the rest of the day.

Because the capacity and bandwidth of the prefrontal cortex can’t (yet?) be significantly improved, the book recommends that one carefully monitors oneself, taking breaks when necessary, single-tasking, and practising any often-occurring tasks until they become automatic, at which point the much more efficient basal ganglia take over.

Apart from this, the prefrontal cortex works at its best when you are slightly stressed, but not too much, and when you are slightly happy (with novelty and dopamine), but not too much. Too stressed, and it freezes up like a deer in the headlights of a rapidly approaching car. Too happy, and it just hangs around enjoying the vibes, not really producing anything.

I still have to finish the book, but it has already motivated me to continue on my quest to automate and script as much of my life and work as possible. For example, for the daily goals list mentioned in pro-tip #1 of WHV #126 I have a keyboard shortcut in Emacs which creates the relevant section in the correct part of my journal, correctly timestamped, and pre-filled with one or two habits I am trying to form, ready to accept the rest of the goals for the day. I used to think examples like this were perhaps going a little too far, but I now keep my eyes open for any task or activity that can be partially or fully automated. (Some even refer to Emacs Orgmode as their exocortex.)

On the topic of lists, the book mentions prioritisation as one of the more cognitively taxing activities we can engage in, so it makes even more sense to take care of it first thing in the morning, and to do this as efficiently as possible.

More broadly speaking, I think having instant access to documented and executable conventions for most of one’s tasks and projects would help greatly to free up the precious little prefrontal quality time we are allotted.

Even more broadly speaking, it seems we need to practise how to listen more carefully to our brain so that we are able to guide it through the treacherous waters of exhaustion, stress and happiness.

The part where I wish you a good journey

Thank you very much for reading this post. I hope you have a week filled with learning, challenges surmounted and a solid dose of contentment.

See you next time!

Weekly Head Voices #123: A semblance of a cadence.

Yes, we ended up in the mountains again.

In the period from Monday June 12 to Sunday June 25 we were mostly trying to get through the winter, fighting off a virus or three (the kind that invades biological organisms you nerd) and generally nerding out.

One more of my org2blog pull requests was merged in: You can now configure the thumbnail sizes your blog will automatically show of your uploaded images. Getting my own itch scratches merged merged into open source projects never fails to makes me happy, even although in this case there can’t be more than 5 other people who will ever use this particular functionality.

Anyways.

ASP.NET Core SURPRISE!

For a work project I was encouraged to explore Microsoft’s brand new ASP.NET Core. While on the one hand I remain wary of Microsoft (IE6 anyone?), I am an absolute sucker for new technology on the other.

You may colour me impressed.

If I had to describe it in one sentence, I would have to describe ASP.NET Core as Django done in C#. You can develop and deploy this on Windows, Mac or Linux. You model and query your data using Entity Framework Core and LINQ for example, or Dapper if you prefer performance and don’t mind the SQL (I don’t), or both. You write controller classes and view templates using the Razor templating language.

C# 7.0 looks like it could be a high development velocity language. It has modern features such as lambdas with what looks like real closures (unlike C++ variable capturing), as well as the null coalescing operator (??) and the null conditional operator (?.), the latter of which looks superbly useful. Between Visual Studio on Windows and the Mac, or the new Intellij Rider IDE (all platforms) or Visual Studio Code (all platforms), the tooling is top notch.

Time will have to tell how it compares to Python with respect to development velocity, a competition that Python traditionally fares extremely well at.

Where ASP.NET Core wins hands down is in the memory usage department: By default you deploy using the Kestrel web server, which runs your C# code using multiple libuv (yeah, of lightning fast node.js event loop fame) event loops, all in threads.

With Django I usually deploy as many processes as I can behind uwsgi, itself behind nginx. The problem is that with Python’s garbage collector, these processes end up sharing very little memory, and so one has to take into account memory limits as well as CPU count on servers when considering concurrency.

The long and the short of this is that one will probably be able to process many more requests in parallel with ASP.NET Core than with Django. With uwsgi and Django I have experimented with gevent in uwsgi and monkey patching, but this does not work as well as it does in ASP.NET Core, which has been designed with this concurrency model in mind from the get go. My first memory usage and performance experiments have shown compelling results.

Hopefully more later!

A cadence of accountability

Lately my Deep Work habits have taken a bit of a hit. At first I could not understand how to address this, until I remembered mention of a cadence of accountability in The Book.

Taking a quick look at that post, I understood what I had forgotten to integrate with my habits. Besides just doing the deep work, it’s important to “keep a compelling scoreboard” and to “create a cadence of accountability”.

Although I was tracking my deep work time using the orgmode clocking commands (when I start “deep working” on anything, I make an orgmode heading for it in my journal and clock in; when I’m done I clock out; orgmode remembers all durations) I was not regularly reviewing my performance.

With orgmode’s org-clock-report command (C-c C-x C-r), I can easily create or update a little table, embedded in my monthly journal orgfile, with all of my deep work clocked time tallied by day. This “compelling scoreboard” gives me instant insight into my weekly and monthly performance, and gives me either a mental kick in the behind or pat on the shoulder, depending on how many deep work hours I’ve been able to squeeze in that day and the days before it.

The moment I started doing this at regular intervals, “creating a cadence of accountability” in other words, I was able to swat distractions out of the way and get my zone back.

This is an interesting similarity with GTD (which I don’t do so much anymore because focus is far more important to me than taking care of sometimes arbitrary and fragmentary tasks) in that GTD has the regular review as a core principle.

Us humans being so dependent on habits to make real progress in life leads me to the conclusion that this is a clever trick to acquire behaviour that is not habitual: Work on an auxiliary behaviour that is habitual, e.g. the regular review, that encourages / reinforces behaviour that is perhaps not habitual, e.g. taking care of randomly scheduled heterogeneous tasks (GTD) or fitting in randomly scheduled focus periods (Deep Work of the journalistic variant).

As an aside, cadence in this context is just a really elegant synonym for habit. I suggest we use it more, especially at cocktail parties.