Am surprised by all the negative comments about writing code by hand.
Many of the comments here speak about moving or thinking faster, but where I have always found pen and paper most helpful is when I've needed to slow down, focus, feel out edge cases, and give my intuition and experience more chances to engage with the problem. Occasionally for purely algorithmic things I've written out an entire function or loop, but more often it's a table of the program state during an iteration, or a diagram of how two things talk to each other, or what calls what in what order... just the little bits I need to think about, get clear on, before I go back to my editor for the next steps to address the problem. If you've ever driven a manual transmission, it feels a little like downshifting to get extra power on a steep hill climb.<p>It has been suggested ([1],[2]) that writing by hand helps with memory retention and probably other aspects of cognition; in my case, it may just be that writing [edit: by hand] "feels calmer," so, if I have a hard problem to think through, the pen usually comes out.<p>[1] <a href="https://pubmed.ncbi.nlm.nih.gov/33815075/" rel="nofollow noreferrer">https://pubmed.ncbi.nlm.nih.gov/33815075/</a><p>[2] <a href="https://journals.sagepub.com/doi/abs/10.1177/0956797614524581" rel="nofollow noreferrer">https://journals.sagepub.com/doi/abs/10.1177/095679761452458...</a>