In both cases, distraction was converted into fuel for high performance. In the chess scene, the shaking jolted my mind into clarity and I discovered the critical solution to the position.
In software development, that is often the thing. Finding a good solution.