One thing I’ve found with most creative endeavors, including programming, writing, and preparing presentations, is that generating ideas and a first draft should be kept mentally and temporally separate as much as possible from polishing and editing.
Now there is a little overlap, in that even when dumping ideas onto the page you will sometimes pause to decide on correct phrasing, etc., but your activity overall should be either one or the other as much as possible. Failing to separate them in intention can produce a muddle, in which you’re ideas are neither fully externalized nor fully polished.
In fact, I’ve found it helpful to explicitly decide which it’s going to be at the start of a work period. I usually start with the raw idea dump, then when that’s done, take a break before any editing or polishing.
Often it’s better to not even do the latter until the next day.
Now, one subtlety here is outlining.
If it’s a small piece of work, like an email or short blog post, an outline might not be necessary.
If it’s something bigger, an outline is usually important, and earlier rather than later. Don’t spend more than one work session or so dumping your ideas without producing an outline.
The main advantage of doing this is that it keeps you ideation and refinement confined to small sections, which are much easier to fit into your mental workspace all at once.
This is important as once the critical pieces of what you’re working on number too many to immediately fit in your head at once, your progress will slow dramatically.
So, make sure your work is separated into small enough chunks to think about, and within those chunks, keep idea generation and editing as separate as possible.
It will keep your thoughts clear and give you a much clearer feeling of progressing to completion, which will keep you engaged and motivated.