Introduction
Problem solving is a skill you need to have as a developer if you want to stand out from the crowd, but I am not going to lie, it is not an easy skill to cultivate, it involves constant practice. In this article, I want to share how I typically approach solving problems which I think you would find helpful.
1. Write problems down in plain English
I learnt about this technique from Clever Programmer, and it has been a game changer for me. The idea is to write down the problem you are facing in simple english, remove all the code talk, and just explain what you are trying to do. For example, let's say you are trying to build a background changer project, and you are struggling to write the functionality to make it work. What you should do at this point is explain to yourself what you are trying to achieve, for instance, you could say "When I click on this blue button, I want the background color of the body to change to blue, and a text decoration of underline to be applied on the button". Even though this is a very simple example, explaining how things should happen makes it easier to solve the problem, try this out and let me know if it helps.
2. Eliminate distractions
Another method I use to solve coding problems is to focus on a particular feature by eliminating distractions. Take for example, I am trying to make the services section on my portfolio responsive, in other not to get distracted looking at other codes, I can just remove what I don't need at the moment and focus on what I want to do, when I am done, I add the remaining code back, it's simple but effective. Most times, I find it hard to stay focused on what I am working on without jumping off to something else, I would be doing one thing and all of a sudden, I would be like "Why does this button have these classes?". Before I know it, I have switched into doing something else, leaving what I originally intended to do, so this method helps me a lot.
3. Read error messages well
Yes I know, this is quite obvious, and the error might not be descriptive enough, but sometimes, the error tells us what the problem is. I feel like learning how to read error messages is a skill on its own because you will always encounter bugs in your code, there is no developer that will code a full stack application without encountering an error. The more you can decode error messages and solve them, the better you get at knowing how to avoid them.
4. Learn to break problems down
You have probably heard this one over and again, and there is a reason for it. The better you can break a problem down, the faster you can solve the problem, it's single handedly one of the best ways to solve any coding problem. One thing you should understand is that programming is more than just code, it involves so many processes that coding is like 20% of the Job. Companies are looking for developers who know how to break problems down, and come up with a solution, rather than someone who just knows how to code.
5. Learn how to use AI
This might surprise you a bit, but I can tell you for a fact that you are missing a lot if you don't use AI to solve coding problems. ChatGPT for example has been of immense value to me ever since I started using it, it's like talking to someone that always has your time, and is ready to answer any question you have, in a way you can understand. AI is here to stay, and help us become more efficient developers, but in other to gain value from AI, you have to learn what is called Prompt Engineering, I'm still learning this as well, but I have gotten better at writing good prompts over the past few months.
Conclusion
These are the tips that help me solve problems I usually face, all of them might not be useful for you, but I am sure one of them is. I would like to know how you as a developer approach solving problems. You can connect with me on twitter and linkedin.
Top comments (0)