Improve your problem-solving skills in programming

Diego Perez
2 min readAug 6, 2022

--

Computer science is essentially about problem-solving, it is not about programming languages, frameworks, or platforms. So instead of trying to learn every new language, library, and software released, we should focus on improving our problem-solving skills, because in the end, this allows us to get better at programming. So let’s talk about a simple process that will help you think and solve problems.

If you have faced challenging problems in your code and your way of solving them was the following: First try one solution if it doesn’t work, try another, and if the last one doesn’t work either, keep trying until you got the right solution, let me tell you that this method is a total waste of time.

Let me propose a better way that will help you tackle the problems quickly and effectively

  1. Understand the problem: In this step, you should focus on clarifying all the details about the problem, what it is and what you want to solve. if you don’t spend enough time figuring this out, you will waste a lot of time creating a solution that was not the one required.
  2. Planning a solution: now that you understand the problem it is time to make a plan with the resources and skills available, do not try to write code but abstract the problem to allow your mind to think of a solution without thinking about syntax.
  3. Divide the problem into several parts: when you have already visualized a picture of the possible solution, try to divide the big problem into parts, so that it will be easier for you to deal with these specific problems.
  4. Integrate the solutions and overcome the main problem: after solving each subproblem you can integrate all the solutions into a final one.

If you implement this methodology in your work, I assure you that you will be able to increase your programming level, you will be more efficient and you will be able to face even more complex problems. Like any skill, this requires practice so it’s a good idea to have practice sessions where you establish a set of programming exercises using tools like Leetcode or Hackerrank, so this will be reflected in your coding quality over time.

--

--

Diego Perez

Technology content creator, Electronics Engineer and Python developer