Sometimes I can't get coding because there are just too many ways to write the code, or there are too many conflicting requirements or whatever. The solution is not clear in my head. So I write the solution in paragraph form, or bulleted list form. I write in English. This dovetails with a lot of other excellent suggestions that you break down the work into little bits. Break it down in English (or your natural writing language, mine just happens to be English).
Most of the time, as you stare at the resulting list, you think about a few of the items "I can do that in 5 minutes, it's simple". Almost reflexively, you start coding.
Then, as suggested above, tick off the bullets as you get them done.