Happens all the time. The only solution I know of is to stop programming for an extended period of time. Actually I think I'm going through it right now. Haven't coded in about a month.
Ask HN: How do I regain my passion for programming?
11–12 of 12 posts
Re: Ask HN: How do I regain my passion for programming?
#12"How do I regain my passion for programming?"
Short answer is to not do it as a job and instead do it as a hobby.