I would first say acknowledge why you're blocked. It's perfectly fine, even a normal human trait to feel this. Are you too distracted by something (browsing the web too much), stuck in the same way (getting too comfortable means you don't challenge yourself), or being "reprimanded" for doing something you really enjoyed (getting negative responses about something that should be positive).
Yep, going for a walk is a great tactic. Or taking a shower.
I go back to blog posts I wrote years ago on projects I don't remember and get jazzed about the excitement I "used to have". It helps counter any doubts I'm currently having.
I look through unfinished projects and again see that creativity I had once upon a time.
Then it's about getting into anything and trying to forget about that cause. You can sit around and spin your wheels, or start writing something (code, blogs, etc). Sometimes you need to add a little more force to get that ball rolling again.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.