How to Get “Unstuck” While Coding
By: Aaron Billings
Tags: Encouragement, Programming, Coding, Codingbootcamp, Coding Style

Photo by Per Lööv on Unsplash

It’s inevitable that at some point while you’re coding, you’ll have a moment where you won’t know what to do or how to get past a certain point. After all, computers don’t interpret language the way humans do. When you talk with a person, even if you don’t thoroughly explain yourself, the other person can generally understand you. You don’t have that luxury while programming. At some point you’ll think, “I’m stuck, what do I do next?” “Wait, how do I do this again?” “I thought this was how to do that?” “I thought I was telling the program to do the right thing, so why isn’t it working?”

We’ve all been there and you’ll be there too at some point in each project. If you have these periods frequently, you may begin to feel like giving up. Don’t! It’s important to remember that everyone gets stuck. But it’s also just as important to remember that you can get unstuck. But how? I’ll tell you what’s worked for me and what I do when I’m stuck.

Have a Blue Print

Any time you need to complete a project, it’s important to sit down first and think about how you’re going to go about building it. What are you building? What do you want it to do? How do you want it to function? Will you use frameworks? Libraries? If so, which ones?

It’s also important to scope out a rough draft of the project as a whole and what you’re expecting it to do. This helps you keep you on track and prevents you from going down rabbit holes and building unnecessary parts.

Photo by Kaleidico on Unsplash

Break down the problem into smaller pieces

The best way to get unstuck is to back up and look at your project as pieces. Don’t focus on the entire project at a time. Just focus on one section, then break up that section into more pieces and focus on those. That way if you get stuck it will be much easier to to find your way out. I remember a quote my wife told me years ago, and that I’ve even heard from my mentor.

“How do you eat an elephant? One bite at a time.”

When you are faced with big projects, focus on each bite or each section, not the entire “elephant” or project. Then before you know it you’ve eaten the entire “elephant” and completed your project. This is the very key to problem solving itself. If you can break things down into smaller pieces, you can solve almost anything.

When in doubt, Google it out

Okay, so you’ve made your plan and you’ve broken it to manageable pieces. But now you’re stuck on one of the sections. How do you get past it? Google it! That’s right, search the internet for the issue or error you’re having. Chances are high that someone, somewhere has had the same issue as you and solved it successfully. You can benefit from their hard work!

I firmly believe Googling and researching your problem or error is a skill that all programmers need to develop. No one can remember everything all the time. All you really need to know is that something DOES exists, then you can search for HOW to do it. Exercise this muscle and I promise you, it’ll help you in the long run.

Ask for help

Let’s say you’ve done all of that but you’re still stuck. That will happen sometimes. It could be that you’ve run into a unique problem or what you’re doing is so specific that no one has done it in quite the way you are. So what do you do now? This is where you ask for help. Are you part of a Slack channel or group community? If not, join one. You will be glad that you did!

Once you’re there, pose your question to the group. However, make sure you phrase your question in a helpful way.

Don’t say, “Hey, I’m stuck on this problem with XYZ, can you help me?” That is sure to get you nowhere fast!

Say this instead: “Hi Everyone, I’m currently working a cool XYZ project and I’ve built a lot of the framework already. However, I seem to be stuck on a certain piece about ABC. What’s I want it to do is EFG, but it keeps doing HIJK. I’ve researched this issue extensively, but I’m still coming up empty. Has anyone run into this issue before? Any help is greatly appreciated!”

That last statement is more comprehensive of what is going on. It shows a few things. First, you understand how to problem-solve. Second, you understand how to ask for help. And third, you’re appreciative of what others do for you. Doing these things really work when asking for help. People are much more inclined to help you if you ask in the right way.

You may be stuck early and often but you don’t have to remain stuck forever. There are plenty of way you get yourself unstuck. These suggestions are what has been working for me recently. I’m sure I’ll find more ways to get myself unstuck as I get even more experienced.

Thanks for reading and Happy Coding!