One of the most hated by students at universities thing is “programming on paper”. I can understand that. Sometimes it evolved to professors requiring compilable code written by hand, which is nonsense. But, in my opinion, it was created to teach students to break down the problem until they start coding.
Whether you to write compilable code on paper or code in IDE you are distracted either by focusing on syntax or by notifications from an editor. That’s why in both cases you have something more than an issue to focus on.
And that is when when pen and paper (or a plain text document) comes useful.
No mouse, keyboard. No windows and no sidebars. No errors, warnings and suggestions.
Just you and the problem.
Sketch the solution, create some logic diagram, put down steps which the program should follow, try to write some pseudo code. Just focus on the essence of the issue and its solution and translate it to the code later.
You don’t need to use this technique always. Soon you’ll become fluent with the editor and language to the degree where you program and solve problem all at once.
But when you are just beginning work, or when you are stuck, moving your thoughts to some cleaner environment can surely help you.
“Coding on paper” is also a great technique while pair/mob-programming and debugging. All that participants need to follow are written or drawn down steps to solve a problem. It can greatly engage less experienced team members into the ways seniors solve them. And often, they can participate in finding and suggesting solutions without deep technical knowledge.