In this article, I want to discuss problem-solving, one of the key skills that software developers need to master. As a software developer, you'll face problems all day long. IT in general and software development in particular is really all about solving problems. If you don't enjoy doing that, then you might not like software development all that much.
In your early days as a developer, you'll spend a lot of time fighting against compilers, interpreters and linters. Why is this expression invalid? What is wrong with that function? What type should be used here? etc. Over time, once you overcome those learning difficulties, you'll get to bang your hand against the wall for more "important" issues such as:
- How should we call this variable?
- Haven't I imported that module?
- Why is that value null at this point?
- Shouldn't this be true at this point?
- What was I doing ten minutes ago?
Just kidding! More seriously though, because of the constant trial and error process that you'll go through over the years, you'll face and resolve the same kinds of issues over and over again, albeit in different forms. It'll gradually become easier and easier for you to solve those issues. But new variants will emerge, always surprising you. Like viruses, there are always new problem variants.
Also, the more experienced you become, the more complex the problems you'll have to solve (the most complex ones always being about team collaboration). The other fun part as your experience grows is that you'll be able to anticipate problems and avoid some of them, for instance by creating more solid architectures/designs from the beginning.
When you are constantly facing issues, there are two main possible reactions: go mad or find it amusing, and move forward with the resolution of the new puzzle at hand. Hopefully, you'll be part of the second group. Sometimes, it'll take you a few minutes to solve an issue, and it won't trouble you much. But sometimes, issues will take hours or even days to be fixed, which can be hard on your morale, especially when you feel the pressure. There are also problems that you won't be able to crack and for which you and your teams will have to find external help, or workarounds.
Problem-solving cycle and approaches
Problem-solving can be tackled using a systematic approach. For instance, with the problem-solving cycle:
- Recognize the problem: Before anything else, we need to see that there's a problem
- Define the problem: We need to clarify what needs to be solved precisely
- Develop a strategy to fix it
- Organize information: What information do we have about the problem, what do we have to figure out, etc
- Track progress: If we don't track our progress, then we risk spending too much time/energy. By evaluating progress, we'll be able to devise/try other strategies if needed
- Evaluate found solutions (correctness, efficiency, etc): Especially useful if there are multiple solutions
- Remember: Keep track of previously encountered problems, and their solutions to avoid having to find the same solutions again in the future
Reformulating a problem is also very useful to make sure that it is clearly understood. Once clearly articulated, it should be simplified/reduced as much as possible. The goal is to simplify, focus on the essential and remove all the noise.
- Brainstorming: Identify many ideas and potential solutions without judging those immediately
- Analogies: Compare with other similar problems
- Divide and conquer: Break down the problem in smaller, more easily solvable parts
- Abstraction: Solve the problem on paper/in thought/on a prototype before solving it on the real system
- Hypothesis validation: Validate parts of the solution
- Root cause analysis: Identify the real source of the problem
- Elimination: Rework or even eliminate a system or subsystem to make problems disappear altogether. Sometimes, eliminating the source of a problem is the fastest way to move forward
For instance, we can create an issue tree, which visualizes the possible solutions to a problem and explore those separately. For root cause analysis, we can use the five whys technique and/or Ishikawa diagrams.
We can also use mind maps, which are one of the more powerful tools at our disposal to organize information/knowledge and analyze concepts/ideas. I'm a huge fan of mind maps. Mind maps are also very useful to use when trying to solve problems.
In general, visualizations and diagrammatic reasoning helps a lot, so don't hesitate to read articles/books about visualization techniques; it will, prove useful.
As professional problem solvers, there's a true pleasure when we finally get to the "Aha!" moment (also known as the Eureka effect); when the puzzle is finally solved. It only lasts an instant (because the next problem is already in front of you), but that moment is bliss. Sometimes the solution will come out of the blue. Many developers have already gone to sleep with an issue on their mind, and with a solution at hand in the morning.
In IT, problems often have many possible solutions. Of course, some are better than others, but it's not always obvious.
- The Ideal Problem Solver: A Guide for Improving Thinking, Learning, and Creativity by John D. Bransford and Barry S. Stein
- Problem solving
- Cracked it!: How to solve big problems by Bernard Garrette, Corey Phelps and Olivier Sibony
- Issue tree
- Five whys technique
- Ishikawa diagrams
- Mind maps
- Mind Map Mastery by Tony Buzan
- Diagrammatic reasoning
- Eureka effect
- How to Solve It by G. Polya
- Thinking, Fast and Slow by Daniel Kahneman
In this article, I've discussed problem-solving skills, which are key for all software crafters. I've covered the problem-solving cycle, as well as a number of approaches you can take to tackle the most complex problems. Make sure to check out the references that I've shared above, as those contain many more keys to help you solve the fascinating puzzles you'll be confronted with.
Problem-solving does require a particular mindset/thought process, an analytical mind, and specific skills that I'll cover in later articles.
What is your favorite approach to solving problems?
That’s it for today!
If you've enjoyed this article and want to read more like this, then subscribe to my newsletter and check out my Dev Concepts collection of e-books about Software Development 🔥.
You can follow me on Twitter: https://twitter.com/dSebastien 🐦
If you want to discuss, then don't hesitate to join one of my communities: the Software Crafters community, the Personal Knowledge Management community, and the focusd Productivity community