I bought this deck of cards from a company called Unstuck Box. Each card has a mental model like Pareto Principle, Hanklons's razor, etc. When you are stuck on a problem you can grab a card randomly and try to apply that model to the problem.
Had the idea to apply that to tech problems.
Ultimately the way to get unstuck is to get more data to build a better mental model of the problem.
Remove everything and get the most basic simplest thing working even if it is far from what you want.
Using a new framework or tech, get the most basic example running before trying to integrate with existing code.
Remove as many imports or dependencies as possible.
If this is existing code, roll back to know good versions of the code.
The point is to slowly work off a known state.
Similar to go to ground but disable/remove half to help narrow down what part of the code or system is causing issues.
This is useful for "this shouldn't be possible" problems. A problem where is seems something impossible or unlikely is happening.
Name your assumptions and act as if one of them are true.
I am going to assume that this part is returning x. If that is true then I should expect to see this.
Then follow the logic through does it match up to reality?
If not then maybe your assumption is wrong, if right then you can then look at another point. The goal is to tease a problem apart.
You can't move forward sometimes because you don't know what is going on. You need more data.
Add logging, disable code, change settings. The goal is not to fix but get new data. If you ever watch House this happens alot.
A new treatment causes new side effects which tells you more about the underlying problem.
At the end of the day in programming there is code running on a chip somewhere.
Find new ways to get information on what is really happening.
Explain the problem to someone or something else.
Go outside.
Similar to As if but use the thought experiment of how could you make a code change to force the problem to occur.
If you had to change the code to make it behave the way it is currently, how would you do it?
Another way of forcing yourself to create an underlying mental model of the issue.
Or getting locked into a solution. You need to do x but some part is blocked. Are there alternate ways to achieve the same end goal.