How Can You Sharpen Your Problem-Solving Skills in Programming?

Mathavan Krishnan
4 min readJul 27, 2022

--

The majority of us have heard to the same piece of advice: solving more problems will make you a better problem solver. This strategy, though, is overly straightforward. To improve at something, you need more than just practice. It also depends on how you handle the circumstance.

Furthermore, programmers frequently mistakenly think that “more” = “faster” when urged to “handle more issues.” It was a mistake I made when I first began.

One’s capacity to learn and develop can be harmed by the problem-solving treadmill. I used to go quickly from one issue to the next. But soon the truth of that tactic set in. I compromised quality and missed out on valuable lessons along the way because I was more concerned with quantity than quality.

That doesn’t mean repetition isn’t necessary; it definitely is. On the other hand, repetition misses the point completely. This is what the process achieves.

Since I wish to improve my problem-solving abilities to progress as a programmer, this topic interests me personally. So, this is the approach I’ll use. It need repetitions, for sure, but it also requires a lot more.

  1. Work across a range of platforms to address a range of issues

A Python tutor told me, “When I initially started learning to code, I was captivated with HackerRank. Having a favourite platform is great, but don’t restrict yourself to it. For this reason, you need to be ready for anything.
I want to be able to switch between various platforms and problem types with ease. The difficulties in Reuven Lerner’s book Python Workout are not the same as those in Interview Cake. The issue statements in Lerner’s Weekly Python Exercise were also different from those on HackerRank, in my opinion.

Example:

  • LeetCode
  • Cracking the Coding Interview by Gayle Laakmann McDowell
  • Exercism
  • Interview Cake
  • Python Workout by Reuven Lerner
  • Weekly Python Exercise by Reuven Lerner

On Sundays, when I create my weekly plan, I pick a few topics from the sites below. It’s something I’m contemplating. I’ll pick a challenge from LeetCode that focuses on binary search as an illustration. Then there is one that focuses on data structures and comes from one of Reuven Lerner’s sources.

Because of this discipline, I don’t get comfortable easily. I won’t be able to use the same procedure or data structure. I must be able to select the best tool for the task at hand. I’ll have to have the ability to pivot.

It also provokes thought in me. That’s because I actively seek out scenarios that test my limits — a characteristic referred to as “deliberate practice” by psychologist Anders Ericsson.

2. Diverse Ways to Work Your Programming Brain

It is common to hear of athletes who incorporate cross-training into their training regimen. For instance, a runner might complete one or two bike workouts per week. Cross-training challenges athletes to improve their cardiovascular fitness from a different angle, which makes sense.

On programmers’ cross-training, I’ve already written. The benefits of this tactic deserve further discussion, though. In a same way that athletes use cross-training to boost their cardiovascular fitness, I’m utilizing it to improve my cerebral fitness.

My cross-training includes solving math riddles. I approach mathematics with the same approaches I would use to approach a programming problem. Although the circumstances are different, the technique is the same.

3. Make notes on your solutions.

Everybody makes mistakes and gets stuck when trying to solve a problem. We use our mistakes to help us choose what we should do differently moving forward. That is frequently when learning stops. Once we’ve solved the issue, we’re keen to move on. But resist doing it.

Richard Hamming, a mathematician, asserts that at that point learning should start. “I think it’s essentially more important to analyze successes than failures…

Studying successes is more effective, according to Hamming, who writes in his book The Art of Doing Science and Engineering, “because there are so many ways to be wrong and so few ways to be right.”

4. Maintain Consistency

Let’s discuss repetition after this. A skill is the capacity to solve issues. Like any other skill, it takes time to develop. Simply said, it does not occur over the course of a weekend or a week. I set aside time each day to solve difficulties because of this.

Many people approach this everyday practice with the perspective that there is “too much to learn.” I can’t deal with issues all day long.

My response consists of two parts. There will, first and foremost, always be something new to learn.

Second, problem-solving is a major component of programming. It’s necessary for our line of work. It is worthy of your time and consideration every day. The restriction is that you should give your routine practice some sort of direction.

--

--