August 4, 2022 ●
Developers spend an enormous amount of time being stuck. I've been a developer and an engineering manager myself for many years, and I think being stuck is the default state. We, developers, spend most of our time being stuck, and just occasionally, we get unstuck and make progress.
Everyone gets stuck, both junior and senior developers. However, they can be very different in how they handle these situations. Senior developers may realize they're stuck sooner and start doing something about it. Often, their efforts are successful; they find a solution, complete their task, and move to their next task sooner and the cycle starts again.
Getting unstuck is a skill that can be learned, and in this episode, I'll share some thoughts on how to get better at it. But first, let's briefly discuss how our brains work and what happens when we get stuck.
Since we use our brain for problem-solving, it would be nice to have a basic understanding of how it works. Of course, this is a very complex topic and what I suggest below is a primitive concept based on my limited knowledge. Nevertheless, this concept could be helpful since it provides a practical framework for better problem-solving.
Nope, this is not a video above; sorry if I tricked you into clicking. But if it were, and if you ever watched Star Wars — I bet you would expect to hear the heavy breathing of Darth Vader since this sound is so deeply associated with his look. Other associations include lightsabers, starships, Luke Skywalker, etc.
Our thinking includes following associations among various concepts and establishing new associations. As Steve Jobs famously said, "Creativity is just connecting things."
To find a solution to a problem, we need to make the appropriate connections in our minds. We say a problem is "hard" when we cannot quickly connect it to a suitable solution.
What’s in the cup?
My first thought is "coffee," but… it could be something else, right? Could it be strong black tea? Maybe. Coca-cola? Unlikely, but possible. Crude oil? Well, very unlikely, but still possible, in theory. Why did I say "coffee"? Because I've seen such cups of coffee so many times. Due to frequent use, this association is very strong in my brain, it has become an automatic, unconscious response — I make this association without even realizing it.
This is one of the fundamental principles of how our brain works — the more we make a particular association, the stronger it becomes, and the more likely we’ll be to take the same route. Associations between different concepts are like roads: some are barely visible footpaths, and others are like wide highways:
When we think about a particular problem for too long, at some point, we start to go around in circles. We get stuck in a loop, making the same associations over and over, and the more we repeat them, the stronger they become, and the harder it becomes to see other potential associations.
Once we realize this, it becomes clear that the worst thing we can do when we're stuck is to "just continue thinking." It doesn't help. The more we "think," the more we go around in circles. In fact, it is counterproductive — It only leads to exhaustion, and our chances of being able to see any new ideas are null. So, it's time to try something else.
To find a solution, we need to understand the problem first, right? It sounds obvious, but surprisingly often, we try to solve a problem we don't fully understand. This could be due to an unpleasant property of our minds: we tend to think that we understand something while, in reality, we don't.
A great way to verify our understanding is to write it down. Writing can help in two ways:
As I mentioned before, our short-term memory is limited. Very limited. When we deal with a complex problem, it may have so many aspects that it’s hard to fit everything into our mind, and even if we manage to do so, it leaves no room for possible solutions.
In such a case, try to split it into parts, write them down, and solve them one by one. Solving multiple simpler problems could be way easier than tackling down a huge one.
More often than not, we're trying to solve problems in areas other people have already explored. Learning from their experience is an invaluable source of ideas, and who knows — maybe even out-of-the-box solutions.
Don't be afraid to borrow someone else's ideas. "Good artists copy, Great artists steal." I'm not saying we should never reinvent the wheel — sometimes, we have to. But ideally, there should be a reason for that. How do we know that our wheel is better than others if we haven't researched existing wheels yet?
Today, the Internet makes information accessible like never before. An hour spent googling is a time well spent.
Talking to other people is also a highly effective way of solving problems. There are multiple reasons why this works:
You may have heard stories about some programmers talking to a rubber duck, since it helps them find solutions. I'm sure that it works for some, but I also think that this advice is a bit overrated, and talking to real people is better. In most cases, a two-way exchange of ideas should be more powerful than a one-way.
Nevertheless, a rubber duck may help. How? It turns out that different parts of our brain are responsible for writing and speaking. It means that other neurons in our brains are activated when we switch communication media, which may lead to different ways of thinking. We can use it to our benefit. If we have written down the problem, and nothing useful came out of it, we may give it another try by saying it out loud.
Drawing is another form of communication. Sketches, diagrams, and mind maps represent our ideas visually rather than in words, and this could be very helpful for many types of problems.
Switching communication media is also used in a popular brainstorming technique that many people love: whiteboarding. With a whiteboard, we can write, draw, and talk about it with other people — a great combo.
If you notice that you’ve started to go around in circles, taking a break might help to "reset" your brain. There's a saying that "Night brings counsel," and for a reason. Sleep is a natural break; in the morning, you may not only feel refreshed, but you will also be able to take a fresh look at the problem. So, sleep on it!
Temporarily switching to another activity could also help. After you’ve "loaded" the problem into your brain, it could live in the background while you're busy with something else. Then, you may eventually stumble on something that makes the dormant problem pop up, and think “wait, could this be a solution?”
This topic deserves a dedicated article, and I’m not qualified to cover it in depth. However, I’d like to mention it briefly to underline its importance and encourage you to do your own research.
Our brain is our most important tool. Taking care of it is good for our health and boosts more efficient problem-solving. Here are some tips to help keep your brain in good shape:
This is not an exhaustive list, but I believe these items are among the most important.
Being stuck is normal — everyone gets stuck. Moreover, if you, as a developer, don't get stuck, I'd say you're not challenging yourself enough. We cannot avoid getting stuck unless we work on trivial tasks only.
What makes a difference between experienced and inexperienced developers is how they deal with hard problems. I believe that getting unstuck is a skill that can be learned, and all along my life I have met many people who have mastered this skill.
In this article, I mentioned observations and practical tips on what was working for me and what I've seen was working for others. Of course, none of these techniques can 100% guarantee results, but they significantly improve the chances of finding a solution faster, or even a solution at all.