Paulina Szwed

How neuroscience can help you as a software engineer - motivation

Many of us, software engineers, have experienced those days when nothing really sparks joy in coding, debugging, preparing spikes or refining tasks for the next sprints. Obviously, we would like to have as few of such days as possible and go on with our work effectively. A solution to this definitely is not tormenting our brains with guilt and forced labour. There are other ways, and I would like to invite you to explore them with me and learn a little about our nervous systems in the process. We’ll find out where the motivation comes from on a biological and psychological level. We’ll also take a look at the changes you can introduce into your day to take advantage of certain mechanisms working on a neural level and boost your motivation and productivity.

The neuroscience of motivation #

The key to maintaining energy to work throughout the day is simple – getting and staying motivated. Even though it seems like something not necessarily in our power, motivation can be, to an extent, consciously modulated once we know the biological and psychological mechanisms behind it.

The source #

On a neural level, the fuel of motivation is dopamine. Dopamine is a hormone (meaning it’s a messenger of the body travelling through the bloodstream) and a neurotransmitter (which indicates its ability to affect communication between neurons).

In general, high levels of dopamine cause high drive, motivation and willingness to live, do and experience. Low levels of dopamine cause the opposite state — a lack of will to do any effort (doomscrolling or examining the contents of the fridge is still in our reach). How much dopamine is currently in our system, how much dopamine there was a moment ago and how much we remember enjoying a particular state is for our brains a way to set our level of motivation.

The workspace #

In the context of motivation our main area of focus across the nervous system should be the mesocorticolimbic system, which is responsible for the reward mechanism.

Mesocorticolimbic system consists of dopaminergic and dopaminoceptive neurons — the former is a specialised kind of neurons that is capable of producing and emitting dopamine into our body; the latter is capable of detecting and reacting to the dopamine. The pathways of this system go through different areas of the brain — they extend from the ventral tegmental area (VTA) to the part of the brain responsible for memory (hippocampus), reward, pleasure and movement (nucleus accumbens) and reasoning (prefrontal cortex).

Dopamine pathways in the brain

The complexity of this structure might be a hint that there are a multiple implications of dopamine release, but also many different ways to interact with this area.

The process #

When we talk about managing dopamine levels in healthy individuals, we actually should consider two different things:

  • baseline level, which is how much dopamine circulates in the body and determines how much dopamine we are capable of having,
  • peak level, which tells us how much dopamine we have at the moment or as a result of a rapid change.

Baseline level and peak level are closely related to each other. Evolutionally we are prepared to go out and search for different resources, such as food, water or shelter, even though nowadays we might use it to gain slightly different things (like a morning coffee or a salary). The drive to do so is provided by dopamine – which is, as we already know, a hormonal fuel of motivation. This mechanism is pretty old and it can be observed widely across the animal kingdom.

When the resources are found we experience a dopamine release — that is an effect of the reward mechanism in our mesocorticolimbic pathway. Now, in order to make us go and search for the resources again, the dopamine level must drop, so that we feel the lack of those resources as unpleasurable and seek for them again.

The dopamine level drops lower than the baseline and the extent of the drop is proportional to the height of the peak. Why? The drop of the dopamine level is caused by releasing available dopamine from synaptic vesicles – small structures in the dopaminergic neurons. In time the vesicles get depleted of dopamine – we can only release the hormone that is already there, ready to be deployed. After the release there isn’t enough dopamine in the vesicles to keep the baseline level. It will go back to the baseline eventually, as the neurons produce more of it, but for a period of time it’s going to remain low.

Continuous peaks in dopamine level may eventually lead to drop of the baseline level. In that situation a person’s brain, seeking for another reward to elevate it, will try repeating previous dopamine-increasing behaviours. A cascade of peaks and drops with repeated behaviours is a mechanism for addiction. This is something that may happen over excessive usage of certain substances but also with social media. Incoming likes, comments and notifications or scrollable, neverending feed of videos — all of these generate peaks of dopamine. When we spend time on social media experiencing peak after peak we may start feeling less and less satisfaction but still feel the urge to scroll further — due to the mechanism I have just described. That would explain why social media addiction is such a great challenge for our society.

How to get and stay motivated #

After that long lecture on neurobiology, those who are still with me may be asking the question “are we there yet”? Yes, we are! That knowledge is going to let us dive into different strategies of managing our dopamine levels, hence modulating our motivation.

Are we there yet...? Asked Donkey from Shrek

Short-term increase #

There are multiple possibilities to invoke a peak of dopamine and give our bodies that immediate impulse lasting a few minutes or even seconds. We should be aware of them, both when we need those peaks and when we want to avoid them — and soon you’ll know why.

There is a significant number of substances that may increase the dopamine level above the baseline:

  • Chocolate might increase it up to 1,5 times, although it only lasts a few seconds.
  • Smoked nicotine or cocaine may cause a 2,5 times increase, amphetamine causes up to 10-fold increase (knowing that and how peak and baseline levels of dopamine work, explains the addictive effect those substances have).
  • Alcohol in low doses is also known to cause dopamine release.
  • Ingestion of herbs like saffron, rosemary or oregano may lead to elevation of dopamine levels.
  • Caffeine causes a rather modest increase of dopamine, but also increases sensitivity of some dopamine receptors as well as their number and density. This is worth noting, especially for coffee-fueled machines like programmers – a cup of coffee in the morning will make us more susceptible to dopamine changes throughout the day.

There are also several actions which we might take to induce a peak of dopamine like physical activity or thinking and talking about things we enjoy. The former is rather subjective and the height of the peak depends on whether the person enjoys the activity itself. For those who do, it may double the dopamine level.

The latter results from involvement of the prefrontal cortex in the mesocorticolimbic system. Do you remember the last time when you’ve been telling somebody about that new thing you’d recently learned? How passionate you’ve felt and how happy and excited you’ve been afterwards? The prefrontal cortex is responsible for assigning rational explanations and subjective experiences to things we engage with. Recalling those interactions might cause a dopamine release and make us happier and more motivated.

Long-term strategies #

As previously said, the peaks of the dopamine, especially one after the other, will cause the dopamine level to drop below the baseline. In order to maintain high levels of dopamine (hence high motivation) on a daily basis we should act long-term and affect the baseline level as much as possible. There are ways to do it.

Exposure to cold #

Research shows that when a human subject enters cold water (14°C) and stays there for up to an hour it leads to rapid increase in norepinephrine and epinephrine (i.e. adrenaline) and also an increase in dopamine. Dopamine was observed to continuously rise up to 250% of baseline level and it stayed there for a few hours. It also limited release of cortisol — the stress hormone.

An hour-long cold bath is too much for an average person, but the same effect (although on a smaller scale) can be acquired by more accessible measures. How about a quick cold shower before work to charge up on that dopamine? Or maybe joining a winter swimming community?

A man jumping into snow

Avoiding layers of dopamine-increasing factors #

Do you start working only with a big hot cup of coffee in your hand? Do you listen to loud music while programming? Or maybe do you treat yourself with a sweet drink after a workout? Are there a lot of such rituals? You might want to consider not having them on a daily basis.

Every one of these rituals is a dopamine-increasing factor. As you’ve already read, multiple peaks of dopamine one on top of the other might not be a great idea. Layering multiple dopamine-increasing factors on a regular basis might seriously affect our ability to release dopamine in general. Spiking the dopamine by multiple activities in a short period of time leads to lowering the baseline by depleting stored, ready-to-deploy dopamine. That may lead to lowering the baseline dopamine level, what will result in lack of motivation and feeling low in general.

So what should we do? Are those things bad for us? Well, not really. Sometimes these spikes of dopamine from listening to music or sweet treats are exactly what we need to get through the day. The key is to differentiate all these “extras” while we work. Listen to music while working — just not every time. Have that sweet drink — just not every day. Meet with friends for a workout session — but also have these individual sessions once in a while.

Some of us spend our time on meetings while trying to do our individual work at the same time. Some listen to podcasts while coding. We should keep in mind, though, that multitasking is another way of layering dopamine and doing that on a daily basis will have a negative effect on general motivation.

A man multitasking at work

Another factor we should keep in mind are distractions. Every email, every slack message, every push notification on your phone will cause a small peak of dopamine. That makes it yet another thing to eliminate if you want to avoid dopamine layering.

Focusing on intrinsic motivation #

When we look at the sources of motivation we can divide them in two groups — external sources, such as meeting expectations of other people, fame or financial compensation and intrinsic sources, like enjoyment during an activity or fulfilling a personal mission.

What do you like to do after work? Is it playing video games, playing music, baking, practising yoga or maybe watching lectures on mathematics on YouTube? (don’t judge me…) Whatever this would be, I bet no one needs to encourage you to do this — you have an intrinsic drive to go and do your thing. You could spend hours on it, and then you’ll feel happy and fulfilled. This is how intrinsic motivation works — no external reward is required for you to feel motivated. Wouldn’t it be great if you had that in your job?

Research shows that intrinsic motivation brings better results than extrinsic motivation. One could ask a question — what if we brought those two things together? Well, the results might surprise you. Researchers gave out to participants a rather enjoyable task like assembling the jigsaw puzzle or drawing and measured their motivation to do so. Then they introduced small rewards for finishing the puzzle. Curiously, the participants were no longer as motivated as at the beginning.

The conclusion is that when we add an extrinsic motivation to an existing intrinsic one, we observe an overall decrease in willingness to do the activity! This is what we call an undermining effect.

The effect comes from the reward being perceived as the ultimate goal of the activity. When the reward comes at the end of the activity, only then is dopamine release activated, whereas it could be active during the whole time if only we mindfully focused on the joyful part of the activity itself. Introducing the reward leads to perceiving the whole experience as less and less pleasurable over time.

How to avoid the undermining effect? It’s rather simple. Don’t layer other sources of dopamine, avoid dopamine peaks right before and right after the activity and be mindful about your intrinsic motivation. But what if getting it done becomes really hard? It is difficult to have intrinsic motivation at such times. A good tactic to try is telling ourselves that overcoming those difficulties is a kind of pleasure, so we can activate our prefrontal cortex as a part of the dopaminergic pathway and eventually get ourselves motivated.

Thinking positively, practising gratitude, meditation #

Remember that aspect of the mesocorticolimbic pathway where thinking about something enjoyable caused a dopamine release? There is more to it! By repeatedly having positive or negative interactions with something we can make a significant impact on its rewarding or non-rewarding properties. It effectively means that focusing on positive aspects of our surroundings and activities will eventually lead to an increase of dopamine releases from engaging with it.

Having said that, I would strongly encourage you to use different forms of appreciation or gratitude practice. Maybe try journaling a little at the end of the day? I dare you to think about 3 good things that happened to you at work every day and write it down.

Research also shows that engaging in meditational practices leads to activation of reward-related areas of the brain. Having a long-term habit of meditation and mindfulness will contribute to having sustained feelings of deep joy and peace, which is associated with higher dopamine levels.

Summary #

You now know how your dopamine mechanisms work and how to use your biological hardware to modulate your overall motivation. What you should remember is that the thing most important for your motivation is maintaining a high baseline dopamine level. Avoid dopamine peaks, differentiate stimuli when you work, use other tactics such as exposing yourself to cold water or meditation. Also, keep your focus mostly (preferably only) on your intrinsic motivation to avoid the undermining effect. Now, go conquer the world!

References #

  1. Lee W, Reeve J, Xue Y, Xiong J. Neural differences between intrinsic reasons for doing versus extrinsic reasons for doing: an fMRI study. Neurosci Res. 2012 May;73(1):68-72. doi: 10.1016/j.neures.2012.02.010. PMID: 23565014; PMCID: PMC3614004.
  2. Liu, C., Goel, P. & Kaeser, P.S. Spatial and temporal scales of dopamine transmission. Nat Rev Neurosci 22, 345–358 ( 2021). https://doi.org/10.1038/s41583-021-00455-7
  3. Šrámek, P., Šimečková, M., Janský, L. et al. Human physiological responses to immersion into water of different temperatures. Eur J Appl Physiol 81, 436–442 (2000). https://doi.org/10.1007/s004210050065
  4. Volkow, N., Wang, GJ., Logan, J. et al. Caffeine increases striatal dopamine D2/D3 receptor availability in the human brain. Transl Psychiatry 5, e549 (2015). https://doi.org/10.1038/tp.2015.46
  5. Neuroscience. 2nd edition. Purves D, Augustine GJ, Fitzpatrick D, et al., editors. Sunderland (MA): Sinauer Associates;
  6. Vani Pariyadath, Joshua L. Gowin, Elliot A. Stein, Chapter 8 - Resting state functional connectivity analysis for addiction medicine: From individual loci to complex networks, Editor(s): Hamed Ekhtiari, Martin P. Paulus, Progress in Brain Research, Elsevier, Volume 224, 2016
  7. Deci, E. L., Koestner, R., & Ryan, R. M. (1999). A meta-analytic review of experiments examining the effects of extrinsic rewards on intrinsic motivation. Psychological Bulletin, 125(6), 627–668. https://doi.org/10.1037/0033-2909.125.6.627
  8. Chen W. Neural circuits provide insights into reward and aversion. Front Neural Circuits. 2022 Oct 28;16:1002485. doi: 10.3389/fncir.2022.1002485. PMID: 36389177; PMCID: PMC9650032.
  9. Looby A, Zimmerman L, Livingston NR. Expectation for stimulant type modifies caffeine’s effects on mood and cognition among college students. Exp Clin Psychopharmacol. 2022 Oct;30(5):525-535. doi: 10.1037/pha0000448. Epub 2021 Mar 18. PMID: 33734725.
  10. Arias-Carrión, O., Stamelou, M., Murillo-Rodríguez, E. et al. Dopaminergic reward system: a short integrative review. Int Arch Med 3, 24 (2010) . https://doi.org/10.1186/1755-7682-3-24
  11. Esch, Tobias. “The neurobiology of meditation and mindfulness.” Meditation–neuroscientific approaches and philosophical implications. Springer, Cham, 2014. 153-173.
  12. Di Chiara G. Alcohol and dopamine. Alcohol Health Res World. 1997;21(2): 108-14. PMID: 15704345; PMCID: PMC6826820.
  13. Farahani MS, Bahramsoltani R, Farzaei MH, Abdollahi M, Rahimi R. Plant-derived natural medicines for the management of depression: an overview of mechanisms of action. Rev Neurosci. 2015;26(3):305-21. doi: 10.1515/revneuro-2014-0058. PMID: 25719303.
  14. Mechan AO, Fowler A, Seifert N, Rieger H, Wöhrle T, Etheve S, Wyss A, Schüler G, Colletto B, Kilpert C, Aston J, Elliott JM, Goralczyk R, Mohajeri MH. Monoamine reuptake inhibition and mood-enhancing potential of a specified oregano extract. Br J Nutr. 2011 Apr;105(8):1150-63. doi: 10.1017/S0007114510004940. Epub 2010 Dec 21. PMID: 21205415.
  15. Khazdair MR, Boskabady MH, Hosseini M, Rezaee R, M Tsatsakis A. The effects of Crocus sativus (saffron) and its constituents on nervous system: A review. Avicenna J Phytomed. 2015 Sep-Oct;5(5):376-91. PMID: 26468457; PMCID: PMC4599112.
  16. Marques A, Marconcin P, Werneck AO, Ferrari G, Gouveia ÉR, Kliegel M, Peralta M, Ihle A. Bidirectional Association between Physical Activity and Dopamine Across Adulthood-A Systematic Review. Brain Sci. 2021 Jun 23;11(7):829. doi: 10.3390/brainsci11070829. PMID: 34201523; PMCID: PMC8301978.
  17. R. Kotarski “Inaczej”, Altenberg, 2020
  18. A. Huberman, Controlling Your Dopamine For Motivation, Focus & Satisfaction | Huberman Lab Podcast #39, Youtube, https://www.youtube.com/watch?v=QmOF0crdyRU

Discussion