Like @owel said, writing actual code will be wasted time. If you can see the real code, you should just put it in a file now.
But... there is immense wealth to using pen and paper (or whiteboard, or post-its).
In this case, you have a trifecta. You think it (and probably hear yourself saying it). You write it. And then you immediately re-internalize it by seeing it.
That loop creates a multiplied learning effect.
For me, I do sketch/wireframe layouts, model API routes, and write potential requirements and pitfalls. Each page in my notebook is a single project with a date (for when I'm flipping through later for inspiration).
I also create sitemaps with post-its and an empty wall. Start by writing one thought on a note and put it on the wall... anywhere... nobody cares about order yet. Just get as many notes/ideas on the wall as you can think of. Then, step back and look at all of them. You'll start to see patterns. This is where you start to move and group your notes. When you're done, you'll have a better picture of the requirements for a project. In UX, they do something similar called affinity diagrams, but this isn't quite that involved.
Gets me out of my chair too. And movement is good for thinking.
I try to leave the notes on the wall for as long as the project runs. I'll even add to them as time goes (and scope allows).