Paul Graham use to say something like: You can't think well without writing well. If I interpret it well, he views writing not as a way to record thoughts, but as the actual tool used to discover and refine them.
If I understand he says this related to regular text but we could extend to writing code too.