A Developer's Job Isn't to Write Code
Paper is small, constrained, and uses fine writing implements. It has pre-printed lines and boundaries - starting again is difficult and slow. No one else can see what you’re writing.
Coding is slow, complex, hampered by irrelevant constraints (the need for valid linting, correct syntax & versions of APIs, etc). Code is like paper.
Whiteboards are big and crude. They have thick markers that prevent detail getting in the way. Everyone can see them. They’re easily erased and modified.
Finding solutions can be inductive (bottom-up) or deductive (top-down). But they always depend on abstractions, reduction, or focus at a level other than what code offers. Finding solutions is easiest working at a whiteboard.
Spend as much time as you need: finding the solution is not delaying or deferring - you’ve already started the work - and the most important part.
A developer’s job isn’t to produce code, but to create solutions and communicate them with code.
Share ideas cheaply, simply. Test them, get agreement and only then commit them to paper by Backing into Success.
It doesn’t matter what your “whiteboard” is (it can even be paper) - just don’t sit down to solve a problem at the keyboard.
Note: this doesn’t mean you can’t refer to the code while developing solutions.