In contrast, if you write the code first, the abstractions will probably evolve as you code, which will require more code revisions than the comments-first approach.
Exactly, it is much better to develop your mental image more clearly than trying to code blindly. The mental model is the most important aspect of solving any problem.