How to Get Unstuck
Being stuck is not an interruption to the job of programming. It is the job. The developers who thrive are simply the ones who got good at being stuck - and it is a learnable, teachable skill.
New developers believe that experienced developers rarely get stuck. This is one of the most damaging myths in the whole field, because it means the moment a beginner hits a wall - which is constantly - they take it as evidence they are not good enough. The truth is the opposite. Experienced developers get stuck all day long. They have simply built a reliable process for getting unstuck, so being stuck no longer frightens them. It is just Tuesday.
Getting unstuck is the single most-used skill in software development. Here is how to get good at it.
Read the error message. Actually read it.
When something breaks, your program usually tells you what went wrong. Not always kindly, not always clearly, but the information is almost always there in that intimidating wall of red text. The beginner's instinct is to recoil from it, to see "error" and feel a jolt of panic and immediately start randomly changing things. The professional's instinct is to read it, slowly, from the top.
Error messages typically tell you three things: what kind of thing went wrong, where it went wrong (often a specific file and line number), and sometimes a hint about why. Learning to parse that - to find the line number, go to it, and understand what the message is complaining about - resolves a huge fraction of your problems with zero cleverness required. The information was right there the whole time. You just have to be brave enough to read it.
Debug like a scientist, not a gambler
When the error message alone does not crack it, resist the urge to change things at random hoping something works. That is gambling, and it teaches you nothing even when you get lucky. Instead, debug like a scientist. Form a specific hypothesis about what is wrong. Devise a test that would prove or disprove it. Run the test. Learn from the result. Repeat.
The most powerful tool here is embarrassingly primitive: make your program tell you what it is doing. Print out the value of a variable right before the thing that breaks. Is it what you expected? Very often it is not, and the gap between what you assumed was in that variable and what was actually in it is your bug, sitting there in plain sight. Most bugs are a mismatch between the story in your head and what the computer is really doing. Debugging is just methodically finding the exact line where the story and the reality diverge.
Explain it to a rubber duck
There is a technique so effective and so silly-sounding that it has a real name in the industry: rubber duck debugging. When you are stuck, explain your problem, out loud, in complete detail, to an inanimate object - a rubber duck on your desk, traditionally, though a patient friend or a wall works too. Describe what you are trying to do, what you expected, and what actually happened, step by painful step.
An astonishing fraction of the time, you solve your own problem mid-sentence. Because the act of articulating the problem clearly forces you to slow down and examine the assumption you had been skating over. The bug hides in the step you were too familiar with to actually look at, and saying it out loud drags it into the light. It feels absurd. It works. Get a duck.
Ask questions that get answers
Eventually you will need to ask a real human, and there is a craft to asking well. A bad question is "my code doesn't work, help." It gives the helper nothing and signals that you have not done the basic work yourself, so it tends to get ignored. A good question shows your work: here is what I am trying to do, here is the specific code, here is the exact error message, here is what I have already tried, and here is what I think is happening but cannot confirm.
Writing a good question this way has a magical side effect, closely related to the rubber duck: the discipline of assembling all that context so often reveals the answer before you finish typing that seasoned developers have a name for it - they solved it "in the process of asking." And on the occasions it does not, a well-formed question gets a fast, useful answer, because you have made it easy for someone to help you. Respect people's time and they will spend it on you.
Use AI, but stay in the driver's seat
An AI assistant is a genuinely superb debugging partner. Paste the error, paste the code, ask what is going wrong - it will often explain the problem clearly and teach you something in the process. This is one of the best uses of the technology for a learner, and I would be lying if I told you to avoid it.
But there is a discipline that separates learning from dependence. When the AI explains the fix, make sure you actually understand why before you move on. Ask it to explain the reasoning. Ask what you should have looked for yourself. The goal is to walk away from each stuck moment slightly better at getting unstuck on your own, because in an interview, and in the quiet moments when the tools fail you, it is your own debugging brain that has to perform. Use the AI to accelerate your learning, not to replace the muscle you are trying to build.
The mindset that changes everything
Reframe being stuck. It is not a sign of failure or a verdict on your ability. It is the normal texture of the work, the puzzle you are actually being paid to solve. Every developer you admire spends a large part of their day stuck and works methodically out of it, over and over, for their entire career. The difference between them and the beginner is not that they get stuck less. It is that being stuck no longer scares them, because they have a process and they trust it.
Build that process. Trust it. Being unshakeable in the face of a broken program is a genuine professional superpower - and now you have the toolkit for it. Next, we turn that toolkit into something an employer can see: your portfolio.
Jako Heiberg
Software developer with 40+ years of building things that work. Full-stack, FastAPI, React. Based in Cape Town, working remotely, worldwide.