I suppose that when you're working on Field medal awarding problems, building software seems like a way to relax your mind.
That's a technique i tried when i was bulding my latest "complex" algorithm (graph diffing with the graph stored in a sql db): Whenever i felt stuck, i went and took an online lesson in quantum mechanics ( susskin ones, the best).
All of the sudden, all my problems seemed really easy, and i was able to move forward almost right away.
http://www.hairersoft.com