Navigate back to the homepage

Unlocking Wisdom

Ishan Sharma
October 1st, 2023 · 5 min read

Recently, Hari lent me this book, “The Great Mental Models: General Thinking Concepts”. I’ve heard about Farnam Street blog posts before, but never really got the time to deeply read through any of their posts. Little did I know that this book would be the spark that got me into mental models : )

Mental Models | @ishandeveloper | Ishan Sharma

In this post, I want to share some of my favorite mental models from Farnam Street that I’ve read so far and what I’ve learned from them, in no particular order : )

Firstly

What are mental models?

Mental models are like our personal toolbox for better thinking. They’re these neat mental shortcuts that help us make sense of the world and make decisions. Think of them as our thinking buddies..

What’s fascinating is that people in different professions, whether they’re doctors, physicists, software engineers, or artists, have unique ways of looking at and thinking about things. It’s nearly impossible for any single individual to fully grasp all these perspectives since we can only pursue so many professions in one lifetime.

That’s where mental models come in. They provide us with a way to tap into these various thinking methodologies. I’ve found that they offer practical insights and perspectives from different fields, making life a bit more manageable and interesting, at the same time making it much easier for us to make any informed decisions.

1. The Map Is Not the Territory

One of the cool things I’ve learned from Farnam Street is that “The Map Is Not the Territory.” This is like saying that what’s in our heads isn’t the same as what’s out there in the real world.

Map is not the territory | @ishandeveloper | Ishan Sharma

Think about it this way: Imagine we’re all set for a hike or a trek in the mountains or a forest. We’ve got this map that’s supposed to guide us.

Now, this map is handy, no doubt. It shows us the trails, where we’re supposed to go up and down, and all the important stuff we need to know. But here’s the thing: the map is super simplified. It can’t tell us everything about the actual place.

For instance, the map might show the path us should follow, but it can’t show us how steep the hills are, how rough the terrain is, or how thick the trees are. It definitely can’t give us the full experience of being out there.

In reality, going on a hike or trek is a whole adventure by itself. We’ve got to feel the ground under our feet, navigate those twists and turns, and soak in the sights and sounds of nature. The map can’t give us that. It can’t capture the excitement or the unexpected moments we’ll come across.

This example shows exactly what “The Map Is Not the Territory” means. Our mental picture of the hike (our map) doesn’t show us all the details and richness of the actual adventure (the territory). But you know what? That’s okay because if the map was as detailed as the real thing, it wouldn’t be useful, and it definitely wouldn’t fit in our pocket!

In everyday life, our mental models are a lot like those maps. They help us make sense of things, but they don’t show us the full picture. I’ve found this mental model super handy to avoid misunderstandings and make better decisions every day :)

2. First Principles Thinking

“First Principles Thinking” is like the superhero of problem-solving. It’s all about breaking down complex problems into their basic building blocks. It’s like asking “why” until you uncover the simple truths hiding beneath the surface.

First Principles Thinking | @ishandeveloper | Ishan Sharma

Here’s a real-life situation where “First Principles Thinking” turned out to be my trusty sidekick:

So, I was working on this project at HackerRank, where we needed to upgrade our Ruby version to the latest and greatest, Ruby 3. Sounds like a routine task, right? Not quite! As I started digging into it, I stumbled upon a rather pesky problem.

Our Rails app relied heavily on this gem called ‘activerecord-session_store’. This gem was the boss when it came to managing user sessions and all the cookie tokens that come with it. But here’s the catch – the version of this gem we were using was not compatible with Ruby 3.

Now, here’s where the adventure began 😵‍💫 If we upgraded the gem as it was, all our users would be kicked out of their sessions. Imagine the chaos! Plus, this gem was also in use by one of our services, running on good old Ruby 2. So, upgrading it would send that service into a frenzy 😔

In the face of these complexities, I turned to “First Principles Thinking.” I started by asking myself “Why do we even need this ‘activerecord-session_store’ gem?”. This led me to dive deep into the gem’s source code, studying how it functioned, and understanding its intricacies.

This simple question led me down a rabbit hole of code diving, understanding how the gem works, why isn’t it compatible with ruby 3? What changed. Which, led me to even venture into the Ruby on Rails repository to understand how the Logger in Rails works!

Armed with a profound understanding of the gem’s inner workings, I was able to fork the gem and write a patch that resolved the compatibility issues with Ruby 3.

This experience taught me that “First Principles Thinking” isn’t just about breaking down problems—it’s about deeply understanding the core elements and principles underlying those problems.

3. Occam’s Razor

This principle suggests that when faced with multiple hypotheses or explanations for a phenomenon, the simplest one is often the most accurate :)

Occam's Razor | @ishandeveloper | Ishan Sharma

One of the incidents that recently happened with me was when one of my colleagues and I were launching a new feature in production. Everything appeared to be running smoothly on our staging environment during testing. Confident in our work, we decided to deploy the changes to the production environment.

However, shortly after the deployment, PANIC ensued. We noticed that the API endpoint was just not at all working in prod and was instead throwing a 404 error. What made it even more puzzling was that our staging and production environments were nearly identical in terms of infrastructure and configuration. So, what could’ve gone wrong??

We rollbacked the changes and once prod was back in a stable state. My mind raced, and I began to entertain complex hypotheses. Perhaps some obscure DevOps configuration was to blame? Maybe it was a deep-seated issue with load balancing or network settings.

A couple of hours passed, and frustration mounted as the issue persisted. We couldn’t find any evidence of a DevOps problem or a misconfigured setting that could explain the strange behavior and we still had no clue as to why this strange behaviour could’ve happened? Everything seemed to work in staging environment.

Then, in a moment of clarity, Occam’s Razor came to the rescue. A colleague casually asked, “Did we actually deploy the latest changes to production?” It was a simple and almost embarrassing question to consider after hours of complex troubleshooting 🙂🤦🏻

We quickly checked, and yep, it was true! In our haste to diagnose a complex issue, we had overlooked the simplest explanation—an oversight in the deployment process.

Occam’s Razor had once again proven its power! The most straightforward explanation, that we hadn’t deployed the changes, turned out to be the correct one. It was a humbling reminder that sometimes, in the pursuit of solutions, we can get so lost in complexity that we overlook the simplest and most obvious answers. :)


That’s all for now. I’m excited to continue exploring and learning about even more mental models in the future. I hope that the insights I’ve shared today will prove valuable to you in making better decisions and navigating the complexities of life : )

P.S. You can go ahead and read about all of these mental models on Farnam Street’s blog, here.

Join my mailing list and get notified about new blogs

Be the first to receive my latest content with the ability to opt-out at anytime. Of course, I promise that I won't spam your inbox or share your email with any third parties.

More articles from Ishan Sharma

Growing Up

Join me in aswering the question, "Am I a grown up now?"

August 4th, 2023 · 4 min read

Why do I love Adidas?

Discover why adidas captures my heart with its perfect blend of comfort, simplicity, and sustainable innovation

July 2nd, 2023 · 4 min read
© 2020–2024 Ishan Sharma
Link to $https://twitter.com/ishandeveloperLink to $https://github.com/ishandeveloperLink to $https://www.linkedin.com/in/ishandeveloperLink to $https://stackoverflow.com/users/13219775/ishandeveloperLink to $https://medium.com/@ishandeveloper