When you're bogged down, whether it be writing code or doing the dishes or being a better parent or rewriting a parent class, remember YouCan. Take it one step at a time. YouCan write the next line of code, if not right where you're looking, then somewhere else where you might find a hint to solve the problem you were looking at a minute ago.
We can have WorldPeace? because YouCan be MovingInTinyCertainSteps towards it every day. DoSomeThing. WhyNotStartToday?
How to do this is clearly spelled out in some very old words of wisdom from the Bible, found in the book of St Matthew, the fifth chapter, verses 37 through 48. It starts with our conversation being peaceful, moves on to actions which makes our enemies our friends, particularly because the actions will come from the very core of our being.
Success in our efforts come from a state of mind and an approach to living which are expressed in the lyrics of a song: "accentuate the positive, eliminate the negative, latch on to the affirmative, and don't mess with mister inbetween". It will be found, when practiced, that such attitudes and approaches will lead to mental resolution and to real and practical emergence of artifacts which become GoodThings. -- DonaldNoyes.20080720.2206.m06
See: IfYouThinkYouCanAndYouTryVeryHard, CanDo, BecauseYouCan, DoTheBestYouCan, IsureCan
Also related: OnlySayThingsThatCanBeHeard