Programming, Fast and Slow

In 2012, Daniel Kahneman published “Thinking, Fast and Slow”. It’s one of those books that most Agile coaches and thinkers own, but very few have read. Because it’s not an easy read. It’s long, for a start. But it also goes into a lot of economics and psychology which, even for a popular science book, is hard. And it’s a book summarising a lifetime’s ground breaking, Nobel-prize-winning research. 

I read it over several months, and it was difficult. But I was already intrigued by these ideas. My brother lent me Julian Jaynes’ amazing “The Origin of Consciousness in the Breakdown of the Bicameral Mind” many years ago, and the idea that we function in a largely non-conscious way has been rattling around my head ever since. 

The central hypothesis of Thinking, Fast and Slow” is that our minds have distinct subsystems that work In very different ways. Our conscious mind is System 2. It can reason, plan, learn. But it is expensive. It uses up lots of energy, so our minds avoid using it. Instead, we use System 1, which uses heuristics, is fast, irrational and full of shortcuts. It’s a great first-response mechanism to a complex rapidly evolving world. But it’s rubbish at making good long-term decisions.

When I read the book, I’d already been Mob Programming for a few years, and I knew there was some sort of connection, but I couldn’t put it into words. It’s really hard to think about thinking. 

If you’re driving, and you’ve been doing it for years, it’s System 1 that does the driving. If you’re driving home from work, you can probably do it on autopilot. You’ll be home before you know it. And if someone pulls out in front of you, System 1 shouts out “What an idiot? What were they thinking!”

But, if you come to a shared use junction, where no-one has priority, and pedestrians are allowed to walk across whenever, System 2 kicks in. You’re forced to think, to negotiate, to be aware

So, back to software. When I code by myself, I can stick my headphones on and code for hours. I zone out, and get into flow. I’ve been coding for decades, and I can do it using System 1. But System 1 is lazy and sloppy and does things that are just “good enough”. 

But when we Mob, we are forced to verbalise our ideas. To discuss them. To analyse them. We don’t get to just hammer out code. We have to be deliberate. We have to pay attention. And if we don’t, then someone else in the mob does. 

When we code solo, and we come across some badly written code, our first reaction, our System 1 reaction, is often “which idiot wrote this??” That would be bad enough, but System 1 lives in the moment. It doesn’t consider end-users of our code, or people that will be reading and maintaining our code. 

Deliberate practices such as TDD can help with this. They help to create high quality, maintainable, readable software despite System 1. 

But when we Mob, we engage System 2. We can empathise with people who wrote the code. We have a copy of Norm Kerth’s Prime Directive up in our mob area:

"Regardless of what we discover, we understand and truly believe that everyone did the best job they could, given what they knew at the time, their skills and abilities, the resources available, and the situation at hand."

And we get to remind eachother if we forget. That interaction helps us to empathise. And we are also better-places to empathise with our end-users, and with the people who will have to read and understand our code. 


Mobbing encourages deliberate interaction and discussions about our code. This engages System 2. This in turn allows us to empathise more with the people who interact with our code and our product. 

We want our end-users to be able to use our products without thinking. Without having to engage their System 2. We want other developers to be able to read our code without having to think too hard. We want to reduce the cognitive load of the people who interact with our software. And the best way to do that is for us to activate our System 2 now, to write better software, and help others in the future. 

We empathise more when we are mobbing. We write better code when we are mobbing. We write empathetic code. 


Popular posts from this blog

Naming things and Cunningham’s Law

Teamwork and the Human Current podcast

The Dérive and mob programming