A simple and elegant solution
On a related note, here are some interesting articles.
You can only benefit from your own failure.
In the start up world articles that talk about failure are very inspiring. It is very hard to admit that you failed and move on. On hackernews, these post almost always make it to the front page. There are a lot of praises in the comments section and people thank the poster for being so courageous. But how useful are those articles?
My solution is to run away ... at least for a moment
What do you do when you hit a wall? When you found a bug and you can't figure out how to fix it. You spend hours and hours in front of the screen and nothing seems to work. Sometimes this can be the worse nightmare for a programmer and putting more hours trying to fix it won't make a difference.
I have no idea what I am doing
I am a web developer by trade and I program as a hobby. I love the idea that people who choose this career path are considered smart. Some of my non-tech savvy friends ask me questions like how Facebook works and they are awed when I answer: Facebook uses a giant database. In front of them I feel like a winner. The go to guy when we are talking about anything technical. But then I go back home. I open my local repository and look at my past, present, and future projects. Then I think to myself: I have absolutely no idea what I am doing.