Psychology is a very serious “thing”. Some unfortunate people spend most of their “energy” struggling with their own (unwanted. overwhelming) emotional states, like tension, /anxiety stress and so on.

We cannot change ourselves. but we can accept what we are and try to develop (Know Thyself, you know) and apply some hacks, just like that “Emotional Intelligence” meme. Acknowledging and accepting ourselves as we are is the first necessary (but not sufficient) step.

Again, for some people their struggle with their own mental states, mostly an unwanted tension, is a literal waste of “energy”, as if one is riding a leaky boar, which requires not just rowing but also constantly pouring the water out (yes, yes, life is but a dream).

Neuro-modulators

As a sysadmin (I do not even remember for how long) I used to deal with very short-term micro-tasks (issuing commands and analyzing the outout) and to almost immediately receive a dopamine “reward” via a tight feed-back loop.

Even if something does not work from the first try, I knew it is doable in principle (I always have some intuitive backtracking process of how it can be done by some trial-and-error, and know what to search for).

The Delayed Gratification (of going into an unknown)

With programming we usually going into an unknown, with very long trials, recurring failures, backtracks and long restarts after getting stuck, with delayed gratifications and late dopamine rewards far in the future, if at all.

The state here is of a constant stress and the key compound here is Cortisol, not Dopanine, which just rises and rises gradually during the day. This is (in principle) a fundamentally different mental and emotional (and neurochemical) “state”.

This is just a grind, similar to physical exercises – the changes will manifest themselves after years of doing regular drills (and regularity is the key, together with doing it just right).

Hacks from religious practices

This is exactly what we need - habitual, “meaningless” ritualized actions, which give consistent dopamine rewards for a sense of accomplishing something “important”.

Only our actions and rituals (yes, we need to have our own) has to be meaningful. and even rational (with dopamine, not cortisol spikes).

Basically we map our concrete actions to imaginary rewarding experiences.

Run the code often (to get a yay!)

This is a dopamine hack. The guys who have developed the very first commercial IDEs (Borland, Microsoft) were onto something.

Split your process into meaningful micro-iterations (tests and “check-expects” first) and run them often. This is not just “jerking off” with your code, but actually type-checking and testing it at the high-level of abstract interfaces.

This is closely related to the universal general principle of catching errors early.

Have a cheat-sheet of the “workflow”

  • write down a list of tasks and how to do them.
  • setup corresponding GNU Emacs packages
  • write an org file with key-bindings and commands (functions)

ABC

There are a very nice heuristic from the classic Cornell 3110 Ocaml course.

Always Be Compiled – always have your code in a compiled (without errors) state.

This means never leave it broken (an unfinished micro-iteration), and always compile it.

“All tests passed”

this is from Gregor Kiczales.

Have tests written before code using stubs and so-called wishful thinking (write only interfaces, return dummy values).

Write “check-expects” and run the tests on them.

Set up compiling (linting) and testing “tools” first

It “naturally follows” that the first things to set up for a “project” is automation of compilation and testing.

This is one of the “Lean” principles too – automate everything.

And this is what GNU Emacs is for.

org-roam

Setting up a personal knowledge base (within Emacs) is, perhaps, the most important thing.

Reading (a lot) without taking notes is a waste of time – I forgot what I read (and wrote!) is a week.

The key is to skip all the meaningless verbiage vomit (the actual content of most modern books) and to write down your own understanding so far. This is both how to learn and how to remember ( and how to recall it later).

Non-interrupting note taking (capturing)

The key principle is just mark some text and with an “automatic” habitual key-strokes put it into a node file (an inbox to be sorted out later).

This is important principle – do not “switch a context” into classification – where shall I put this text. what filename or section heading to give. Just select. copy and paste into a capture template.

No context-switch means no restart, no frustration, as if nothing ever happened

Everything in Emacs

This is a big topic, but the underlying fundamental principles are the same:

  • Less context-switching, less restarts, less tension – less is more.
  • Unification– the same keystrokes everywhere, same fonts, same colors, same appearance of structured (org) buffers.
  • Do not make me think – a UX design meme, but the principle is universal - I just “automatically” press some keys without pausing my thinking (just like an IRQ, you know).

The key point is that it is about psychology and emotion management, not just merely a choice of an editor (Emacs is not an editor, it is an intellectual environment).

Eventually, (after years of practice and configuring) everything becomes just right within the GNU Emacs.