Super Mario green 1-Up Mushroom

Developer Takeover – How to Get Unstuck and Overcome Coder’s Block

When one of Nuffield Technologies’ talented software engineers suggested we step aside and let him take over our latest blog post, we could hardly refuse. Ben Spencer has a lifelong relationship with coding – his mother was a programmer and he began to gravitate to the role when he was no more than knee-high.

Ben describes his job in simple terms. ‘I fix problems for our clients,’ he says. ‘Sometimes with tailormade software, at other times with hardware or off-the-shelf apps.”

He’s found ways through these challenges and, in this post, he’s sharing them for the benefit of other coders. Even if you’re not a programmer, there’s some great soft skills advice you could bring to any project.

Over to Ben…

Software developer, Ben
Meet Nuffield Technologies Software Developer, Ben

Have you ever found yourself staring at a blank screen, fingers poised over the keyboard but unable to muster the next line of code? Or perhaps you've hit a roadblock in your project with no way forward in sight? We've all been there – stuck in the murky depths of development limbo. But fear not, because in this blog post we're diving into the art of getting unstuck!

Here’s several suggestions and techniques for overcoming coder’s block.

Understand the Problem

When you find yourself at a standstill, it’s important to take time to fully understand your project. What’s the scope of the work? What complications are you facing? Get an idea of the full range of issues you’re facing. Sometimes, just stepping back to reveal the bigger picture is enough to get the creative juices flowing again.

Asking yourself the following questions can prompt answers to help you move forward.

  • What exactly is blocking my progress? Is it a technical issue, or a lack of understanding about the project’s goals?
  • Am I repeatedly encountering the same roadblocks? If so, why?
  • Is the problem emotional in nature: am I feeling frustrated, overwhelmed, or demotivated?
  • Is there someone with experience in this field I can consult? (See also my ‘Ask for Help’ point later)

Break Down the Problem – and Experiment

Sometimes, problems appear far less overwhelming when they’re broken down into more manageable chunks. Try to focus on small tasks and highlight incremental progress. Every task, no matter how modest, should, in some way, contribute to solving the issue. Small wins lead to big victories!

Also, try different approaches to solving your problem. Experimentation can lead to unexpected breakthroughs and further insight into issues. Iterate on potential solutions, refining them until you find one that is fit for purpose.

Use the Rubber Duck Method

“Rubber duck debugging” is another great technique. This is where you talk to yourself, a colleague, or an inanimate object and explain the code line by line. Forcing yourself to articulate the problem helps highlight areas of confusion and will often assist you in finding solutions.

Quack the Code: Solving problems one line at a time with a little help from our rubber duck friend

The AI Rubber Duck

Much like your highly skilled colleagues can help you with the 'rubber ducking' technique, ChatGPT (or any similar prompt-based AI tool) can interact actively, unlike a typical rubber duck. It offers responses and asks probing questions, making the debugging process more dynamic and effective.

For instance, ChatGPT can suggest alternative solutions, identify logical fallacies, or even offer debugging tips. Unlike your colleagues, ChatGPT is available indefinitely and will happily explain how it has come to its conclusions in great detail, helping you to improve your knowledge as you progress towards that elusive solution you're searching for.

As developers articulate their issues, ChatGPT's ability to parse and process complex information can clarify the problem at hand. This conversation can highlight overlooked details or errors in reasoning, effectively acting as a knowledgeable sounding board. Moreover, the adaptability of ChatGPT to various coding languages and its vast database of coding patterns and solutions enhances its utility as an educational and problem-solving tool, making it a superior companion in the rubber ducking technique compared to the traditional non-responsive squeaky duck.

Take Notes

As you tackle issues, organise your scattered thoughts by taking notes about the solutions you’ve tried and the thought processes you’ve explored. This will help you to avoid retrying methods that didn’t work and remember those that did. It will also make explaining the issue to another person far easier.

Become a Google God

The internet is a colossal resource, but you need to know how to extract the right information. In fact, using your favourite search engine to its full potential is an art in itself. Here’s a few tips to help you get the information you need:

  • Be as specific as possible in your search terms, to return accurate and useful results; and refer to specific languages and frameworks. For example, instead of searching for 'How do I make an app?' try 'How do I start to develop an application for Windows, using C# and .Net?’
  • Use quotes around a phrase to deliver an exact match
  • Use search operators for refinement. For instance, ‘AND’, ‘NOT’, ‘site:’ and ‘filetype:’. (Here’s a short and snappy article about search operators)
  • Explore forums like Stack Overflow and GitHub for useful discussions that may solve your problem.
  • Search for ready-made explanations in online tutorials, guides, video how-tos and official documentation.
Unlocking Knowledge: Elevate your search game to find targeted solutions quickly

Take a Break

“Almost everything will work again if you unplug it for a few minutes, including you.” – Anne Lamott

Staring at that blank screen won’t magically make your problems disappear. And constantly grappling with a problem can lead to mental fatigue and burnout. Take time to move away from the issue. Get a breath of fresh air or a glass of water. Take that break and come back with your focus recharged!

Ask for Help!

Developing is more than just locking yourself in a dark room with the 1s and 0s. Problem-solving goes hand in hand with collaboration. Work with other developers, and share your thoughts and the issues you’re facing. You’re not alone! Getting stuck and encountering challenges is normal in the software developer job role.

Here’s a few tips for getting the best-quality help from your colleagues:

  • Know exactly what you’d like to ask and write it down BEFORE approaching your coding compadre
  • Try to open with a small summary of the problem, limited to one or two sentences. This avoids overloading your partner with too much information at once – and getting them just as discombobulated as you are!
  • Ensure you know the codebase you’re working in, so you can answer questions – this will help you both arrive at a quicker solution
  • Consider pair-programming sessions where you and another developer work together on the same codebase in real time. This can lead to faster problem-solving and knowledge-sharing
Joining Forces in Development: Sharing, discussing, and solving — the path to better code starts here

Celebrate Successes

When you finally overcome a challenge, take a moment to celebrate your success. Recognise the effort you put in and the skills you've developed. In our office, we have a large green ‘1-Up Mushroom’ that plays a sound when pressed. (For any non-gamers, this is a recreation of the rare mushroom that gives you an extra life in the Super Mario series.)

The team and I use our 1-Up Mushroom to signify that we’ve completed an important task or overcome a particularly troubling obstacle. Not only does our 1-Up feel good to press, but hearing that others have scored a victory allows us to join in their celebration.

Learn from Mistakes

Every obstacle is an opportunity to learn and grow. Reflect on what caused you to get stuck and how you can avoid similar issues in the future. Review the notes you took along the way and consider writing documentation, user guides or FAQs to help others learn from your process. Cultivate a growth mindset and a curiosity about new technologies and techniques. Continuously expanding your knowledge base can help prevent future roadblocks.

And that’s all folks! Add these tools to your arsenal to make the next problem you encounter an opportunity to learn and grow!

Thanks to Ben for this brilliant article.

No products in the cart