Sometimes when I'm working on an idea, I want to get that idea out of my head and into written code format, even if I never actually run it or test it.
I'll usually start with some pseudo-code written down on scratch paper, but when it comes to actual syntactically-correct code, I'll fire up an editor and type it out just to see what it looks like. I do this for data types or objects, or functions or methods, or interfaces, or what have you.
Then I end up with a scratch directory with files such as "scratch.go", "scratch1.go", "coord.go" and other random names.
I've even considered and maybe even experimented a bit with using source control to be able to keep ideas, even after I've moved on to better ideas.
One thing that does help is using an editor with syntax or lint checking, such as vim or vscode.
Does anyone else have a better process for this?