In my first professional programming role my boss at the time mentioned about talking to a plastic duck. After the initial concerns about his sanity, he explained that he had a plastic duck on top of his monitor so that when he hit problems he would talk to the duck and in a lot of cases the process of talking to the duck would help him to solve the problem.
Now I have never resorted to actually acquiring a duck for this purpose however it is amazing how many times just talking to someone and explaining the problem brings the solution to mind, and in a lot of cases without the other person even saying a word.
So, when I came across the following article (A reminder to talk to the rubber duck) it made me smile.
It did have one tip in there which I may give a try for when it is inconvenient to talk to others or no-one is around:
"One way to do it that works particularly well is to write an e-mail message explaining your problem. Pretend you’re going to send it to the smartest (and busiest) person in the world. Describe the problem in detail, the solutions you tried so far and why they didn’t work. List your assumptions and make sure you include all relevant information. Be both thorough and objective."