5 Practical Ways to Quickly Overcome a Programming Obstacle

5 Practical Ways to Quickly Overcome a Programming Obstacle
Does your code not work like you expect?

Are you stuck on a programming challenge? Does the code not compile? Does the API work differently than you expect?

Little problems can add up and get in the way of seeing the big picture.

As a software developer, you need to be able to overcome these obstacles. Here are 5 ways that I use to overcome my own programming challenges.

1. Take a Step Back

Think about what you’re trying to do without being in the weeds. Zoom out from the small challenge to the big picture.

Write down what you’re trying to do in your notes. I use a “Log.md” (markdown) file to track my progress, or if I’m on a specific project, I may have a dedicated note like: “Photo Table 2024.md” to track all my work, problems, questions, challenges, and learnings.

Ask yourself questions to get different parts of your mind thinking about the problem.

  1. Can you use a different approach?
  2. Would an alternate solution be better?
  3. Is this even necessary?

2. Talk Out Loud

“Rubber Duck” the problem by talking to an object next to you. It doesn’t need to be a duck; it can be a coworker, your dog (or cat), or just you talking to yourself in your room or office.

Describe what you’re trying to do, then explain what you have tried.

  1. What hasn’t worked?
  2. Can you use a different approach?
  3. Do you need to change the UX/UI to better accommodate a solution?

Note: This can be game-changing when preparing thoughts for a presentation or sharing your work with a coworker.

Talking out loud is how I iterate on my ideas (hackathon, new apps, existing apps, etc.).

3. Take a Walk (or go for a run)

Moving your body is essential; it helps you think in different ways than when you sit at a desk.

When I worked at Apple in 2008. I would frequently see Steve Jobs and Jonny Ives talking while they walked or sat in the outdoor park at Infinite Loop. Walking helps you think.

When I walk, it gives my mind and eyes a break. Too much close work without breaks is not good for your eyes and is one of the causes of nearsightedness (Use the 20-20-20 rule to help protect your eyesight: every 20 minutes, look for 20 seconds at something 20 feet away).

Usually, my mind finds some insight that I brushed past, giving me a jolt of much-needed energy to attack the problem again.

If I’m low on energy, I prefer to run. Running for 30 minutes in Zone 2 or Zone 3 re-energizes me and helps me focus my thoughts.

4. Read the Documentation

I don’t like reading documentation or doing research at my desk. At my desk, I find researching distracting and hard to focus on.

That is why I love the iPad.

Why? Because... I can take the iPad to my couch, exercise bike, or bed and do focused research.

iPad is great because when you open an app, it becomes the only app you have open. That single focus limits distractions and forces you to focus on the content.

I frequently watch WWDC videos and take screenshots (Power + Up Volume buttons) to revisit later or include in my notes.

A change in scenery also allows different parts of my mind to work. Switching locations changes my thought process.

Research at night: If I read documentation or research a problem at night, it is easier to solve it first thing in the morning. I don’t feel like I am wasting time, and I feel even more productive the next day.

5. Set a Timer

Are you still stuck? Maybe you’re just afraid to start.

Sometimes, I need an accountability partner. That’s why I frequently use a timer. It forces me to focus and be present (and helps me avoid social media, YouTube rabbit holes, and endless news scrolling).

Super Easy Timer for macOS

Set a timer for 25 minutes (I made a Super Easy Timer) and try to solve your problem. You must only work on the task at hand for 25 minutes. Nothing matters until you finish the task or the timer goes off.

Give yourself a 5-minute break and re-evaluate what you accomplished.

At this point, you might have decided you need a different approach, or you didn’t understand the API’s limitations.

What works for you?

Let me know what you think @PaulSolt on X or Paul@SuperEasyApps.com

Thanks for reading, and good luck with your programming challenges!