The human brain, habits & multithreading - an android developer's analogy
Ever found your self doing something out of habit without you ever noticing?
The (not so) humble android OS was designed to run on any device - from simple toasters to sophisticated devices having more computational capacity than the rocket that landed us on the moon. Part of this robustness is due to the multi threaded nature of Android.
The UI thread is the main thread charged with running the UI as well as other bits of instructions.
However if there's a complex time consuming instruction to be run, the dev can create a new thread to run that complex piece without freezing the main thread. This gives us a seamless user experience.
Today's human lifestyle is full of distractions. Its a mystery how we manage to get about doing anything at all. The human brain has a trick to handle this.
Human brains are excellent at remembering actions that result in a net positive result & the cues that caused that action to take place. In short - our brains are dopamine feedback loops. If the frequency of an action increases ie. if the brain is trained enough it strengthens pathways associated with the cue, the resulting action and its subsequent reward. This is how habits are formed
The next time this cue is recognized by the brain it will act on it without you specifically being aware of the cue and its action, without disturbing our current state. The ultimate aim of a habit is to make our lives easier and us more responsive by executing certain tasks in the background & helping us divert main resources towards the more important tasks at hand.
A few examples - subconsiously making the bed right after waking up. putting off the lights as we leave the room, biting nails in a nervous situation