- Key Takeaways
- What Is a Mental Model?
- How Do Mental Models Help Developers Think Better?
- Mental Model 1: Rubber Ducking
- Model 2: Circle of Competence
- Model 3: Feedback Loops
- Model 4: Mindmaps
- Model 5: Hill Charts
- Model 6: Parkinson’s Law
- Model 7: 5 Whys
- Model 8: Inversion
- Model 9: Occam’s Razor
- Model 10: Lean Startup
- Pick the Right Mental Model
- Frequently Asked Questions (FAQs) about Mental Models for Developers
Start experimenting with ten mental models you can use to get unstuck, look at difficult problems from new angles, verify your assumptions, and understand systems more deeply.
How do you quickly recover when you’re stuck in a rut?
Naturally, you could sit down and brainstorm solutions. Unfortunately, it may take time for inspiration to come when solving a complicated challenge with your code.
What can we do to think better and solve problems faster?
Whether you want to identify the root cause of a problem or understand the ideal way to prioritize, mental models could offer valuable insights.
Key Takeaways
- Mental models are powerful tools for developers to solve problems faster and think more effectively. They simplify complex issues, enabling developers to understand systems deeply and verify assumptions.
- Ten notable mental models for developers include Rubber Ducking, Circle of Competence, Feedback Loops, Mindmaps, Hill Charts, Parkinson’s Law, 5 Whys, Inversion, Occam’s Razor, and Lean Startup. Each model offers unique insights and strategies to tackle different challenges.
- The right mental model can make problem-solving more efficient and productive. It can help break down a large problem into smaller, manageable parts, providing a fresh perspective and leading to innovative solutions.
- While it may take time to incorporate these mental models into daily routines, doing so can help developers get unstuck faster and steer them in the right direction.
What Is a Mental Model?
A mental model is a way for us to understand the world. Mental models are frameworks that help us understand how our minds work and why we think the way that we do. We can also use mental models to rationalize concepts.
Mental models are not always right. They are a simplified way of thinking that can help us understand things better. We can use these insights to take action.
Mental models are powerful because they’re flexible. Like metaphors, mental models let us understand things that we don’t know by comparing them to what we already know.
For example, game theory is a branch of mathematics focused on analyzing the actions and counteractions of individuals or groups. It’s a rigorous form of mental modeling that allows us to explore concepts such as decision-making, strategy, and even reciprocal relationships with others.
As human beings, it’s easy for us to underestimate the power of these tools. We often forget how much thinking goes into our daily routines. In fact, mental models can help us examine how we work and why we think the way we do.
How Do Mental Models Help Developers Think Better?
Our brains’ mental models determine the quality of our thoughts. Understanding which mental model best fits a situation can help you work and think smarter.
For developers, mental models can benefit your productivity and efficiency. It could enable you to understand the problem, correct high-level issues in the code, and avoid potential bugs.
Consider this scenario.
You’re in the zone and writing code at a fast pace when something goes wrong. You check the source code, iterate potential solutions, invoke a debugger, or analyze stack traces.
When done right, you can find the root cause of the issue. But this can take a lot of time and effort.
Now, consider an alternative scenario.
Let’s say you encountered a problem with a code.
Instead of using a variety of random strategies, you can analyze the mental model of a system. Think about the conditions that led to the bug and find areas where the code isn’t aligned with the mental model.
A developer could identify the solution even without a Google search with this approach.
Now, what are the mental models that can help you get unstuck? Here are some notable mental models for developers that can help you get the job done.
Mental Model 1: Rubber Ducking
Rubber ducking is a shorter term for “rubber duck debugging.”
The concept originated from a tale wherein a programmer described their code line-by-line to a rubber duck.
While its original inspiration seems odd, the rationale is simple.
Explaining your code to another individual or an inanimate object lets you break down the problem and determine where you got stuck. You’re compelled to think outside the box.
Eventually, you’ll arrive at the point where you went wrong with your code.
Just to clarify, you don’t need to talk to an actual rubber duck or a toy plushie to get this done. You can also gain valuable insights by rubber ducking with a colleague or a friend. As you attempt to explain your code in-depth, they might brainstorm potential solutions.
Model 2: Circle of Competence
The Circle of Competence is about differentiating “what you know” from “what you don’t know.”
To put it simply, this mental model helps you remain aware of your areas of expertise. At the same time, you can accept your weaknesses or sectors where you are at a disadvantage.
No matter how long you’ve worked as a developer, you won’t be able to know everything.
An example would be a gaming developer moving on as a developer in the finance industry.
You need to be proficient in C# and C++, user interface design, and program terrains or AI for non-playable characters as a game developer. Some of these skills may be useful in your current role, but you later discover you need to understand bank laws or manage security services too.
With the Circle of Competence, developers can predict the challenges they may encounter when starting a new project or moving on to a new job. Once you know what’s outside the circle, you can seek help or contact experts that could help you conquer the areas where you’re not confident.
Model 3: Feedback Loops
A feedback loop happens when an output of a system re-enters the system as inputs.
It usually occurs in the “plan-do-check-act (PDCA) cycle,” an iterative process for improving products and services.
This process involves four steps:
- Plan: Determining what needs to be done
- Do: Following the initial plan
- Check: Assessing your plan’s execution and evaluating its effectiveness
- Act: Putting the plan into action
In software development, feedback loops can occur during the development phase.
This process may involve aggregating feedback from a sample group of customers to determine whether the output solves what it’s intended to. Otherwise, we may waste time and money in the development phase without satisfying customer expectations.
Developers may apply feedback loops during pair programming or code reviews.
Imagine a junior developer writing the code while a senior developer reviews it. The process improves the skills of junior developers, helps identify bugs, and improves subsequent outputs of the team.
Model 4: Mindmaps
A mindmap is a diagram that offers a visual representation of concepts or ideas.
Try kicking off a project by making a mindmap. Begin with a central idea or concept. It might be the main problem or the project’s title.
Next, you can add branches or subtopics related to the central concept. These could be the main tasks that need to be done by each team.
You can then add more subtopics or branches. These could encompass tasks assigned to each member, contributing to the overarching goal.
A mind map is also helpful in the testing process in software development. Testers could use it to explore an application and list passed or failed tests.
Along the way, you could even include questions in the sub-branches. This way, the feedback and issues are organized in an easy-to-understand format.
Model 5: Hill Charts
Hill charts are a mental model that can help you identify what’s in motion and what’s stuck.
Like the shape of a hill, the chart is composed of two phases – an uphill slope and a downward slope.
The first phase is “Figuring Things Out,” situated on the uphill slope. At this stage, you have a basic understanding of the project, but you still need to settle some unknowns or finalize your overall strategy.
As time goes by, you’ll eventually reach a point where you’re ready to put your strategy into action. Then, the downhill phase is about “Making it Happen” or implementation.
Developers can utilize Hill charts by coming up with to-do lists for their projects. As you fulfill or add more items on the list, identify where they should be situated on the Hill chart.
Senior developers working on multiple projects or managing several teams can use this to gauge where a team is focusing its efforts. It could also help identify stuck groups and what they need to move forward.
Model 6: Parkinson’s Law
Parkinson’s law is a mental model which states that work expands to fill the time allotted.
Take, for instance, a developer team that’s given three weeks to add or tweak a specific feature in the product. The team is delighted to find that they have more than enough time to finish the project. They start slow and require three weeks to complete the task, but they discover more issues to finish after receiving feedback.
Parkinson’s law states that teams should set deadlines for maximum efficiency, even if they’re imperfect.
In the first example, the team seems too relaxed because of the illusion of time. Questions and minor tweaks could slow them down, but the output may still be imperfect.
However, if they were allotted a realistic two-week deadline, the same team could get more done in less time. They’ll even have sufficient time to work on feedback from testing, if necessary.
Model 7: 5 Whys
The 5 Whys is a mental model which requires asking “Why” five times.
The rationale is when you identify a problem, the most obvious solution may not address the root cause of the issue.
Identifying the leading cause will enable developers to save time and effort. Otherwise, they would merely apply band-aid solutions while the real problem is left unaddressed.
An example that seems relatable to developers could be the following:
Why couldn’t the user access the calendar feature in the app? There was a bug in the recent update.
What led to the bug in the recent update? The team was unable to test all the features. Why was the team unable to test all the features? New testers on the team were unable to test all the features properly.
Why did new testers fail to perform well? They were also not provided with resources and adequate training. Why were they not provided with proper training and resources? Most new testers worked remotely.
The team in charge of training them is having a hard time because there’s no tried and tested onboarding process yet for fully-remote workers.
Model 8: Inversion
During the problem-solving process, we often think forward.
This may be effective when solving simple issues. However, it may be challenging to tackle a complicated issue that needs to be broken down.
Inversion helps us break down problems and brainstorm solutions by thinking backward.
Let’s say your software product has launched a free trial to boost your customer base. Yet, the free trial conversion rate is only a dismal 2%.
The standard thought process for brainstorming solutions would involve asking, “What can I do to get more people to use my product even after the free trial ends?”
Instead of thinking forward, invert the problem and ask, “Which features did users try the most during the free trial? How can we improve the user experience in our free plan?”
The solution to the first problem may solely involve improving your onboarding experience and creating tutorials. Yet, you may uncover underlying issues that significantly contribute to the low conversion rate by inverting the problem.
Model 9: Occam’s Razor
Occam’s Razor, also known as the law of parsimony, is a mental model for problem-solving. To put it simply, the model states that when there are several ways to solve a problem, the simplest solution is likely more correct and ideal.
Consider a developer that can write both simple and complex code to accomplish the same outcome. Even if two options exist, the most ideal would be the simpler code because it is faster to review and easier to update.
While the result is the same, the more straightforward solution is easier to execute and more advantageous in the long run.
Model 10: Lean Startup
Lean Startup involves the build-measure-learn feedback loop.
Most startups start with a great idea, but it can take weeks or months to realize this product.
Lean Startup processes solve this problem by encouraging the development of a minimum viable product (MVP) that potential customers can test.
Once selected target customers try it, the startup will measure results and ask for feedback. The cycle continues until the startup has a high-quality product that they can confidently release en masse to target consumers.
The team can build the ideal product with continuous feedback from target consumers. Otherwise, it could take weeks or months for startups to get a product beta tested.
Worse, they may discover significant issues during the testing process. However, they’ve already invested thousands of dollars into building a product and can’t afford to stay in this stage for a more extended period.
Pick the Right Mental Model
Understanding the right mental model for each situation helps us work smarter, not harder.
Dealing with a complicated issue can cost us a lot of time and effort. Mental models help us break down the big problem into much smaller ones. This way, we can get to the heart of the matter and develop the most practical solutions.
I know it may take time to ingrain these mental models in your daily life. But once you learn the process and actualize it, you can instantly get unstuck and steered in the right direction.
Frequently Asked Questions (FAQs) about Mental Models for Developers
What are mental models and why are they important for developers?
Mental models are essentially frameworks or representations of how something works. They are crucial for developers as they help in understanding complex systems and processes, making problem-solving more efficient. By using mental models, developers can simplify complex problems, predict outcomes, and make better decisions.
How can mental models help me get unstuck in coding?
Mental models can provide a fresh perspective when you’re stuck in coding. They can help you break down the problem into smaller, manageable parts, and allow you to approach the problem from different angles. This can lead to new insights and solutions that you might not have considered before.
Can you give an example of a mental model that is useful for developers?
One example of a mental model that is useful for developers is the “First Principles Thinking”. This model encourages you to break down complex problems into their fundamental parts and then rebuild them from the ground up. It’s a powerful tool for understanding problems at a deeper level and coming up with innovative solutions.
How can I develop my own mental models?
Developing your own mental models involves a lot of reading, thinking, and practicing. Start by learning about existing mental models and applying them to your work. Over time, you’ll start to see patterns and develop your own models.
Are mental models only useful for coding?
No, mental models are not only useful for coding. They can be applied to any area of life where problem-solving and decision-making are required. This includes personal life, business, and even learning new skills.
How many mental models do I need to know?
There’s no set number of mental models you need to know. The more models you understand, the better equipped you’ll be to tackle different problems. However, it’s more important to understand and apply a few models well than to know many models superficially.
Can mental models be wrong or misleading?
Yes, mental models can be wrong or misleading if they’re based on incorrect assumptions or incomplete information. That’s why it’s important to constantly review and update your models based on new information or experiences.
What’s the difference between mental models and frameworks?
While both mental models and frameworks help us understand and navigate complex systems, they are not the same. A mental model is a representation of how something works, while a framework is a set of tools or methods used to solve a problem or achieve a goal.
How can I use mental models to improve my coding skills?
Mental models can help you understand complex coding concepts, break down problems, and come up with efficient solutions. They can also help you learn new programming languages or frameworks more quickly, as you can relate new information to what you already know.
Are there any resources where I can learn more about mental models?
Yes, there are many resources available online where you can learn more about mental models. Some recommended books include “Thinking in Systems” by Donella Meadows and “Super Thinking” by Gabriel Weinberg and Lauren McCann. There are also numerous articles and blogs on the topic.
Monique Danao is a contributing writer for Sitepoint. She writes about tech, social media, content marketing, and ecommerce.